question - includes in files |
Site Admin
|
In case of cron-driven scripts, you run them using php cgi executable, I mean the case when no WEB server involved. In this case you can not use URL with appropriate arguments to request debug session.
So you can add DebugBreak() function call in the location where you want to start debugging. There is no other way to run debug session with remote CGI script. PHPEd projects are useless in this case. Using projects you can run either WEB-driven scripts (via URL) or local (you see _local_) CGI scripts. |
||||||||||||
|
Clarity |
Veteran
|
Hi Dmitri,
sorry I wasn't clearer. The script is executed both by the web server (regular web access) and by the php cgi (through cron), which explains the absolute path include. Of course, I could always hack around the includes with some checks in the code, but it wouldn't be ideal. It would seem a pretty natural thing for phpED to do to apply project mappings to includes and requires... Martin |
||||||||||||
|
Site Admin
|
But, really phped has this feature available on the mapping tab in the project settings.
|
||||||||||||
|
Hmmm... |
Veteran
|
I don't think we understand one another;
Say I have a file from a linux remote server with: <? include( "/usr/local/htdocs/website/include_file.php" ); ?> Project mapping: URL: mywebserver Remote Root: /usr/local/htdocs/website/ And local files are in C:\projects\website\ What would be nice is to be able to debug this script with local CGI or SRV, but the local parser chokes on the include because it does not recognize the path. Basically, I'd like it to look for any "Remote Root" paths from include/require statements and replace them internally before passing these paths to the parser by local file paths such that as far as php is concerned, the include from above would look like: include( "C:\projects\website\include_file.php" ); ...and this would only happen with CGI or SRV, of course. Am I making sense? Tx, Martin |
||||||||||||
|
Re: Hmmm... |
Site Admin
|
Actually, mapping makes sense while you're in HTTP/remote mode. ONLY. For both CGI and SRV it does not make any sense. So if you want to run your script on remote host you'd set HTTP/remote mode. You don't need any additional setting for your project since include_file.php is already under the project's remote root and therefore will be mapped to C:\projects\website automatically. Reverting back to CGI/local SRV modes. In this case neither dbg nor phped can help because php itself tries to find the target file in /usr/local/htdocs/website/include_file.php and certainly fails. |
||||||||||||||
|
question - includes in files |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by