| Summary: | add "Use system default php.ini configuration" in EXE prefs | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Jacek Pospychala <jacek.pospychala> |
| Component: | PDT | Assignee: | Dawid Pakula <zulus> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | andy.pillip, aneganov, daniel, daniele.liberti, eclipse, eclipse, fgm, jerico.dev, jmdelehaye, kubo, normproffitt, s.j.small, silviya, tobias, tomac120, walkinraven, zulus |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 350978 | ||
|
Description
Jacek Pospychala
Same problem here, on PC Ubuntu Maverick and PDT Helios SR2 build 20110301-1815 I don't think that adding an option is the best solution. That would expose the end user to a cryptic workaround for an internal problem and make the interface unnecessarily difficult to understand and use. Apart from that the Eclipse GUI already has a solution for "using the system php.ini": The "PHP Executable" preferences screen let's the user set an optional php.ini explicitly. AFAICS not setting this parameter should use the system configuration compiled into the php executable. This obviously includes files added via the "--with-config-file-scan-dir" compile option (e.g. conf.d in the case of Debian/Ubuntu). Adding -n in this case is a bug. If Eclipse needs to add ini options via a temporary ini file at runtime then Eclipse should make sure that it properly concatenates all ini files that have been specified at compile time to the temporary php.ini file including those specified via "--with-config-file-scan-dir". This information can be extracted via "php --ini" and should therefore be readily available to Eclipse. I created bug 347618 to really point out the problem here. @Andy: Why creating another duplicate rather than making your comment here? Andy Philip wrote: Build Identifier: 20110301-1815 On Linux systems with some packaging system (so all Linux systems) there often are several configuration files for one software, on Debian/Ubuntu mostly in conf.d directories. Eclipse PDT doesn't take care of those so called additional .ini files. This leads to modules being not loaded, and impossible debugging, since xDebug is also a module not being loaded. A normal php -i on the command line gives: Scan this dir for additional .ini files => /etc/php5/cli/conf.d While the execution of phpinfo() from eclipse gives: Additional .ini files parsed => (none) There's two bugs mentioning this problem, but neither is really pointing out this problem: 324073 and 339547. Reproducible: Always Steps to Reproduce: 1. Create a new PHP executable without specifying a .ini file 2. Create a PHP file calling phpinfo(); 3. Run or debug and check the output for ''Scan this dir for additional .ini files'' 1. Run ''php -i | grep additional'' on command line 2. Compare the result @PDT-Team: I tried to mark 347618 as a duplicate of this bug but I don't have permission to do so. (In reply to comment #4) > @Andy: Why creating another duplicate rather than making your comment here? I did so because this bug has a whole different topic — I didn't expect to find my problem under this headline. Agreed. The topic is misleading. It seems that we mere mortals are not allowed to change the topic, though. Can someone sufficiently privileged please change the topic to something similar to Andy's bug report and close that other report as a duplicate of this one? Just for the record... The ugly workaround, for the time being, is to simply to merge all subconfigurations into the main one. # cp /etc/php5/cli/php.ini /etc/php5/cli/php.ini.orig # cat /etc/php5/cli/conf.d/* >> /etc/php5/cli/php.ini This workaround also works: using a shell script to run PHP without the parameter that prevents Eclipse from parsing .ini files. Just set the script as your PHP executable on the Eclipse prefs. #!/bin/sh if [ $1 = "-n" ]; then shift; fi /usr/bin/php $* Running Indigo+Php+Xdebug for months now. I have to install PDT always working, but now I have this error. "You cannot use both -n and -c switch. Use -h for help." How can I fix it THX ;-) I tried both solutions listed here and neither one worked.
Really annoying to have to run what should be a CLI script through the remote debugger.
Version: 3.7.0
Build id: I20110613-1736
PHP Development Tools (PDT) Source Feature 3.0.0.v20110516-1100-7V--F8NcJTTK4UE9TTJJ org.eclipse.php.source.feature.group Eclipse.org
(In reply to comment #9) > This workaround also works: using a shell script to run PHP without the > parameter that prevents Eclipse from parsing .ini files. > > Just set the script as your PHP executable on the Eclipse prefs. > > > > #!/bin/sh > if [ $1 = "-n" ]; then > shift; > fi > /usr/bin/php $* > > > Running Indigo+Php+Xdebug for months now. This has resolved the issue. Thank you very much, Daniel. @Adrian Noland Strange it doesn't work for you. Are you sure your php-launching script was really invoked. Consider rechecking debug configuration. @Nolan, try running once eclipse -clean It did not work for me until I did this. Also, whoever is managing this bug, why has it not been fixed? It is stupid to use a hack to run the debugger and makes me think that PDT is unstable. I am frightened to upgrade to new versions of eclipse if I find that I loose functionality! I don't know anything about java, but it seems like a simple fix for an experienced developer! I mean the solution of conf.d/* >> ... worked after the clean, but the shell script would not execute for me. It's been almost 2 years since this bug was first opened and almost 4 months since the last comment. I know there's a work around but it's a bit of a hack. Is there any plan to fix this bug in the PDT 2.2.x code base? Some of us are required to stay on Helios by our corporate overlords so upgrading to PDT 3.x is not an option. I don't know why only 8 votes till now?! And PDT 3.0.1 have the same bug, not only 2.2.x *** Bug 347618 has been marked as a duplicate of this bug. *** Patch is ready for review: https://git.eclipse.org/r/#/c/22973/ Patch applied to master: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=5fe2e021ca48ff3475fcd001c3f8d6faf414aee9 Installed eclipse luna yesterday (using kepler with pet 3.2.0.201306051924 before). Seems, this bug is contained in version 3.3 of pdt again. Running phpinfo() as a cli application with Xdebug in Kepler prints: Configure Command => './configure' '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--infodir=/opt/local/share/info' '--program-suffix=54' '--includedir=/opt/local/include/php54' '--libdir=/opt/local/lib/php54' '--with-config-file-path=/opt/local/etc/php54' '--with-config-file-scan-dir=/opt/local/var/db/php54' '--disable-all' '--enable-bcmath' '--enable-ctype' '--enable-dom' '--enable-fileinfo' '--enable-filter' '--enable-hash' '--enable-json' '--enable-libxml' '--enable-pdo' '--enable-phar' '--enable-session' '--enable-simplexml' '--enable-tokenizer' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-bz2=/opt/local' '--with-mhash=/opt/local' '--with-pcre-regex=/opt/local' '--with-libxml-dir=/opt/local' '--with-zlib=/opt/local' '--without-pear' '--disable-cgi' '--enable-cli' '--disable-fpm' '--with-libedit=/opt/local' Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /opt/local/etc/php54 Loaded Configuration File => /private/var/folders/yk/9cwvfm450xv6l7kq1n7rpdlm0000gn/T/zend_debug/session1749734869218096402.tmp/php.ini Scan this dir for additional .ini files => /opt/local/var/db/php54 where as running the same configuration within luna (pdt 3.3.0.201406110111) prints: Configure Command => './configure' '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--infodir=/opt/local/share/info' '--program-suffix=54' '--includedir=/opt/local/include/php54' '--libdir=/opt/local/lib/php54' '--with-config-file-path=/opt/local/etc/php54' '--with-config-file-scan-dir=/opt/local/var/db/php54' '--disable-all' '--enable-bcmath' '--enable-ctype' '--enable-dom' '--enable-fileinfo' '--enable-filter' '--enable-hash' '--enable-json' '--enable-libxml' '--enable-pdo' '--enable-phar' '--enable-session' '--enable-simplexml' '--enable-tokenizer' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-bz2=/opt/local' '--with-mhash=/opt/local' '--with-pcre-regex=/opt/local' '--with-libxml-dir=/opt/local' '--with-zlib=/opt/local' '--without-pear' '--disable-cgi' '--enable-cli' '--disable-fpm' '--with-libedit=/opt/local' Server API => Command Line Interface Virtual Directory Support => disabled Configuration File (php.ini) Path => /opt/local/etc/php54 Loaded Configuration File => /private/var/folders/yk/9cwvfm450xv6l7kq1n7rpdlm0000gn/T/zend_debug/session793981124985615958.tmp/php.ini Scan this dir for additional .ini files => (none) Do we need to re-open this bug again? You have to modify your php executable configuration, and check "use system default php.ini configuration" [1] [1] - https://wiki.eclipse.org/File:Pdt_executables.png (In reply to Dawid Pakula from comment #21) > You have to modify your php executable configuration, and check "use system > default php.ini configuration" [1] > > [1] - https://wiki.eclipse.org/File:Pdt_executables.png Thank you. Checking "using system default php.ini configuration" and removing the optional entry for "PHP ini file (optional)" helped convince Eclipse/xdebug to scan additional files (I was sure to have tried this before... ;-) Configuration File (php.ini) Path => /opt/local/etc/php54 Loaded Configuration File => /private/var/folders/yk/9cwvfm450xv6l7kq1n7rpdlm0000gn/T/zend_debug/session2478732159779610947.tmp/php.ini Scan this dir for additional .ini files => /opt/local/var/db/php54 Verified. Option available and works. Closing |