Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » include_path different in Eclipse than via CLI(Eclipse doesn't have /usr/share/php, for instance)
include_path different in Eclipse than via CLI [message #666078] Tue, 19 April 2011 00:39 Go to next message
sneakyimp Mising name is currently offline sneakyimp Mising nameFriend
Messages: 41
Registered: December 2009
Member
Can anyone tell me why the exact same script reports a different include_path ini value when I run it in Eclipse PDT versus when I run it from the command line?

For example, I Opened up Eclipse PDT and created a new PHP file containing only this code:

<?php
$str = ini_get('include_path');
die($str);
?>

In Eclipse/PDT, I choose RUN -> RUN and my script outputs this:
.:/home/sneakyimp/project

If I cd to the directory where I have created that script and run it via CLI like this:
cd /home/sneakyimp/project
php my_file.php

then it outputs this:
.:/usr/share/php:/usr/share/pear

Can anyone explain why that is? Can I change this behavior so my scripts truly run with the CLI include_path ?

Re: include_path different in Eclipse than via CLI [message #666135 is a reply to message #666078] Tue, 19 April 2011 09:10 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro IzumiFriend
Messages: 360
Registered: July 2009
Location: Japan
Senior Member
Bug 301031 - Run as PHP Script does not use include_path from php.ini file
Re: include_path different in Eclipse than via CLI [message #666540 is a reply to message #666135] Wed, 20 April 2011 19:46 Go to previous messageGo to next message
sneakyimp Mising name is currently offline sneakyimp Mising nameFriend
Messages: 41
Registered: December 2009
Member
Thanks for that. I do have my configuration accessing one particular php.ini file and it seems to be limping along.

HOWEVER, on Ubuntu there is not a single php.ini file but rather a conf.d directory which has perhaps a dozen distinct php.ini files which are all included. As far as I can tell, it is only possible to include one ini file. You cannot list numerous ones.

Perhaps more importantly, I'm wondering if there is some way to simply use whatever the default php configuration is on the current system. I realize it's important to emulate specific php environments sometimes, but I'd like to just use whatever is currently in effect on my machine as a matter of convenience.

Re: include_path different in Eclipse than via CLI [message #666780 is a reply to message #666540] Fri, 22 April 2011 13:28 Go to previous messageGo to next message
Toshihiro Izumi is currently offline Toshihiro IzumiFriend
Messages: 360
Registered: July 2009
Location: Japan
Senior Member
About additional .ini files,
Bug 324073 - Reading system-wide php.ini by PHP execs leads to segfaults
Bug 339547 - add "Use system default php.ini configuration" in EXE prefs
Re: include_path different in Eclipse than via CLI [message #666832 is a reply to message #666078] Fri, 22 April 2011 21:41 Go to previous message
sneakyimp Mising name is currently offline sneakyimp Mising nameFriend
Messages: 41
Registered: December 2009
Member
Thanks! That bug is precisely what I was asking about.

I just confess that the discussion of the command-line stuff (-c versus -n) doesn't make a lot of sense to me. I'm familiar with command line usage of PHP but don't really have any idea where to find the command line specification in Eclipse -- I'm very new to Eclipse.

I'll be checking the help files some more for a workaround Sad
Previous Topic:Is there a possibility for code completion in Untitled PHP file, Remote PHP files and so on
Next Topic:Looking for someone to host PDTWiki
Goto Forum:
  


Current Time: Fri Apr 19 08:56:25 GMT 2024

Powered by FUDForum. Page generated in 0.02397 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top