![]() |
$_SERVER['SCRIPT_FILENAME'] empty?
Hi,
Can someone tell me if it's possivel that this: PHP Code:
any reason why? thanks |
does this happen in windows with apache or IIS? I've read about this error happening in Windows.
|
On my localhost (Windows with Apache) it works ok, but in the server running CentOS and Apache... doesn't work.
Could it be the PHP version? The server is runing PHP 5.1.6 and Apache 2.2.3 But the weird thing is that, if i run the phpinfo() and i look the at PHP variables, it gives me the SCRIPT_FILENAME :( |
nop sry.. it doesnt give in phpinfo()... i was looking at SCRIPT_NAME
|
it shouldn't be the version, that functionality has been there since I can remember.
But the $_SERVER variables do depend on the server, so it might be a server difference of setup. maybe __FILE__ would work for you. |
nop, i've testes that too with __FILE__, not working
|
I know this sounds odd but if you are on a shared server they might cause that. Shared host sometimes restrict weird things. I cant think of a reason why none of those variables would be working.
|
i'm not in a shared server.
i'm talking to the server admin's to try to fix that :) thanks |
1 Attachment(s)
Attached is the stock PHP 5.1.6 php.ini file. Backup your old one and replace it with the stock one, being sure to fill in any server specific information in the ini you need to get PHP running (extension dir, etc.)
I've had this issue before and it turned out to be a corrupted module dll (curl) that was causing my $_SERVER variables (PHP_SELF, SCRIPT_FILENAME, REMOTE_ADDR) to not function properly. It was only when I started with a stock php.ini file and enabled 1 module at a time that I found the issue. Also, when you quoted your php code in your first post, did you properly terminate the line with a semicolon (";") in your code? Hope this helps. |
thanks for that, but i cannot test that, because the problem is in the production server, i dont have control in those things.
but im talking to the administration servers to see what is possible to do thanks. |
Quote:
|
| All times are GMT. The time now is 06:37 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0