Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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
Replies are listed 'Best First'.
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 lurking in the Monastery: (17)
As of 2015-07-28 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls