Different php versions showing in terminal and browser in ubuntu 11.10

做~自己de王妃 提交于 2019-12-10 15:56:44

问题


when i use php -v in terminal showing

PHP 5.3.6-13ubuntu3.9 with Suhosin-Patch (cli) (built: Sep 12 2012 19:02:11) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

But when i print phpinfo in file and execute that script in browser

I got "PHP Version 5.2.17".

My main problem is soap is not showing in browser but soap is showing in terminal.

How to resolve this problem in ubuntu 11.10.

Thanks in Advance.


回答1:


They use the different php.ini files.

Check them.

For the CLI, use php -i | grep php.ini

For the phpinfo printed in browser, find the Loaded Configuration File.




回答2:


Your web server (probably Apache) is configured with diferent PHP processor then system default.

System processor location (in terminal):

whereis php

PHP can be configured as a CGI module or as a module for Apache. See PHP Installation and Configuration

You can reconfigure web server or use different remote channel to run system PHP proccesor. It depends on your demand. For example SSH.



来源:https://stackoverflow.com/questions/12917099/different-php-versions-showing-in-terminal-and-browser-in-ubuntu-11-10

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!