1

I am stuck for 3 days. I used locate php.ini to find all php.ini files and its seem only one in my system, I also used phpinfo to locate and its points to same file. when I run php, its show a its missing shared file for zend debugger extension.

Warning: PHP Startup: `Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20160303/gmp.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20160303/gmp.so: cannot open shared object file: No such file or directory in Unknown on line 0`

I have gone through the php.ini file

locate php.ini
/opt/lampp/etc/php.ini
/opt/lampp/etc/php.ini-pre1.7.2

I found no trace of string for debug extension. How get rid of it. I am also trying to add gmp extension .

php --ini
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20160303/gmp.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20160303/gmp.so: cannot open shared object file: No such file or directory in Unknown on line 0

after running php --ini

  Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20160303/gmp.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20160303/gmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
    Configuration File (php.ini) Path: /opt/lampp/etc
    Loaded Configuration File:         /opt/lampp/etc/php.ini
    Scan for additional .ini files in: (none)
    Additional .ini files parsed:      (none)
Romeo Ninov
  • 709
  • 7
  • 13
user746157
  • 11
  • 1
  • 3

1 Answers1

1

Take a look at Dan's question.

It appears you've somehow ended up with two different versions of PHP installed.

This is why Dan asked how you installed.

My suggestion is however you installed, deinstall PHP completely + start again, only using one installation tool. I'd suggest apt or apt-get only... till you get a working install.

You'll know you've successfully deleted all of PHP when /etc/php is completely empty.

You can refer to Installing Apache-2.4.28 + PHP-5.6 which I posted earlier today about how to install latest stable packages from the Launchpad PPA, which contains latest stable releases.

Since your referencing the /opt/lampp, this indicates you've attempting to use some custom installation tool or method, so you're mixing your custom install with the system install, which is doomed to instability.

This means you should also likely rm -rf /opt/lampp as part of your cleanup process + remove any related systemd files + any other non-apt cruft you've installed + remove any related, system wide, PATH settings.

Mixing install methods tends to either fail completely or randomly during various runtime operations.

Best to only use the normal system install methods, which will never reference /opt/lampp directories.