Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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)

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?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2022-10-05 21:05 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (25 votes). Check out past polls.