HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   PHP not working on websites (various errors) (http://www.howtoforge.com/forums/showthread.php?t=50064)

Toxin 16th November 2010 20:40

PHP not working on websites (various errors)
 
Hi everyones,
I've setup my server under Fedora 13 using the tutorial of HowToForge (really good).

I'm a beginner in Linux so it is not always easy to troubleshoot system.

My Ispconfig 3.0.3 run well, FTP / mySQL / Mail / Webmail are running ok but when I try to use a php script on websites created by ISPC i have internal error (500)

I tried Phpsysinfo, he gives me a blank screen and some errors in /var/log/ispconfig/httpd/mywebsite/error.log

Code:

[Wed Nov 10 12:44:41 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Warning:  require_once(): open_basedir restriction in effect. File(/var/www/clients/client1/web1/web/phpsysinfo/includes/autoloader.inc.php) is not within the allowed path(s): (/var/www/clients/client0/web1/web:/var/www/clients/client0/web1/tmp:/var/www/www.meuro-media.net/web:/srv/www/www.meuro-media.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/var/www/clients/client0/web1/web/phpsysinfo/) in /var/www/clients/client1/web1/web/phpsysinfo/index.php on line 34
[Wed Nov 10 12:44:41 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Warning:  require_once(/var/www/clients/client1/web1/web/phpsysinfo/includes/autoloader.inc.php): failed to open stream: Operation not permitted in /var/www/clients/client1/web1/web/phpsysinfo/index.php on line 34
[Wed Nov 10 12:44:41 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Fatal error:  require_once(): Failed opening required '/var/www/clients/client1/web1/web/phpsysinfo/includes/autoloader.inc.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/clients/client1/web1/web/phpsysinfo/index.php on line 34
[Wed Nov 10 12:44:43 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Warning:  Unknown: open_basedir restriction in effect. File(/var/www/clients/client1/web1/web/phpsysinfo/index.php) is not within the allowed path(s): (/var/www/clients/client0/web1/web:/var/www/clients/client0/web1/tmp:/var/www/www.meuro-media.net/web:/srv/www/www.meuro-media.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/var/www/clients/client0/web1/web/phpsysinfo/) in Unknown on line 0
[Wed Nov 10 12:44:43 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Warning:  require_once(): open_basedir restriction in effect. File(/var/www/clients/client1/web1/web/phpsysinfo/includes/autoloader.inc.php) is not within the allowed path(s): (/var/www/clients/client0/web1/web:/var/www/clients/client0/web1/tmp:/var/www/www.meuro-media.net/web:/srv/www/www.meuro-media.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/var/www/clients/client0/web1/web/phpsysinfo/) in /var/www/clients/client1/web1/web/phpsysinfo/index.php on line 34
[Wed Nov 10 12:44:43 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Warning:  require_once(/var/www/clients/client1/web1/web/phpsysinfo/includes/autoloader.inc.php): failed to open stream: Operation not permitted in /var/www/clients/client1/web1/web/phpsysinfo/index.php on line 34
[Wed Nov 10 12:44:43 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Fatal error:  require_once(): Failed opening required '/var/www/clients/client1/web1/web/phpsysinfo/includes/autoloader.inc.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/clients/client1/web1/web/phpsysinfo/index.php on line 34
[Mon Nov 15 12:11:17 2010] [error] [client 193.253.141.66] File does not exist: /var/www/neuro-media.net/web/images/logo2.png, referer: http://forum.hardware.fr/hfr/WindowsSoftware/domaine-sujet_119632_1.htm
[Mon Nov 15 12:11:17 2010] [error] [client 193.253.141.66] File does not exist: /var/www/error/404.html, referer: http://forum.hardware.fr/hfr/WindowsSoftware/domaine-sujet_119632_1.htm
[Mon Nov 15 18:39:30 2010] [warn] [client 10.0.0.138] mod_fcgid: stderr: PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /var/www/clients/client1/web1/web/info.php on line 3
[Mon Nov 15 18:43:00 2010] [warn] [client 10.0.0.138] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Mon Nov 15 18:43:00 2010] [error] [client 10.0.0.138] Premature end of script headers: admin.php3
[Mon Nov 15 18:43:00 2010] [error] [client 10.0.0.138] File does not exist: /var/www/error/500.html
[Mon Nov 15 23:27:20 2010] [warn] [client 10.0.0.138] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Mon Nov 15 23:27:20 2010] [error] [client 10.0.0.138] Premature end of script headers: admin.php3
[Mon Nov 15 23:27:20 2010] [error] [client 10.0.0.138] File does not exist: /var/www/error/500.html
[Mon Nov 15 23:27:25 2010] [warn] [client 10.0.0.138] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Mon Nov 15 23:27:25 2010] [error] [client 10.0.0.138] Premature end of script headers: admin.php3
[Mon Nov 15 23:27:25 2010] [error] [client 10.0.0.138] File does not exist: /var/www/error/500.html

As you can see it also have a probleme were ERROR pages are not found (seems to be badly created by ISPC)

Can someone try to help me to correct theses errors, it would be great.:)

itsnedkeren 18th November 2010 12:14

Try running the ISPConfig installer again, just as an upgrade, then choose to reconfigure services.

Quote:

cd /tmp
wget http://www.ispconfig.org/downloads/I...-stable.tar.gz
tar xvfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install
php -q update.php

Toxin 19th November 2010 14:35

Ok I tried to upgrade to 3.0.3.1 (not re-install 3.0.3) and reconfigure services
and also removed the
Code:

umask=0022
umask=0022

from my suphp.conf (as Falko told someone in a similar topic)

Not realy helped, but after I restarted the whole server, I had some good news.

Phpsysinfo worked for a few minutes (but now it only display "Loading Please wait" )

I will check the log files for more details.

Toxin 19th November 2010 14:43

Here are the errors that give me phpsysinfo (shown in IE8, Firefox wont show them :mad:)

Code:

PHP throws a error
Level : 2 Message : file_exists(): open_basedir restriction in effect. File(/etc/fedora-release) is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/tmp:/var/www/www.***.net/web:/srv/www/www.***.net/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/var/www/clients/client1/web1/web/phpsysinfo/) File : /var/www/clients/client1/web1/web/phpsysinfo/includes/os/class.Linux.inc.php Line : 518
--------------------------------------------------------------------------------
errorHandlerPsi :


Toxin 19th November 2010 14:54

I don't know why but the website adress writen in "PHP open_basedir" was Badly spelt
Code:

/var/www/www.m***.net/web
instead of
Code:

/var/www/www.n***.net/web
Maybe a mistake at my begins with ISP Config.

Toxin 19th November 2010 20:26

I try to switch PHP to Fast-CGI in the Website panel and I have the same errors
Code:

PHP throws a error
Level : 2 Message : file_exists(): open_basedir restriction in effect.

When i swith to SuPHP it* works good.


* My test script is phpsysinfo.

Server administration is not as easy that I thought ^^

falko 20th November 2010 15:37

Your PHP script tries to access files that are outside the open_basedir which isn't allowed. open_basedir is a security measure for servers used by several people so that nobody can access files that he shouldn't see.

http://www.php.net/manual/en/ini.cor...i.open-basedir

Toxin 20th November 2010 15:51

With the same rules, why is it working with suPHP and not fast-CGI ?

Toxin 27th November 2010 15:41

Back again, I thought that switching to SuPHP would be ok, but I tried to install SimpleInvoice on my website but with SuPHP I have a blank screen without code, so I switched to ModPHP and then it works, but now phpsysinfo is not working anymore.

So Can someone try to help me to find a way to have PHP running well on my computer ?


All times are GMT +2. The time now is 21:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.