Hi
This is supposed to create a MySQL database called test, using cpanel hosting:
function execCommand($command) {
global $curl_path;
if (!empty($curl_path)) {
return exec("$curl_path '$command'");
}
else {
return file_get_contents($command);
}
}
.
.
.
$curl_path = ""; // coz I don't know how to use this!!
$execute = execCommand("http://cneeds:somepassword@inandrias.com:2082/frontend/x3/sql/adddb.html?db=test");
This returns
[quote]Not Found
The server was not able to find the document (./frontend/x3/sql/adddb.html) you requested.
Please check the url and try again. You might also want to report this
error to your web hosting provider.
cpaneld/11.25 Server at inandrias.com[/quote]
When I make $curl_path = '/usr/bin/curl'; I don't get any errors but I also don't get any database!
I confess that I don't know how to find out where sql is located within the frontend on my server. What would I look for?
I need this in a script because I want to create databases in response to certain user requests. I am able to create them with phpmyadmin but that's not the object here.
Chris