#1  
Old 27th November 2010, 20:23
rohitbanerjee rohitbanerjee is offline
Junior Member
 
Join Date: Nov 2010
Location: Mumbai, India
Posts: 16
Thanks: 1
Thanked 5 Times in 3 Posts
Exclamation PHP pages doesnt work at all

I have a Virtuozzo VPS with CEntOS 5.5 x86_64 running on it. I followed the http://www.howtoforge.com/perfect-se...64-ispconfig-3 tutorial to install the lates stable version of ISPConfig 3 available (ISPConfig-3.0.2.1). I even made sure some of the missing links or resources were substituted in the packages installation processes.

The installation went fine and I intend to use this server for Name-based hosting. I have a 6-8 different domain names registered that I have pointed to the IP of the sever which has the ISPConfig installed. Since they are Name-based, I have not configured any DNS on the ISPC panel (Don't think that required in this case).

The only problem for is that I cannot get index.php or any .php page to run on any of the vhost sites that I have created in ISPC. Every time I get a 500 error page. I scoured the forum for similar issues other faced and got these
HTML Code:
http://www.howtoforge.com/forums/showthread.php?t=32919
HTML Code:
http://www.howtoforge.com/forums/showthread.php?t=39671
but both didn't give any clear indication of solution o my problem. I tried changing the PHP modules to Fast-CGI, then CGI, then Mod-PHP and then even SuPHP. I even tried to have all the different possible combination of enabling/disabling SuEXEC with each of the php modules.

I checked the conf files to check if PHP was excluded by default or not. In /etc/httpd/conf/httpd.conf file, it included
Code:
conf.d/*.conf
but it had
Code:
DirectoryIndex index.html index.html.var
So I checked in /etc/httpd/conf.d/php.conf and found that it had
Code:
AddHandler php5-script .php
AddType text/html .php
DirectoryIndex index.php
This should mean that php module is always included as one of the index handlers.


I also checked the vhost files in /etc/httpd/conf/sites-available/ and /etc/httpd/conf/sites-enabled and found there is no 000-default vhost file at all. instead there's 000-app and 000-ispconfig vhost files (perfectly normal settings there).

So I'm really stumped and I have a client presentation of a PHP-based CMS site in a few days that I wanted to show on this ISPC server. Till and Falko or anyone else, can you help me? Thanks in advance.
Reply With Quote
Sponsored Links
  #2  
Old 28th November 2010, 15:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,414
Thanks: 812
Thanked 5,204 Times in 4,080 Posts
Default

Please post the exact error message from the apache error log of the website.

Additionally, check the ispconfig monitor or errors.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 28th November 2010, 19:33
rohitbanerjee rohitbanerjee is offline
Junior Member
 
Join Date: Nov 2010
Location: Mumbai, India
Posts: 16
Thanks: 1
Thanked 5 Times in 3 Posts
Default

Wow, my server just got hacked. I'm reinstalling everything, once done I'll post the error log of apache and the ISPC monitor.
Reply With Quote
  #4  
Old 29th November 2010, 10:15
rohitbanerjee rohitbanerjee is offline
Junior Member
 
Join Date: Nov 2010
Location: Mumbai, India
Posts: 16
Thanks: 1
Thanked 5 Times in 3 Posts
Default

Quote:
Originally Posted by till View Post
Please post the exact error message from the apache error log of the website.

Additionally, check the ispconfig monitor or errors.
The ISPC monitor shows everything normal but the apache/httpd error log file had the following latest entry -
Code:
[Mon Nov 29 02:50:15 2010] [notice] mod_fcgid: call /var/www/some-vhost-domain.com/web/index.php with wrapper /var/www/php-fcgi-scripts/web4/.php-fcgi-starter
[Mon Nov 29 02:50:18 2010] [notice] mod_fcgid: process /var/www/some-vhost-domain.com/web/index.php(30110) exit(communication error), terminated by calling exit(), return code: 254
[Mon Nov 29 02:53:16 2010] [error] [client some-ip] PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 199, referer: http://some-ip:8080/index.php
[Mon Nov 29 02:53:16 2010] [error] [client some-ip] PHP Warning:  Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of [runtime function name]().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.  in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 199, referer: http://some-ip:8080/index.php
I guess these lines are hints as to why PHP isnt working in the vhost but works for the ISPC panel. Any suggestions how to go ahead? Thanks in advance.

Note: Please don't mind me masking the domain names and the ips. I'm a little paranoid after the recent hack attack on my server 2 days back.
Reply With Quote
  #5  
Old 30th November 2010, 04:11
rohitbanerjee rohitbanerjee is offline
Junior Member
 
Join Date: Nov 2010
Location: Mumbai, India
Posts: 16
Thanks: 1
Thanked 5 Times in 3 Posts
Unhappy

Here's more of what I got from the /var/www/clients/client1/web4/log/error.log when I set the php settings to Mod-PHP in ISPC

Code:
[Mon Nov 29 10:52:56 2010] [error] [client some-ip] PHP Warning:  [eAccelerator] Can not create shared memory area in Unknown on line 0
[Mon Nov 29 10:52:56 2010] [error] [client some-ip] PHP Fatal error:  Unable to start eAccelerator module in Unknown on line 0
[Mon Nov 29 10:52:56 2010] [error] [client some-ip] Premature end of script headers: index.php
Do you guys think its because of the php-eaccelerator package ?
It just annoys me to think that php is working for ISPC but not working for the vhost sites.

Any help is appreciated. Thanks in advance.
Reply With Quote
  #6  
Old 30th November 2010, 12:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Which PHP mode do you use for that web site? Have you tried to disable eAccelerator?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 30th November 2010, 13:26
rohitbanerjee rohitbanerjee is offline
Junior Member
 
Join Date: Nov 2010
Location: Mumbai, India
Posts: 16
Thanks: 1
Thanked 5 Times in 3 Posts
Default

Quote:
Originally Posted by falko View Post
Which PHP mode do you use for that web site?
As I explained earlier, I tried using all the different PHP modes, none of them work properly. If you like, I'll post the error log for each different modes of PHP.

Quote:
Originally Posted by falko View Post
Have you tried to disable eAccelerator?
How do i disable eAccelerator? I googled and found these pages
http://eaccelerator.net/wiki/Settings
http://eaccelerator.net/wiki/InstallFromSource

I snooped around and found that /etc/php.d/eaccelerator.ini has the following
Code:
; Enable eAccelerator extension module
zend_extension = /usr/lib64/php/modules/eaccelerator.so
; Options for the eAccelerator module
eaccelerator.cache_dir = /var/cache/php-eaccelerator
eaccelerator.shm_size = 0
eaccelerator.enable = 1
eaccelerator.optimizer = 1
eaccelerator.check_mtime = 1
eaccelerator.filter = ""
eaccelerator.shm_max = 0
eaccelerator.shm_ttl = 3600
eaccelerator.shm_prune_period = 0
eaccelerator.shm_only = 0
eaccelerator.compress = 1
eaccelerator.compress_level = 9
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"
eaccelerator.debug = 0
As per the URLs above, I suspect that a Symlink for /usr/lib64/php/modules/eaccelerator.so might work.


Any ideas? Thanks in advance.
Reply With Quote
  #8  
Old 1st December 2010, 13:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

You can comment out all lines in /etc/php.d/eaccelerator.ini and restart Apache.

What's the output of
Code:
ls -la /usr/lib64/php/modules/eaccelerator.so
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 1st December 2010, 16:05
rohitbanerjee rohitbanerjee is offline
Junior Member
 
Join Date: Nov 2010
Location: Mumbai, India
Posts: 16
Thanks: 1
Thanked 5 Times in 3 Posts
 
Default

Quote:
Originally Posted by falko View Post
You can comment out all lines in /etc/php.d/eaccelerator.ini and restart Apache.

What's the output of
Code:
ls -la /usr/lib64/php/modules/eaccelerator.so
?
Code:
-rwxr-xr-x 1 root root 656758 Oct  5  2007 /usr/lib64/php/modules/eaccelerator.so
I got the php page working finally but only on Mod-PHP. Added a phpinfo() function. Anything specific that I should check in it?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache not restart after change php mode wiss Installation/Configuration 15 3rd November 2010 15:43
Freebsd 6.1 support misterm Installation/Configuration 10 9th April 2009 09:29
Really Simple DNS Question andysm849 Server Operation 4 20th October 2008 23:32
Slightly Confused (DNS & Server Help) JohnnyBGoode Installation/Configuration 26 14th August 2007 09:54
Downgrade php5 to php4.4.2 llizards Installation/Configuration 4 13th March 2006 23:58


All times are GMT +2. The time now is 10:31.


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