ann Posted August 19, 2010 Share Posted August 19, 2010 Dear All Please can someone help? I get different version of php used from the command line than I get with a browser. I've tried removing all php with 'apt-get remove' and deleted everything php that I dared like... 350 rm -rf /var/lib/php* 351 rm -rf /usr/local/bin/php* 352 rm -rf /usr/bin/php* 353 rm -rf /etc/php* 364 rm -rf /var/lib/dpkg/info/php* 369 rm -rf /usr/share/phpmyadmin 372 rm -rf /usr/share/php5 375 rm -rf /usr/share/doc/phpmyadmin 378 rm -rf /usr/share/doc/php5* 381 rm -rf /usr/local/lib/php 384 rm -rf /usr/local/include/php 387 rm -rf /usr/lib/php5 388 rm -rf /usr/bin/php 389 rm -rf /etc/cron.d/php5 429 rm -rf /usr/local/lib/php Then configured and installed php-5.3.3. From the command line I get php-5.3.3 with mysql... root# php /var/www/html/php_info.php <html> <head> </head> <body> <center>php info file</center><br><br> phpinfo() PHP Version => 5.3.3 System => Linux bicr-bioinf4 2.6.24-28-generic #1 SMP Wed May 26 23:34:09 UTC 2010 x86_64 Build Date => Aug 19 2010 12:05:17 Configure Command => './configure' '--with-mysql' <snip> but loading the same file in a browser I get 5.2.4 with no mysql... php info file PHP Logo PHP Version 5.2.4-2ubuntu5.10 System Linux bicr-bioinf4 2.6.24-28-generic #1 SMP Wed May 26 23:34:09 UTC 2010 x86_64 Build Date Jan 6 2010 21:42:59 Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php5/apache2 Loaded Configuration File (none) Scan this dir for additional .ini files /etc/php5/apache2/conf.d PHP API 20041225 PHP Extension 20060613 Zend Extension 220060519 Debug Build no Thread Safety disabled Zend Memory Manager enabled IPv6 Support enabled Registered PHP Streams zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.* <snip> I've stopped and started apache, closed and opened various browsers, so I know I'm looking at the right server and it's not chached. What am I missing? Many thanks root# uname -a Linux bicr-bioinf4 2.6.24-28-generic #1 SMP Wed May 26 23:34:09 UTC 2010 x86_64 GNU/Linux root# apache2 -v Server version: Apache/2.2.8 (Ubuntu) Server built: Jun 18 2010 14:04:18 root# php -v PHP 5.3.3 (cli) (built: Aug 19 2010 09:25:31) Copyright © 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright © 1998-2010 Zend Technologies Quote Link to comment Share on other sites More sharing options...
trq Posted August 19, 2010 Share Posted August 19, 2010 How was the cli version of php installed? Ubuntu (I think) only officially supports 5.2.* Quote Link to comment Share on other sites More sharing options...
ann Posted August 19, 2010 Author Share Posted August 19, 2010 Thanks for replying I hadn't realised #php -v and #php /var/www/html/php_info.php were also giving different versions of php! php5-cli was installed and removed with apt-get and apt-get claims it's not installed now... #apt-get remove php5-cli Reading package lists... Done Building dependency tree Reading state information... Done Package php5-cli is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. I've tried again to delete all the php files, restarted apache and when I load php_info.php in a browser PHP Version 5.2.4-2ubuntu5.10 is still running?!? but I can't use php from the command line because there's no executable. (I have check that edits to php_info.php are shown in the browser). I need to be able to get rid of PHP Version 5.2.4 or reconfigure it --with-mysql. Any suggestions? Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.