I have problem a problem in making a php file run because of the error
Cannot redeclare _pear_call_destructors() in /usr/share/pear/PEAR.php on line 777
After investigation i found that only way make it run is to make changes in PHP settings
include_path = “.:/usr/share/php” to
include_path = “.”
But i am unable to find this
include_path = ".:/usr/share/php"
in my php.ini file. Which other files might i find this path?
From the top of my head there are three ways you can set the include path in a script, to access this setting, in php.ini do a search for
include_path. Make sure you target the proper .ini file! Some setups have multiple .ini’s.phpinfo()is your friend to identify the proper .ini location. If you have access to shell, easily grab all your ini info with:If this .ini config change is not working out for some reason, you can try using set_include_path or ini_set functions at the top of your script to redeclare your include path. Here is an example partly ripped from php.net:
Good-luck, happy coding.
PS: If you are using custom pear packages that you downloaded, either remove pear package from your OS with package-manager or override include_path with
set_include_pathorini_setto prevent the pear that came with your distro from loading.