Hi all, I don't usually dump problems on people but you might be able to save me hours of research in 10 seconds, so here goes.
I run a small hosting company, 3 dedicated servers so far, cpanel on all of them. Very easy to manage, incredible product you have at any price.
I had a PHP script running on a server with php4 and mysql4, moved the entire site to php5 Mysql5. Script worked fine before, it's obviously not connecting to the cpanel now. Basically it creates a MySQL db, creates a user, and adds the user to the database. I'm open to any alternate method of doing this. Thank you!
Pertinent portions:
And the previously working portion:Code:function execCommand($command) { global $curl_path; if (!empty($curl_path)) { return exec("$curl_path '$command'"); } else { return file_get_contents($command); } }
Code:if(isset($board_name) && !empty($board_name)) { $db_name = strtolower($board_name); $result = execCommand("http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/adddb.html?db=$db_name"); } if(isset($board_name) && !empty($board_name)) { $db_username = substr($db_name, 0, 7); $db_userpass = $_GET['pass']; $user_name = $_GET['user']; $user_email = $_GET['email']; } if (!empty($db_username)) { $result .= execCommand("http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/adduser.html?user=$db_username&pass=$db_userpass"); $result .= execCommand("http://$cpanel_user:$cpanel_password@$cpanel_host:2082/frontend/$cpanel_skin/sql/addusertodb.html?user=wowultra_$db_username&db=wowultra_$db_name&ALL=ALL"); }


LinkBack URL
About LinkBacks
Reply With Quote
.
