Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th September 2006, 14:05
dfriis dfriis is offline
Junior Member
 
Join Date: Feb 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Web server offline after php4 and apache2 upgrade

I wanted to upgrade the apache and php version on my debian sarge installation and followed the instructions at http://www.howtoforge.com/forums/sho...=upgrade+mysql

I didn't change the file sources.list though, I just did an apt-get update first to check if there were any updates for me, and there was.

I'm not sure what it did upgrade though but when I try to start apache I get:

Code:
www:/var/log/httpd# /etc/init.d/apache2 restart
Forcing reload of web server: Apache2 ... failed!
You may still have some apache2 processes running.  There are
processes named 'apache2' which do not match your pid file,
and in the name of safety, we've left them alone.  Please review
the situation by hand.
Syntax error on line 48 of /etc/apache2/vhosts/Vhosts_ispconfig.conf:
Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
The only thing I wrote was:
Code:
apt-get update
apt-get install mysql-server mysql-client libmysqlclient12-dev
apt-get install apache2 apache2-doc
apt-get install libapache2-mod-php4 libapache2-mod-perl2 php4 php4-cli php4-common php4-curl php4-dev php4-domxml php4-gd php4-imap php4-ldap php4-mcal php4-mhash php4-mysql php4-odbc php4-pear php4-xslt curl libwww-perl imagemagick
I've searched the forums for a while now and the only problem I think I might have is that mod_php isn't loaded. Why is that setting lost and how can I fix it?

I'm not that confident around apache, php and linux but I'm good at following instructions. It's just a pain in the behind that everything gets messed up as soon as you try to use this friggin' system...

Please help me, this server is in some sort of production and I have to get it up and running
Reply With Quote
Sponsored Links
  #2  
Old 6th September 2006, 14:15
Ben Ben is offline
Moderator
 
Join Date: Jul 2006
Posts: 1,029
Thanks: 7
Thanked 62 Times in 56 Posts
Default

The first question is, why apt-get install worked, if you wand to dou an update, because the command herefore is after and apt-get update
apt-get upgrade.

It seems that mod_php is not properly installed andy that's why he's telling
Quote:
Invalid command 'php_admin_flag', pe
So I would try stop the apache if running, and afterwards take a look with
ps aux | grep apache if processes of apache are still running.

If your config still exists, backup it, then I would reinstall all things you wanted to upgrade regarding apache2 and see if that helps...
Reply With Quote
  #3  
Old 6th September 2006, 15:45
dfriis dfriis is offline
Junior Member
 
Join Date: Feb 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
Have you tried what falko posted, it works!

If you run apt-get upgrade or apt-get dist-upgrade it will upgrade your system. If you use apt-get install, apt will install the package and if it is already installed apt will look if there are newer packages and makes an update.
After reading the above, quoted from the link I posted, I though it was perfectly fine to use the install command. It was fine too, untill the server tried to start the webserver again. It found a few packages to upgrade and did so, there were no errors in the installation procedure what I know of.

I've rebooted the machine now but I don't seem to get it up and running again. It's a remote server so I have to get back to you with the updates. Have to make a few calls and get people to boot it up for me

Is there no way to install mod_php without reinstalling everything? I just can't see the fun in reinstalling the entire server everytime some upgrade/change mess it up.
Reply With Quote
  #4  
Old 6th September 2006, 20:23
dfriis dfriis is offline
Junior Member
 
Join Date: Feb 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, the server is up and running again but there is still no working webserver.

If there is no way to just install mod_php, what is the simplest way to reinstall the packages I tried to upgrade?

What config files do I HAVE to backup before doing this? Please tell me this is doable without reinstalling the system...
Reply With Quote
  #5  
Old 7th September 2006, 10:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,181
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

Quote:
Originally Posted by dfriis
If there is no way to just install mod_php, what is the simplest way to reinstall the packages I tried to upgrade?
run this commad as root user:

Code:
apt-get install libapache2-mod-php4 libapache2-mod-perl2 php4 php4-cli php4-common php4-curl php4-dev php4-domxml php4-gd php4-imap php4-ldap php4-mcal php4-mhash php4-mysql php4-odbc php4-pear php4-xslt curl libwww-perl imagemagick
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 28th September 2006, 05:36
fbnewtz fbnewtz is offline
Member
 
Join Date: Apr 2006
Location: Houston
Posts: 43
Thanks: 1
Thanked 2 Times in 2 Posts
Default Figured out how to solve this problem

Just for those people who are desperately trying to figure out what happened after they upgraded and PHP will not work.

From the /etc/apache2/mods-enabled folder run the following commands
Code:
/etc/apache2/mods-enabled# ln -s /etc/apache2/mods-available/php4.load
/etc/apache2/mods-enabled# ln -s /etc/apache2/mods-available/php4.conf
Reply With Quote
  #7  
Old 29th September 2006, 13:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by fbnewtz
From the /etc/apache2/mods-enabled folder run the following commands
Code:
/etc/apache2/mods-enabled# ln -s /etc/apache2/mods-available/php4.load
/etc/apache2/mods-enabled# ln -s /etc/apache2/mods-available/php4.conf
You can run
Code:
a2enmod php4
instead. It does the same.
__________________
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
  #8  
Old 5th December 2006, 10:10
sgrayban sgrayban is offline
Junior Member
 
Join Date: Dec 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mandriva 2007 & maybe other distros have this issue

I use mandriva and ran into this crap issue....

Mandriva likes to make modules of _everything_ for apache and I was getting the same errors and ISPConfig was not loading in new websites because httpd -t was throwing a vail but invalid error.

The problem begins when you instaall a apache2 module and it installs it into 'modules.d/70_mod_php4.conf' or something like that.

httpd -t doesn't load that in -- know why ? Cause in Mandriva atleast 1 issue is going on.
1) httpd -t doesn't check syntax with the included 'Include modules.d/*.conf' still

So what I had to do was manually add the following into httpd.conf ....

LoadModule php4_module extramodules/mod_php4.so
LoadModule suexec_module extramodules/mod_suexec.so

These two modules _MUST_ be loaded into the main httpd.conf for 'httpd -t' to work. After I did that the error 'Invalid command 'php_admin_flag' went bye bye and all was good.

The suexec_module will also throw a error if its loaded the same way the php4 module is so I had to add that as well.

Maybe 'httpd -t' just isn't a good idea until the apache people fix this bug. I already reported it.
Reply With Quote
  #9  
Old 6th December 2006, 16:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Have a look at this tutorial: http://www.howtoforge.com/perfect_setup_mandriva_2007
The problem and the solution are described there, too.
__________________
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
  #10  
Old 6th December 2006, 19:59
sgrayban sgrayban is offline
Junior Member
 
Join Date: Dec 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

That howto for mandriva needs lots of work... Mainly remove all the useless graphics.
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
Running Apache2 With PHP5 And PHP4 At The Same Time hansmi HOWTO-Related Questions 3 28th June 2006 09:49
php4 as CGI and php5 as Apache2 Handyman HOWTO-Related Questions 1 7th June 2006 04:29
Apache2 with PHP4 and PHP5 on Debian Sarge chazaq HOWTO-Related Questions 1 28th March 2006 19:42


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


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