Page 1 of 1
Location of PHP script to run external command
Posted: Thu Dec 29, 2005 12:17 pm
by anjanesh
Hi
I need to
create a domain using Plesk API - calling the command line
./domain.sh in PHP.
exec ? If so where ? Which location ? I got root access to a dedication server using Fedora Core Linux.
Thanks
Posted: Thu Dec 29, 2005 2:27 pm
by Chris Corbyn
Do you extract a directory containing that file at some point?
Anyway...
Code: Select all
locate domain.sh #or .....
find /* -name 'domain.sh' -print
Posted: Thu Dec 29, 2005 2:37 pm
by anjanesh
domain.sh is in
/usr/local/psa/bin
I have a one-line php code
Where do I place this php code and how do I run this ? Its not necessary that I got to enter a url - entering the command in
Putty is fine.
In the latter case would the 1st line be something like
#!/usr/bin/php ?
Posted: Wed Jan 04, 2006 7:40 am
by dude81
Hello,
There is default plesk document root. Generally it is
Code: Select all
/home/httpd/vhosts/default-host/<file.php>
Access this php file on the web-browser on plesk port.
I dont remember the entire path but Im sure default is in /home/httpd/vhost.
Inside this you find configuration files of plesk
Posted: Wed Jan 04, 2006 8:04 am
by anjanesh
Access this php file on the web-browser on plesk port.
Ah...Thank you very much
dude81 - that was very helpful info.