Has anyone had any experience with this? I have a bunch of perl functions that were written by several of my Perl coworkers. I need to use them in my PHP as I don't want to rewrite them. I don't want to re-invent a wheel that is working just fine 🙂.

Anyway, we've been to http://www.zend.com/php5/articles/php5-perl.php and followed the instructions there. When I try to execute my script, I get a fatal error: Class 'Perl' not found in... Here's what I have:

 1    <?php
 2    $USERID = $_SERVER['PHP_AUTH_USER'];
 3    ob_start();
 4    $perl = new Perl();
 5    $perl->eval('
 6      use e::common::SECURITY;
 7      my $level = &get_auth_lvl($USERID,"pss");
 8      if (!$level) {
 9        &dispay_access_denied();
10      }
11    ');
12    ob_end_clean();
 

Fatal error: Class 'Perl' not found in /data/web/html/pss/logon/telephone_deploy_3.php on line 4

Any ideas?

    Assuming that perl is installed, have you checked that the PECL extension has been installed properly (i.e., does it appear in get_loaded_extensions())?

      I think they have. This is the first time we've tried to do this. Here's what we have:

      Sun Server
      Linux
      Apache 2
      php 5
      perl 5.8.5

      I'll ask the dba about PECL

        Is there anything I should be looking at from phpinfo() that might give me some direction?

          echo "Does it appear in get_loaded_extensions()?";

            echo "Does it appear in get_loaded_extensions()?";

            It does not show up. The dba is doing a bit more research and is getting close to getting it to work, I hope. I left early yesterday when I got my 80 hours in for the pay period, so I don't know what happened after that. The instructions on the zend site are a bit sketchy to say the least. There are 3 of us woking on it and all have read the article numerous times to try to find what we're missing. Hopefully come Monday morning, it will be working and I can finally put this project into production and move on to new things 🙂

            Thanks,
            Alisa

              adavis wrote:

              It does not show up.

              In that case, as dream.scape says, it needs installing.

                right. Perl was installed (because we've been using it since the beginning), but wasn't done correctly so that PHP could talk to it. That was what they were doing on Friday when I left. The dba had gotten it to work marginally, but I was still getting an error message. Dont remember what it was now. I've slept since then 🙂

                  You never did look at that link dream.scape provided, did you? Probably didn't even read the post.

                    yes, I read all the posts, but I sent the link to the dba for her to read as I was going home. I think that is what she was working on when I was leaving. I just didn't want to stick around and give the company extra hours since I can only get paid for 80 hours and I'd already done that.

                    Nice thing to say to someone on their birthday. gee thanks a lot. you really hurt my feelings

                      Well, you're the one who kept saying that Perl is installed when no-one was saying it wasn't (or even talking about it).

                        Write a Reply...