Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: 20090621-0832 i hope this isn't a repost - i searched and searched, but found nothing. maybe this is expected behaviour. i have the following include_path in my php.ini file, which is the .ini file picked up by php outside of eclipse: ;***** Added by go-pear ; appended by me include_path = ".;C:\Program Files\PHP\pear;C:\Program Files\PHP\smarty\libs" ;***** when i am in the debugger, however, my Smarty.class.php file is not found. why? i see this in the console: PHP Warning: require(Smarty.class.php): failed to open stream: No such file or directory in F:\data\apache\html\smarty\index.php on line 4 PHP Fatal error: require(): Failed opening required 'Smarty.class.php' (include_path='.;F:\data\apache\html\workspace.3.5\smarty') in F:\data\apache\html\smarty\index.php on line 4 so i do a phpinfo(), and i find that eclipse is using a php.ini in a temp directory. Loaded Configuration File => F:\temp\windows\zend_debug\session6646935088367937444.tmp\php.ini Scan this dir for additional .ini files => (none) additional .ini files parsed => (none) i diff this with my own global php.ini, and other than spaces, i find that the new php.ini has included at the top of the file the path referenced directly above, and omitted my own path: include_path=".;F:\data\apache\html\workspace.3.5\smarty" ;***** Added by go-pear ; appended by me ;***** i can work around this by setting the include path explicitly for every project, but that should be unnecessary when there are global libraries to be included on every project. in the PHP Executables option, i did set the php.ini to point to my global php.ini. looks like it's picking it up ok, but just overrriding the include_path. Reproducible: Always Steps to Reproduce: 1.create a new project 2.require a user lib outside the workspace 3.debug or run
Yes, include_path is generated automatically (using your original PHP.ini file as a template) from the Include Path defined on PHP project that you're debugging. So, in order to have Smarty added to the include_path directive setup your PHP project in Eclipse to have Smarty included into Include Path.
(In reply to comment #1) > Yes, include_path is generated automatically (using your original PHP.ini file > as a template) from the Include Path defined on PHP project that you're > debugging. So, in order to have Smarty added to the include_path directive > setup your PHP project in Eclipse to have Smarty included into Include Path. thanks for your response. maybe i wasn't clear. i meant to say that eclipse is picking up my php.ini file, but it's ignoring the include_path in that file. this is in my php.ini: ;***** Added by go-pear ; appended by me include_path = ".;C:\Program Files\PHP\pear;C:\Program Files\PHP\smarty\libs" ;***** this is what ends up in my eclipse php.ini file: include_path=".;F:\data\apache\html\workspace.3.5\smarty" ... ;***** Added by go-pear ; appended by me ;***** in the include_path, the ...\workspace.3.5\smarty is my workspace, with a project named smarty, NOT the smarty library that's included in my global php.ini. hope that clarifies the problem.
I think you misunderstand how this works. "include_path" directive is generated automatically from your Eclipse workspace status, in order to represent one-to-one relation between developing & debugging/running. In order to setup the resulted include_path you need to arrange your project's Include Path properly. It can be achieved using 'right-click' -> Include Path -> ...
(In reply to comment #3) > I think you misunderstand how this works. "include_path" directive is generated > automatically from your Eclipse workspace status, in order to represent > one-to-one relation between developing & debugging/running. In order to setup > the resulted include_path you need to arrange your project's Include Path > properly. It can be achieved using 'right-click' -> Include Path -> ... ok. i wondered if that was expected behaviour. how can i set global includes, then, to be included by all projects automatically? that would be the point of pulling in the global php.ini.
(In reply to comment #4) > (In reply to comment #3) > > I think you misunderstand how this works. "include_path" directive is generated > > automatically from your Eclipse workspace status, in order to represent > > one-to-one relation between developing & debugging/running. In order to setup > > the resulted include_path you need to arrange your project's Include Path > > properly. It can be achieved using 'right-click' -> Include Path -> ... > > ok. i wondered if that was expected behaviour. > > how can i set global includes, then, to be included by all projects > automatically? that would be the point of pulling in the global php. There's no way to specify global includes at this point. Can you report a feature request, if you think it's reasonable to add such a feature? Thanks!
This issue is not Eclipce relevant. Closing... Kalin Yanev kalin.a@zend.com
(In reply to comment #6) > This issue is not Eclipce relevant. > Closing... > > Kalin Yanev > kalin.a@zend.com How is that not Eclipse relevant ???? To what is that relevant then ? I have this problem and don't understand how this is not going to be fixed.
This is should be fixed. On a normal development system using a lamp/ mamp whatever configuration one usually does the main settings in the php.ini - eclipse overwrites the include_path which results in strange behaviour: missing PHPUnit, Zend, Pear and so on. There are two possible solves for this: 1. just append the project directory to include_path 2. include a function for setting global include_paths which can be everywhere on the machine, not limited to the project directory In my opinion the first solution is the best because everything else will be confusing.
this problem is also not limited to one platform: PC Windows XP its a general problem.