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
;
php5 and php5
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: php5 and php5
I may be completely wrong but I believe having php as both CLI and CGI requires two seperate installations. Somebody correct me?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
;
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
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.
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.