Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Run Shell Scripts



Threaded Mode | Print  

 Run Shell Scripts (10 Replies, Read 1978 times)
haberman13
Group: Member
Post Group: Newbie
Posts: 9
Status:
Hi all -

I'm attempting to execute a .sh script from install.php:

system('wp-cli.sh');

Where wp-cli.sh resides in the softaculous custom script directory, next to install.php

The shell script never executes however, is there a method for calling non-php scripts that I'm missing in the custom script 'how to' pages?

Thanks!
IP: --   

Run Shell Scripts
haberman13
Group: Member
Post Group: Newbie
Posts: 9
Status:
OK, I found "sshell_exec"

But it won't execute the .sh either, which is basically just doing an "echo 'test' > output.txt"
IP: --   

Run Shell Scripts
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5653
Status:
Hi,

You need to provide the full path to file.
Eg :
Code
system($software['path'].'/wp-cli.sh');


Make sure $software is global.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

Run Shell Scripts
haberman13
Group: Member
Post Group: Newbie
Posts: 9
Status:
Quote From : Brijesh May 2, 2014, 5:53 am
Hi,

You need to provide the full path to file.
Eg :
Code
system($software['path'].'/wp-cli.sh');


Make sure $software is global.


Thank you Brijesh, I did try that before I posted here as well.

I know the __install() function is running, but any of the softaculous commands (swrite) or php (system, exec) won't execute.

Any other ideas?  I have PHP pretty wide open.

I installed softaculous as root however, I'm wondering if that is an issue with php suexec enabled?
IP: --   

Run Shell Scripts
haberman13
Group: Member
Post Group: Newbie
Posts: 9
Status:
The softaculous error log at /var/softaculous is never written to either, so it's nigh impossible tracking down where it's bombing out.
IP: --   

Run Shell Scripts
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5653
Status:
Can you please email me your install.php and install.xml at brijesh[at]softaculous.com i'll check it for you.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

Run Shell Scripts
haberman13
Group: Member
Post Group: Newbie
Posts: 9
Status:
Quote From : Brijesh May 2, 2014, 6:05 pm
Can you please email me your install.php and install.xml at brijesh[atsoftaculous.com i'll check it for you.


Just sent, thanks again!
IP: --   

Run Shell Scripts
haberman13
Group: Member
Post Group: Newbie
Posts: 9
Status:
Here is wp-cli.sh:

#!/bin/sh
echo "hi" > /var/softaculous/wpsetup/output.txt
#/usr/bin/wp menu list --path=/home/$1/public_html/$2 --allow-root > output.txt

IP: --   

Run Shell Scripts
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5653
Status:
Hi,

I just checked the files and it seems to be fine.

Please confirm if the sh file has executable permissions.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

Run Shell Scripts
haberman13
Group: Member
Post Group: Newbie
Posts: 9
Status:
Thanks again Brijesh, I have it worked out - suexec was blocking me.
IP: --   

Run Shell Scripts
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5653
Status:
Hi,

Glad to know your issue was resolved.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 10, 2024, 9:17 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.020