Jump to content

Custom server mod


SteveE

Recommended Posts

Hello

 

Two questions for anyone who can help

 

I am trying to make a server mod using the server mod template. this requires me to right to a mysql db on a different host. however i cannot get this to work. if the database is on the same host i can get this right using

 

select blabla from database.table.......

 

but on a different host i cannot get this right using the following, which i assume is the correct way to do it

 

mysql_query(blablabla, $db);

 

 

and

 

i was wondering.... the are fuctions in the server module template for create, terminate, change password and so, but can additional ones like change username be added?

 

thanks

Link to comment
Share on other sites

On the server with the database you are trying to connect to, make sure that the firewall port is open and that the server's IP is allowed as a mysql remote access host.

 

Also, make sure you are opening the connection and selecting the database before executing a query.

Link to comment
Share on other sites

I have covered those, several times actually. truthfully, i have been stuck on this for a while, working around the issue, but using and database on the same host and using

"select * from $db.table" and then just replicating the db offsite

 

something i maybe should've mentioned off the bat is that. before trying to run even one sql query on the other host, i have a query that has to write into the WHMCS db. when i test the script, using mod create, it seems though my opening another connection is causing the whmcs db connection to fail

 

gives this error

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/includes/adminfunctions.php on line 0

 

 

am i correct in saying, that in my db connect function i should use true for new link?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated