Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Passing PHP objs to PHP instantiate with PHP::Interpreter

by suaveant (Parson)
on Apr 15, 2010 at 19:39 UTC ( #834958=perlquestion: print w/ replies, xml ) Need Help??
suaveant has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use PHP::Interpreter to access a php lib from Perl and having some issues.

I am able to instantiate a new php obj:

my $obj = $php->instantiate('MDG_ApplicationLogin');
but when I try to pass that object to another object:
my $ctx = $php->instantiate('MDG_Context',$obj);
I get Fatal error: Exception thrown without a stack frame in Unknown on line 0

I assume this has something to do with the translations, anyone know of a solution?

                - Ant
                - Some of my best work - (1 2 3)

Comment on Passing PHP objs to PHP instantiate with PHP::Interpreter
Select or Download Code
Re: Passing PHP objs to PHP instantiate with PHP::Interpreter
by cdarke (Prior) on Apr 16, 2010 at 08:31 UTC
    Probably a problem with the php exception handler, in particular in getting a second exception after trying to handle an exception. See the PHP manual for set_exception_handler(), in particular the user contributed notes.
      Thanks, but I think the root of the problem is that when I pas an object to a call PHP::Interpreter isn't turning it back into a PHP object properly, I did a little test and I seem to get a string with the object name instead of an object.

                      - Ant
                      - Some of my best work - (1 2 3)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://834958]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2014-12-29 04:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls