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

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.

Leave a Comment