Page 1 of 1

PHP 5.2.4 cli installation

Posted: Thu Jan 06, 2011 11:04 am
by peterhf
There are two questions here:

1. when I run "php -v", I get "PHP 4.4.9 (cli) (build ...". Some time ago I deleted PHP 4 and installed PHP 5.2.4. Apparently, my delete effort missed something. What do I have to do to expunge all of PHP 4 so that PHP 5.2.4 is the version I am using?

2. When I execute "phpinfo" there is no mention of the PHP 5.2.4 cli having been installed, i.e. "--enable-cli" does not appear in the output of phpinfo. Is my assumption correct that I can install PHP 5.2.4 cli myself?

I am trying to install a Zend Framework tutorial and the installation is "gagging" because the cli is written in PHP 5 OOP and PHP 4 does not use the keyword "protected" in a class.

Many thanks for your help.

Peter -

Re: PHP 5.2.4 cli installation

Posted: Thu Jan 06, 2011 5:23 pm
by Doug G
You kind of forgot to mention what OS you're working on :)

Re: PHP 5.2.4 cli installation

Posted: Thu Jan 06, 2011 5:35 pm
by peterhf
I did indeed! It is Mac OS 10.4.11.

Peter -

Re: PHP 5.2.4 cli installation

Posted: Fri Jan 07, 2011 3:28 pm
by Doug G
I've never used a Mac, sorry. There are usually different executables for cli php and web php, it sounds like you only installed/upgraded the web half.

Re: PHP 5.2.4 cli installation

Posted: Fri Jan 07, 2011 5:26 pm
by peterhf
Thank you both for giving a go at my problem.

Maybe if I approach it from slightly different angle it will help.

Mac OS 10.4.11
PHP version 5.2.4 is installed and working. I have written numerous applications using the OOP features of PHP5 that work. If I run phpinfo.php the information returned shows that the PHP version is 5.2.4.
Apache/1.3.41 (Darwin) PHP/5.2.4 JRun/4.0 DAV/1.0.3

The Zend tutorial installer that I am trying to use is gagging on a PHP 5.2.4 OOP keyword that is not used in PHP 4. The installer is claiming that the version of PHP running on my machine is 4.4.9. I have discovered that there are two files which when executed state that the installed PHP is 4.4.9. The files are "usr/bin/php -v" and "/usr/bin/php-config -version".

If I delete these two files and completely uninstall PHP and reinstall PHP5 using an Entropy distribution will these two files reappear and return 5.2.4 as the current version?