LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-22-2008, 12:31 AM   #1
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Rep: Reputation: 15
Help with PHP going form 4 to 5


Hi,

I updated php from 4.4.4-8+etch6 to the latest version.

Website runs a vBulletin forum, and in the php info i still see
PHP Version 4.4.4-8+etch6

so, i'm guessing that php5 is on server but not being used or set as default ???

Can you please shed some light on this.

Thanks a lot
 
Old 09-22-2008, 12:50 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
You didn't mention if you already restarted the httpd service?
 
Old 09-22-2008, 07:18 AM   #3
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
i rebooted the server right after that. and then checked for the version .
but it was like nothing changed.
 
Old 09-22-2008, 10:39 AM   #4
ricstirato
Member
 
Registered: Jan 2004
Location: Gießen, Germany
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Posts: 174

Rep: Reputation: 24
You probably installed php5 but didn't deinstall php4.
As running both in parallel is basically possible, you should explicitly deinstall php4 and all PHP 4 related packages (including the Apache module).
Then restart Apache.
 
Old 09-22-2008, 11:02 PM   #5
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
how do i do that..

without break anything
 
Old 09-23-2008, 09:53 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You don't necessarily need to uninstall PHP4, you most likely have Apache loading the php4 module instead of version 5. Check your httpd.conf configurations.
 
Old 09-24-2008, 12:57 AM   #7
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid View Post
You don't necessarily need to uninstall PHP4, you most likely have Apache loading the php4 module instead of version 5. Check your httpd.conf configurations.
its actually weird..

/etc/apache2/httpd.conf its a 0 Byte File!

any help on this
 
Old 09-24-2008, 11:34 PM   #8
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
guys a lil help here....
 
Old 09-25-2008, 11:15 AM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by Hammad101 View Post
guys a lil help here....
Probably checking the wrong httpd.conf file.

Run:

updatedb

Then do a:

locate httpd.conf

To find where any others are located at.
 
Old 09-26-2008, 11:40 PM   #10
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
Since I'm using Plesk I think I found the correct file.

Now there are a Few Places in the Files Like below

Code:
<Directory "/var/www/vhosts">
	AllowOverride All
	Options SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
	<IfModule mod_php4.c>
	php_admin_flag engine off
	</IfModule>
	<IfModule mod_php5.c>
	php_admin_flag engine off
	</IfModule>
</Directory>

<Directory "/usr/lib/mailman">
	AllowOverride All
	Options SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
	<IfModule mod_php4.c>
	php_admin_flag engine off
	</IfModule>
	<IfModule mod_php5.c>
	php_admin_flag engine off
	</IfModule>
</Directory>
Code:
<VirtualHost \
			xxxxxxxxxxxx \
			xxxxxxxxxxxx \
			xxxxxxxxxxxx \
			>
	ServerName default
	UseCanonicalName Off
	DocumentRoot /var/www/vhosts/default/htdocs
	ScriptAlias /cgi-bin/ "/var/www/vhosts/default/cgi-bin/"
	<IfModule mod_ssl.c>
		SSLEngine off
	</IfModule>
	<Directory "/var/www/vhosts/default/cgi-bin/">
		AllowOverride None
		Options None
		Order allow,deny
		Allow from all
	</Directory>
	<Directory /var/www/vhosts/default/htdocs>
	<IfModule mod_php4.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/default/htdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/default/htdocs:/tmp"
	</IfModule>
	</Directory>
</VirtualHost>
Code:
<VirtualHost \
			xxxxxxxxxxxx \
			xxxxxxxxxxxx \
			xxxxxxxxxxxx \
			
	DocumentRoot /usr/share/psa-horde/
	Alias /horde/ /usr/share/psa-horde/
	Alias /imp/ /usr/share/psa-horde/imp/
	ServerName webmail
	ServerAlias webmail.*
	UseCanonicalName Off
	<Directory /usr/share/psa-horde>
		<IfModule mod_php4.c>
			php_admin_flag engine on
			php_admin_flag magic_quotes_gpc off
			php_admin_flag safe_mode off
			php_admin_value open_basedir "/usr/share/psa-horde:/etc/psa-horde:/etc/psa:/tmp:/var/tmp:/var/log/psa-horde:/usr/share/doc:/usr/share/psa-pear"
			php_admin_value include_path "/usr/share/psa-horde:/usr/share/psa-pear:."
		</IfModule>
		<IfModule mod_php5.c>
			php_admin_flag engine on
			php_admin_flag magic_quotes_gpc off
			php_admin_flag safe_mode off
			php_admin_value open_basedir "/usr/share/psa-horde:/etc/psa-horde:/etc/psa:/tmp:/var/tmp:/var/log/psa-horde:/usr/share/doc:/usr/share/psa-pear"
			php_admin_value include_path "/usr/share/psa-horde:/usr/share/psa-horde/lib:/usr/share/psa-pear:."
		</IfModule>
		Order allow,deny
		Allow from all
	</Directory>
</VirtualHost>
From what i see Both php4 $ php5 are enabled.
And I need to comment out PHP4 ??

Thanks for any help
 
Old 09-30-2008, 02:29 PM   #11
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
Guys!?!?!?
 
Old 09-30-2008, 03:15 PM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by Hammad101 View Post
Guys!?!?!?
You don't say what distro of Linux you're using, but there is lots of information on Google:

http://forums.serverbeach.com/showthread.php?t=6125

That page covers Plesk, and updating to PHP5 from PHP4.

Also, we all volunteer our time....multiple posts in one day, going "Guys!?!?!?" isn't very polite, and sure won't get your question answered any faster.
 
Old 09-30-2008, 11:28 PM   #13
Hammad101
Member
 
Registered: Dec 2005
Posts: 72

Original Poster
Rep: Reputation: 15
- There isn't much info on what i seek on Google, or wouldn't have asked here
- It was 4 days, and i didn't mean it to be harsh, i was logging off and said that, plus in 10 mins a topic @ LQ and goto 2nd page.. meaning forgotten..
- The link you gave:

it comes back to what i had asked in the post above my last one.

Quote:
Apache Run-time Config (httpd.conf)

You only need to make two small changes. I'm using "vi" to edit the config files. You can use the editor of your choice.

Code:

# vi /etc/httpd/conf.d

Change the top line of "conf.d" so that it loads the new PHP5 module instead of the old PHP4 module i.e. "LoadModule php5_module modules/libphp5.so"

Code:

# vi /etc/httpd/conf/httpd.conf

At the foot of the file, comment out the line that reads "LoadModule php5_module /usr/lib/httpd/modules/libphp5.so". This was added by the PHP5 install but it's not needed as it's already in "conf.d".
Do I need to remove all the libphp4.so from the httpd.conf ...

oh and.. i did meention in Op its a Debian Etch........
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to show results of a php query from a form on the main form texmansru47 Programming 2 06-27-2008 01:26 PM
PHP: build query from form entry, then display results in the same form tonedeaf1969 Programming 4 06-22-2007 07:55 AM
PHP form noir911 Programming 3 02-12-2007 10:04 PM
PHP form help Zeppelin_Fan Programming 5 03-24-2005 04:47 PM
php/form kev82 Programming 0 02-25-2004 06:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration