cPanel user cant connect to remote mysql database

postcd

Well-Known Member
Oct 22, 2010
720
20
68
Hi,

i have an website hosted on cpanel account and my website mySQL database is hosted on a remote server, and admin of remote server told me that my hosting doesnt allow the scripts to connect to a remote database, can i anyhow turn on this function please?
"http:// wrapper is disabled in the server configuration by allow_url_fopen=0"

Im also WHM admin, Im afraid to turn on allow_url_fopen for that user account.. Thank you
 

24x7ss

Well-Known Member
Sep 30, 2014
272
17
68
India
cPanel Access Level
Root Administrator
Twitter
Enabling "allow_url_fopen" poses serious security risk. I will suggest you to tell your client to use cURL function in code to connect to the database.
 
  • Like
Reactions: postcd

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

Feel free to update us with the outcome after advising the client to use cURL. Note that the remote MySQL server administrator will need to add your server's IP address as an allowed IP for remote connections to MySQL.

Thank you.