Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 23rd August 2010, 18:32
Mosquito Mosquito is offline
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
Default API Call sites_database_add

I'm having an issue with 'sites_database_add'. I can get it to add a DB without any issue. I can see it and connect to it via phpMyAdmin. But, when I try to do a mysql_connect call, I get this error:

PHP Warning:  mysql_connect(): Access denied for user 'c7testAPI'@'localhost' (using password: YES)
These are the parameters I'm passing:
$params = array(
			'server_id' => 1,
			'type' => 'mysql',
			'database_name' => 'c7testAPI',
			'database_user' => 'c7testAPI',
			'database_password' => 'test',
			'database_charset' =>  'utf8',
			'remote_access' => 'n', // n disabled - y enabled
			'active' => 'y', // n disabled - y enabled
			'remote_ips' => ''
Did I miss something?
Reply With Quote
Sponsored Links
Old 24th August 2010, 07:49
till till is offline
Super Moderator
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts

If you can connect to it with phpmyadmin with the c7testAPI user, then it is a problem of your test script and not the remoting script as phpmyadmin is a php application that connects to the databse too.
Till Brehm
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Old 24th August 2010, 16:39
Mosquito Mosquito is offline
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts

Is there a delay between the time the API call is made and is returned and the time the database is created?

I am creating the DB and right after attempting to connect to the new DB. That is when it fails.

EDIT: To answer my own question - Yes, there is a delay. Put the script to sleep for a minute and it connects just fine.

Last edited by Mosquito; 24th August 2010 at 16:44.
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig API eKg General 5 12th July 2011 16:34
Does linux lvm(logic volum manager) has API for C programming? kiki111 Programming/Scripts 1 15th July 2010 15:37
Run a cronjob to call (execute) a flash file. edge Programming/Scripts 2 1st April 2010 18:02
Default .htaccess/index.html getting restored? StrikerNL Installation/Configuration 11 1st July 2009 15:12
how openVPN uses NDIS API on linux tarun@howtoforge Suggest HOWTO 0 3rd June 2008 10:22

All times are GMT +2. The time now is 12:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.