Switching between php4 and php5


#1

I switched from php4 to php5 2 days ago. It said it needed about 10 minutes to take effect.

But my php application still shows that it is php4.

How to make the change take effect?


#2

Is your PHP application a web page? The “switch” only affects the webserver’s .php files when accessed via http.

How are you testing the version change?

I usually check by using a “version.php” file with the following contents:

<?php echo phpinfo(); echo "\n"; ?>
And then going to http://www.mydomain.com/version.php to read the output.

-Scott


#3

thanks for your reply

I tried the php code.

it shows PHP Version 4.4.8 on the top

but in the web panel it is php 5.x.x

I tried to switch it back to 4 then to 5 again.

It doesn’t change anything…


#4

It sounds like you may be using mod_php without realizing it (which can account for why you are seeing PHP4.4.8 even though your domain is set to use PHP 5.2.3). Is there an .htaccess file in your directory path and if so, what are it’s contents?

–rlparker


#5

oh, you are right.

You reminded me that I was using mod php.

I have reset the setting and it is php5.2.3 now

Thanks for your help


#6

You are welcome, and I’m glad the mystery is solved! :slight_smile:

–rlparker