The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cPanel user cant connect to remote mysql database

Discussion in 'Database Discussions' started by postcd, Mar 26, 2015.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    623
    Likes Received:
    6
    Trophy Points:
    18
    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
     
  2. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    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.
     
    postcd likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page