+ Reply to Thread
Results 1 to 5 of 5

Thread: Running perl from php page ??

  1. #1
    gontham is offline x10Hosting Member gontham is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    2

    Exclamation Running perl from php page ??

    Hello,

    i am trying to call my perl script from a php page, the perl script works fine when i call it from the browser, but when i call it from my test.php page i get this error:

    Fatal error: Class 'Perl' not found in /home/a8346115/public_html/test.php on line 43


    I read that i should install the perl extension for php but that requires me to change the php.ini file, which i don't seem to have access to.

    i am calling the script with this:

    <?php

    print "Hello from PHP! ";
    $perl = new Perl();
    $perl->require("./cgi-bin/test.pl");
    print "Bye! ";

    ?>

    Any help would be appreciate it,
    Thank you

  2. #2
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Running perl from php page ??

    the phpinfo() function is currently disabled, so I can't check if the perl extension is installed. Right now, I believe it isn't. You're right about installing it, only an admin who has access to php.ini and the php installation directory can fix this.
    Last edited by garrettroyce; 06-27-2009 at 09:36 AM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  3. #3
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Running perl from php page ??

    What you could do, is use cURL or url_fopen to get the output of the script and then print it.

    I know it's not the best option, but since you have no access to the php.ini file.

    Finally, when you post source code in these forums, enclose it within [code], [php] or [html] tags (whichever is most appropriate) to make it easier to read.
    Last edited by xav0989; 06-27-2009 at 09:48 AM.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  4. #4
    nirajkum is offline x10 Sophmore nirajkum is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    161

    Re: Running perl from php page ??

    Set the perl path . As it is not able to find the perl and enable the phpinfo() function

  5. #5
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Running perl from php page ??

    Quote Originally Posted by nirajkum View Post
    Set the perl path . As it is not able to find the perl and enable the phpinfo() function
    the PHP perl class and the phpinfo() function are set at the admin level and can't be changed by users. It is giving an error before it even tries to find the perl file.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

+ Reply to Thread

Similar Threads

  1. php in shtml page
    By driveflexfuel in forum Programming Help
    Replies: 5
    Last Post: 12-08-2008, 07:58 PM
  2. PHP Uprgrade Please - Error On Account Page
    By neon8100 in forum Free Hosting
    Replies: 0
    Last Post: 11-23-2008, 02:37 PM
  3. PHP login page
    By ivica178 in forum Programming Help
    Replies: 11
    Last Post: 03-14-2008, 11:23 PM
  4. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  5. PHP Easter Eggs
    By dragoneye_xp in forum Off Topic
    Replies: 3
    Last Post: 06-14-2006, 05:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers