4

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.

MaVRoSCy
  • 17,747
  • 15
  • 82
  • 125
Ganesh
  • 64
  • 1
  • 7

2 Answers2

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.

  • Tell me how can i change the "loaded configuaration php.ini" file path? – Ganesh Oct 17 '12 at 11:53
  • You have at least two PHP processors on your system. Have you ever installed distro php-soap extension?[How do I enable --enable-soap in php on linux?](http://stackoverflow.com/questions/11584426/how-do-i-enable-enable-soap-in-php-on-linux) – Michal Schwarz Oct 17 '12 at 15:56
-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.

xdazz
  • 158,678
  • 38
  • 247
  • 274
  • Yes that is correct In my browser showing Configuration File (php.ini) Path /opt/lib Loaded Configuration File (none) when i goto /opt/lib "php.ini" file is not present – Ganesh Oct 16 '12 at 14:42
  • Though i copied the same php.ini file to this location the php version is showing diff and soap is not showing. – Ganesh Oct 16 '12 at 15:07
  • 1
    so what is the solution, if they use the different php.ini files? – V-T Oct 07 '14 at 10:07