Perl Script running through cPanel

kiteboy

Registered
Mar 2, 2017
3
0
1
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
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
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
Hello,

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

Thank you.
 

kiteboy

Registered
Mar 2, 2017
3
0
1
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
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.