LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Help with PHP going form 4 to 5 (https://www.linuxquestions.org/questions/linux-server-73/help-with-php-going-form-4-to-5-a-671498/)

Hammad101 09-22-2008 12:31 AM

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

b0uncer 09-22-2008 12:50 AM

You didn't mention if you already restarted the httpd service?

Hammad101 09-22-2008 07:18 AM

i rebooted the server right after that. and then checked for the version .
but it was like nothing changed.

ricstirato 09-22-2008 10:39 AM

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.

Hammad101 09-22-2008 11:02 PM

how do i do that..

without break anything

trickykid 09-23-2008 09:53 AM

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.

Hammad101 09-24-2008 12:57 AM

Quote:

Originally Posted by trickykid (Post 3289299)
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

Hammad101 09-24-2008 11:34 PM

guys a lil help here....

trickykid 09-25-2008 11:15 AM

Quote:

Originally Posted by Hammad101 (Post 3290972)
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.

Hammad101 09-26-2008 11:40 PM

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

Hammad101 09-30-2008 02:29 PM

Guys!?!?!?

TB0ne 09-30-2008 03:15 PM

Quote:

Originally Posted by Hammad101 (Post 3296272)
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.

Hammad101 09-30-2008 11:28 PM

- 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........


All times are GMT -5. The time now is 02:07 AM.