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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd August 2010, 17:32
Mosquito Mosquito is offline
Member
 
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:

Code:
PHP Warning:  mysql_connect(): Access denied for user 'c7testAPI'@'localhost' (using password: YES)
These are the parameters I'm passing:
Code:
$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
  #2  
Old 24th August 2010, 06:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,504
Thanks: 813
Thanked 5,266 Times in 4,129 Posts
Default

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
  #3  
Old 24th August 2010, 15:39
Mosquito Mosquito is offline
Member
 
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
Default

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 15:44.
Reply With Quote
Reply

Bookmarks

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 15:34
Does linux lvm(logic volum manager) has API for C programming? kiki111 Programming/Scripts 1 15th July 2010 14:37
Run a cronjob to call (execute) a flash file. edge Programming/Scripts 2 1st April 2010 17:02
Default .htaccess/index.html getting restored? StrikerNL Installation/Configuration 11 1st July 2009 14:12
how openVPN uses NDIS API on linux tarun@howtoforge Suggest HOWTO 0 3rd June 2008 09:22


All times are GMT +2. The time now is 14:19.


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