Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » command line debugging
command line debugging [message #57062] Fri, 05 October 2007 14:12 Go to next message
Eclipse UserFriend
Originally posted by: ben.nordin.parivedasolutions.com

I'm having problems debugging cli scripts. I can debug web pages just
fine. I can usually run Zend's command line debugger until I hit a
module that I need loaded. I have tried changing the PHP executable to
Zend Core's, which has the proper modules and configuration. However,
I'm getting an errors because it's trying to read the configuration from
"C:\Windows" instead of the "C:\Program Files\Zend\Core\etc" directory.
How do I change this? Is this even the correct approach?

Thanks for your help.

Ben
Re: command line debugging [message #57112 is a reply to message #57062] Fri, 05 October 2007 15:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Martin.eisengardt.de

Configuration directory might be overwritten inside Apache (PhpIniDir
directive).

have a look at http://www.php.net/manual/en/configuration.php

Did not test it but setting PHPRC environment variable should help. You are
possible to set it within eclipse/ debug configuration at the environment
tab.
Re: command line debugging [message #57138 is a reply to message #57112] Fri, 05 October 2007 16:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ben.nordin.parivedasolutions.com

Martin Eisengardt wrote:
> Configuration directory might be overwritten inside Apache (PhpIniDir
> directive).
>
> have a look at http://www.php.net/manual/en/configuration.php
>
> Did not test it but setting PHPRC environment variable should help. You are
> possible to set it within eclipse/ debug configuration at the environment
> tab.
>
>
No dice. The PHPIniDir directive is not used within my Apache
configuration. Anyways, since this is a CLI problem, I don't see how
Apache is involved.

I ran phpinfo() from eclipse and got the following:
....
Configuration File (php.ini) Path => C:\WINDOWS
....
PHPRC => C:\Program Files\Zend\Core\etc
....


If I run from the cmd.exe command line I get correct results:
....
Configuration File (php.ini) Path => C:\Program Files\Zend\Core\etc\php.ini
....
PHPRC => C:\Program Files\Zend\Core\etc
....


I checked the IniFilePath setting in the registry, and it is correct. I
even tried passing '-c "C:\Program Files\Zend\Core\etc"' as a command
line argument within eclipse. It is still trying to read from
C:\Windows\php.ini.
Re: command line debugging [message #57192 is a reply to message #57138] Fri, 05 October 2007 21:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Martin.eisengardt.de

OK. Do not know why but PDT copies my configuration file and inserts some
things (includes paths etc.). There seems to be no chance to overwrite
configuration directory at cli.


>> Configuration File (php.ini) Path => C:\WINDOWS

>> Loaded Configuration File => C:\Dokumente und
>> Einstellungen\mepeisen\Lokale Einstellungen\Temp\php.ini



This file will be created by PDT. It takes your PHP.ini located near your
PHP.exe. Simply place/copy your correct configuration file within the same
directory (at linux I use a link instead). At command line PHP does use
every environment variable and registry setting (as intended). But PDT
overwrites this with a special manipulated php.ini



I think PDT should respect any environment variable described in PHPs manual
to find the correct file. Maybe You can fill a bug report :-)





Greets

Martin
Re: command line debugging [message #57274 is a reply to message #57192] Mon, 08 October 2007 18:26 Go to previous message
Eclipse UserFriend
Originally posted by: ben.nordin.parivedasolutions.com

Martin Eisengardt wrote:

> This file will be created by PDT. It takes your PHP.ini located near your
> PHP.exe. Simply place/copy your correct configuration file within the same
> directory (at linux I use a link instead). At command line PHP does use
> every environment variable and registry setting (as intended). But PDT
> overwrites this with a special manipulated php.ini
>
> I think PDT should respect any environment variable described in PHPs manual
> to find the correct file. Maybe You can fill a bug report :-)
>

Thanks Martin! Copying the configuration alongside php.exe solves the
problem for me. I reported bug #205754.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=205754

Ben
Previous Topic:Debugging stops with "Error"
Next Topic:problems with zend pdt
Goto Forum:
  


Current Time: Fri Jul 12 09:04:40 GMT 2024

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

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

Back to the top