While I am debugging PHP Script in Eclipse, it doesn't load mysql extension

天涯浪子 提交于 2019-11-28 01:21:30

after struggling with this issue for several hours today, I decided to manually cat all informations inside one single .ini file, and started eclipse with eclipse -clean. something like the following script should do the trick:

#!/bin/bash
mkdir /etc/php5/cli_eclipse
cat /etc/php5/cli/php.ini /etc/php5/conf.d/* > /etc/php5/cli_eclipse/php.ini

(you could obviously check if the dir is already existing etc. but this script is here for illustrative purposes only. you'll need to use a superuser account/sudo to execute this).

point your php runtime in eclipse under window -> preferences -> PHP -> PHP Executables to your created file and restart eclipse once with the -clean flag. pdt should create temporary "php.ini"s containing all necessary information.

The Eclipse PDT team decided to introduce the -n option to fix the Bug #324073. So only php.ini from /tmp/zend_debug/... has been loaded, and all additional INI files have not been loaded.

This has been introduced since PDT 2.2.0 M201010110334 (2010/10/11).

For more information, see the following links:

Try invoke the function described here: http://php.net/manual/en/function.php-ini-loaded-file.php and see if it returns exactly the same path. On Ubuntu as well as on Debian the php configuration is split among many files. Look at the /etc/php5 (or similar path).

As last resort I would write my own config and reference it in the eclipse php run as script configuration and make sure the config includes and references the mysql extension.

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