Page 1 of 1

php5 and php5

Posted: Sun Dec 23, 2007 4:23 am
by johnhelen
Hello

In my computer, I create a php file with a phpinfo() function in /var/www folder and run http://localhost:8080 I know that it is php4.

However, when I run php -v (using command line ) I see it is version 5.3. Why that.
Also how I can run both php4 and php5 in my computer

Many thanks
;

Re: php5 and php5

Posted: Sun Dec 23, 2007 3:24 pm
by John Cartwright
johnhelen wrote:Hello

In my computer, I create a php file with a phpinfo() function in /var/www folder and run http://localhost:8080 I know that it is php4.

However, when I run php -v (using command line ) I see it is version 5.3. Why that.
Also how I can run both php4 and php5 in my computer

Many thanks
;
I may be completely wrong but I believe having php as both CLI and CGI requires two seperate installations. Somebody correct me?

Posted: Sun Dec 23, 2007 3:36 pm
by Jonah Bron
I had that exact problem on my server. Found out that both 4 and 5 were installed, and *.php used 4, and *.php5 used 5. Does it fix the problem?

Posted: Thu Dec 27, 2007 6:34 pm
by Ambush Commander
I'd need to see your Apache configuration to say conclusively, but it sounds like Apache is using one PHP binary, and the PHP4 binary is being found from your PATH. Crack open httpd.conf and search for php

If you want to run both from Apache, you'll need to fiddle around with the configuration. Google for the instructions; many people have done this before.