failed openning '../include.inc.php' [message #52251] |
Mon, 17 September 2007 12:13  |
Eclipse User |
|
|
|
I have a problem running a script from eclipse / xdebug. Script
otherwise works fine on the server and evrywhere else. Problem is trying
to include a file from parent folder, ie line with
require_once '../include.inc.php';
This works fine from ZDE, from php.exe and on the server, from eclipse
it complains that it can't find the file, and I have to rewrite it using
dirname(dirname(__FILE__)) acrobatics.
I'm using milestone 3 and xdebug from all-in-one package, and trying to
do Debug as->Php script.
|
|
|
|
Re: failed openning '../include.inc.php' [message #52494 is a reply to message #52413] |
Tue, 18 September 2007 05:14   |
Eclipse User |
|
|
|
Hi Bogdan, you are correct, the Xdebug launcher sets the working directory
to the project root (similar to a java launch which sets the default working
directory to the project root), but if you use the zend debugger it does
something different.
There needs to be a common launch environment for different debugger launches
so they behave in the same way. The other thing that is needed is to
allow the launch to configure the working directory. This is an enhancement and
I will raise this on bugzilla.
Many thanks for highlighting the issue.
Dave Kelsey
Bogdan Ribic wrote:
> Sorry to reply to myself :)
>
> This only happens when trying to run a file from a subfolder. Problem
> is that eclipse tries to execute the file while current directory is set
> to project root, and not one where file is. If I add
> chdir(dirname(__FILE__)) to start of script, it will work correctly and
> find the file.
>
> I'm pretty sure this is not a feature, so where do I report the bug ?
>
> Boban.
>
> Bogdan Ribic wrote:
>> I have a problem running a script from eclipse / xdebug. Script
>> otherwise works fine on the server and evrywhere else. Problem is
>> trying to include a file from parent folder, ie line with
>>
>> require_once '../include.inc.php';
>>
>> This works fine from ZDE, from php.exe and on the server, from eclipse
>> it complains that it can't find the file, and I have to rewrite it
>> using dirname(dirname(__FILE__)) acrobatics.
>>
>> I'm using milestone 3 and xdebug from all-in-one package, and trying
>> to do Debug as->Php script.
|
|
|
Re: failed openning '../include.inc.php' [message #52601 is a reply to message #52494] |
Tue, 18 September 2007 09:12   |
Eclipse User |
|
|
|
Dave,
I already submitted a bug report, bug id 203668
https://bugs.eclipse.org/bugs/show_bug.cgi?id=203668
Btw, I noticed another one, about launch history and not checkign launch
settings (wether to execute openned file or to execute last launched).
More specificaly, pressing F11 will launch last file I added to the
history, not the last one I executed with debug as -> php script.
I'd appreciate a way to just execute / debug the script that's openned
in editor. Will make a bug report for that too :)
Boban
Dave Kelsey wrote:
> Hi Bogdan, you are correct, the Xdebug launcher sets the working directory
> to the project root (similar to a java launch which sets the default
> working
> directory to the project root), but if you use the zend debugger it does
> something different.
>
> There needs to be a common launch environment for different debugger
> launches
> so they behave in the same way. The other thing that is needed is to
> allow the launch to configure the working directory. This is an
> enhancement and
> I will raise this on bugzilla.
>
> Many thanks for highlighting the issue.
>
> Dave Kelsey
>
|
|
|
Re: failed openning '../include.inc.php' [message #52627 is a reply to message #52601] |
Tue, 18 September 2007 10:00   |
Eclipse User |
|
|
|
Bogdan,
I see in the bug you raised, you also refer to an editor problem. I will
add a comment that the issue with xdebug is covered by an enhancement to PDT
and that the defect is only about the editor not linking.
Pressing F11 is not a defect but a new "feature" of eclipse 3.3. You can change this
behaviour to work in the manner you want by going to preferences in the
Launching tab under "Run/Debug" change Launch Operation to
Always Launch the previously launched application.
You should be able to just execute/debug the script that is in the editor
just bring up the pop up menu in the file you are editing and select
Run as-->PHP Script.
Cheers
Dave Kelsey
Bogdan Ribic wrote:
> Dave,
>
> I already submitted a bug report, bug id 203668
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=203668
>
> Btw, I noticed another one, about launch history and not checkign launch
> settings (wether to execute openned file or to execute last launched).
> More specificaly, pressing F11 will launch last file I added to the
> history, not the last one I executed with debug as -> php script.
>
> I'd appreciate a way to just execute / debug the script that's openned
> in editor. Will make a bug report for that too :)
>
> Boban
>
> Dave Kelsey wrote:
>> Hi Bogdan, you are correct, the Xdebug launcher sets the working
>> directory
>> to the project root (similar to a java launch which sets the default
>> working
>> directory to the project root), but if you use the zend debugger it does
>> something different.
>>
>> There needs to be a common launch environment for different debugger
>> launches
>> so they behave in the same way. The other thing that is needed is to
>> allow the launch to configure the working directory. This is an
>> enhancement and
>> I will raise this on bugzilla.
>>
>> Many thanks for highlighting the issue.
>>
>> Dave Kelsey
>>
|
|
|
Re: failed openning '../include.inc.php' [message #52733 is a reply to message #52627] |
Tue, 18 September 2007 11:05  |
Eclipse User |
|
|
|
Dave Kelsey wrote:
>
> Pressing F11 is not a defect but a new "feature" of eclipse 3.3. You can
> change this
> behaviour to work in the manner you want by going to preferences in the
> Launching tab under "Run/Debug" change Launch Operation to
> Always Launch the previously launched application.
I tried that, these settings are pretty much ignored. I submitted
another bug report, with longer explanation of what happens.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=203761
also, F11 behavior is not consistent with that in java mode, where F11
will launch last launched configuration, not last one added to launch
config list.
And I have couple complaints about code formatting with heredoc (adding
{$something} makes it attempt to indent heredoc string and couple more
oddities) and indenting blocks that are not inside braces,
refactor->rename does nothing... but will submit these some other time :)
.... trying to leave ZDE for good.
Boban.
|
|
|
Powered by
FUDForum. Page generated in 0.03944 seconds