mdkhost Posted November 7, 2011 Share Posted November 7, 2011 i want to setup whmcs api access , but not in the admin panel , i want it with mysql i insert IP into the database INSERT INTO `tblconfiguration` (setting,value) VALUES ("APIAllowedIPs","xxx.xxx.xxx.xxx") what else do i have to insert? thnx in advance 0 Quote Link to comment Share on other sites More sharing options...
Chrisw Posted November 7, 2011 Share Posted November 7, 2011 This is not a WHMCS API or even WHMCS related. This is a general mysql issue. Read the value and send it back with the new IP appended. Here is some examples: mysql> select value FROM `tblconfiguration` WHERE `setting` = 'APIAllowedIPs'; +---------------------------------------+ | value | +---------------------------------------+ | 192.168.1.1 192.168.1.2 192.168.1.3 | +---------------------------------------+ 1 row in set (0.00 sec) mysql> UPDATE tblconfiguration SET `value`='192.168.1.1\r\n192.168.1.2\r\n192.168.1.3\r\n192.168.1.4' WHERE setting='APIAllowedIPs'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select value FROM `tblconfiguration` WHERE `setting` = 'APIAllowedIPs'; +----------------------------------------------------+ | value | +----------------------------------------------------+ | 192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 | +----------------------------------------------------+ 1 row in set (0.00 sec) mysql> 0 Quote Link to comment Share on other sites More sharing options...
mdkhost Posted November 12, 2011 Author Share Posted November 12, 2011 nope , i have again this error : The following error occured: Invalid IP xxx.xxx.xxx.xxx 0 Quote Link to comment Share on other sites More sharing options...
openmind Posted November 12, 2011 Share Posted November 12, 2011 Then the IP you are connecting from to the API is incorrect. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted November 14, 2011 Share Posted November 14, 2011 Why are you trying to insert this manually anyways? Theres a field for it within Setup -> General Settings -> Security 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.