开发者

Compiling PHP 5.1.6 from source - php -v and phpinfo() version discrepancy

I have just bought a VPS running Ubuntu and I need to install the LAMP stack with PHP 5.1.6. The VPS came with no PHP installed (checked this from the shell with php -v) and with Apache/2.2.12 installed. I installed PHP 5.1.6 from source and compiled it with Apache 2.2 (using libapache2-mod-php5), tried a phpinfo() test which worked fine, however, phpinfo() shows the PHP version as 5.2.1 (with JSON enabled), whereas running php-v in the shell sho开发者_开发知识库ws as 5.1.6. Anyone any ideas what might be happening here? I need to ensure I am running PHP 5.1.6.

Thanks in advance for any help!


php -v gives you the version of the cli installation of php, while phpinfo will give you the version which got installed as apache module.

If you are not using cli php anywhere, you should be fine with running php scripts off apache. But ideally you should fix this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜