Discussion:
[PHP-INSTALL] 5.2 CGI setup along with 5.3 mod_php5 setup supports 5.3 functions?
Matthias Burtscher
2011-12-19 15:29:45 UTC
Permalink
Hey all,

I recently set up my web server to run PHP 5.2 as CGI parallel to my
5.3 mod_php5 from the Ubuntu repositories. I compiled PHP to
/opt/php-bin/php-5.2 directory. When i execute a PHP file from the
console using "./php -f test.php" only PHP 5.2 functions are supported
(I use lclower() as an example). But when I call a PHP script through
Apache, my PHP 5.2 setup supports PHP 5.3 functions. How is that?

Example:
<?php
echo phpversion(); // 5.2.1
echo lclower("Test"); // works and prints "test" when called via
Apache CGI, does not work from command line

How can these two installations be separated completely?

Thanks for your help in advance!

Best,
Matthias

Loading...