Forum Moderators: coopster

Message Too Old, No Replies

PHP Stopped Working

         

web_wheeler

3:08 pm on Aug 31, 2007 (gmt 0)

10+ Year Member



I have installed LAMP on my computer, and until yesterday, everything was working fine, and then PHP stopped producing any output. It doesn't matter if there is any PHP code in the file or not. For example, if I simply rename a .html file to .php all output stops.

When I run either <?php phpinfo();?> or <? phpinfo();?> I get no output.

php -r "phpinfo();" from the console reports this:

I'm running Fedora 7, and I did recently reboot and allowed all the software updates to install, but I can't say for sure if that caused the problem.

Has this ever happened to anyone? Any suggestions?

Thanks!

[edited by: jatar_k at 3:27 pm (utc) on Aug. 31, 2007]
[edit reason] trimmed dump [/edit]

jatar_k

3:28 pm on Aug 31, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



do you get errors in any logs?

web_wheeler

3:52 pm on Aug 31, 2007 (gmt 0)

10+ Year Member



OK, I believe this error from httpd error log is probably the reason I get no output.

[Fri Aug 31 11:46:58 2007] [error] [client 192.168.1.1] PHP Warning: Unknown: open_basedir restriction in effect. File(/var/www/html/atvCommon/test1.php) is not within the allowed path(s): (/home:/usr:/tmp) in Unknown on line 0
[Fri Aug 31 11:46:58 2007] [error] [client 192.168.1.1] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
[Fri Aug 31 11:46:58 2007] [error] [client 192.168.1.1] PHP Fatal error: Unknown: Failed opening required '/var/www/html/atvCommon/test1.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0

What is causing this, and how do I fix it?

dreamcatcher

5:05 pm on Aug 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Looks like the server has Safe Mode enabled. You can disable this or you`ll probably need to change your include paths to url the full server path.

dc

web_wheeler

3:16 am on Sep 1, 2007 (gmt 0)

10+ Year Member



php -r "phpinfo();"

reported safe_mode => off => off

coopster

4:32 pm on Sep 5, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



... then you'll need to adjust your include path(s) as suggested.

or you`ll probably need to change your include paths