Skip Menu |
 

This queue is for tickets about the PHP-Interpreter CPAN distribution.

Report information
The Basics
Id: 20700
Status: new
Priority: 0/
Queue: PHP-Interpreter

People
Owner: Nobody in particular
Requestors: derek [...] ximbiot.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: redirecting output and debugging
Date: Wed, 26 Jul 2006 12:34:09 -0400
To: bug-php-interpreter [...] rt.cpan.org
From: "Derek R. Price" <derek [...] ximbiot.com>
Download (untitled) / with headers
text/plain 1.8k
Hello, I just started playing around with PHP::Interpreter. I spent about a day getting it to compile and install correctly, but now that it is loading properly, I'm having some trouble getting it to do what it says it will. My first problem is that include() does not provide useful error traces. I started by just trying to include a complex php program (that I know works from mod_php & Apache) and the only error message I could get was "error including index.php". Is there some way to get more useful debugging information out of the interpreter? Working around this, I moved back to a simple hello world php script. Run from a command line, a simple script that just instantiated a PHP::Interpreter and included my hello.php worked, outputting "hello world!" to the command line. I then tried to use the OUTPUT argument to PHP::Interpreter::new, like this: $p = PHP::Interpreter->new ('OUTPUT' => \$content); I also tried an anonymous subroutine reference instead of \$content. Neither sent the interpreter's output anywhere but STDOUT. Working around *this*, I tweaked hello.pl to fork, with the parent reading from its child's STDOUT into a scalar, then printing it. This worked. So, I then tried to do the same thing from a mod_perl script running in Apache. Everything compiles and appears to run (I no longer get the "error including..." error), but the interpreter does not appear to be generating any output! Sorry about the exclamation point. I'm getting a little bit frustrated. Any pointers would be appreciated. I'm not sure I want to learn a whole lot more about the Perl C bindings right now, but if these are bugs and I can help debug via correspondence, I'll do what I can. Thanks, Derek -- Derek R. Price CVS Solutions Architect Get CVS support at Ximbiot <http://ximbiot.com>! v: +1 248.835.1260 f: +1 248.835.1263 <mailto:derek@ximbiot.com>


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.