Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Perl Script running through cPanel

Discussion in 'General Discussion' started by kiteboy, Mar 2, 2017.

  1. kiteboy

    kiteboy Registered

    Joined:
    Mar 2, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Swansea
    cPanel Access Level:
    Website Owner
    Hi all

    Hope im in the right place - apologies for a possibly a simple query - very green to this

    Im trying to run the following perl script

    piwigo.org/doc/doku.php?id=user_documentation:tools:piwigo_import_tree

    the script (Ive named it .pl) but essentialling contains the following

    Code:
    perl piwigo_import_tree.pl --base_url=[URL]http://address/of/your/piwigo[/URL] --user=admin_username --password=?? --directory="my photos directory"
    
    This script is working fine in the command line when the path to it is entered directly in ssh

    However running the exact same command through Cpanel doesnt seem to run at all

    I know Im probably doing something wrong but can anyone offer any advice

    Thanks all
     
    #1 kiteboy, Mar 2, 2017
    Last edited by a moderator: Mar 2, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you elaborate on how you are running the command through cPanel?

    Thank you.
     
  3. kiteboy

    kiteboy Registered

    Joined:
    Mar 2, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Swansea
    cPanel Access Level:
    Website Owner
    Hi - Ive tried setting a cron job and puttting the full path to the file as the command

    So something like www/data/script.pl for example

    Everything I try doesnt seem to run it

    Ive also tried perl www/data/script.pl as the command and many other commands too so not sure which would be the right format to do it
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Try using the full path the Perl script. EX:

    Code:
    perl /home/$username/public_html/cgi-bin/script.pl
    You may also want to move the Perl script to the cgi-bin within the public_html directory and ensure it uses correct file permissions (e.g. 0755).

    Thank you.
     
Loading...

Share This Page