SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    runs on local server but not remote server - help please!

    Hi,

    My php gallery site talks to MySQL database on my Xampp testing server but I've not managed to successfully run it when uploaded to my remote server.

    I've set up the remote database using phpMyAdmin and I've managed to successfully connect to it within Dreamweaver. It's created a /Connections directory and planted a file with the $hostname, $database, $username and $password variables correctly set.

    It also created a command:
    $mysite = mysql_pconnect($hostname_mysite, $username_mysite, $password_mysite);

    So I added the other commands that I needed to get my database info which were

    mysqli_set_charset($mysite, 'utf8')
    mysqli_select_db($mysite, $database)
    $result = mysqli_query($mysite, 'SELECT filename, orientation, rating FROM mytable');

    and expected everything to work, but it just returns the http500 error.

    In my local server I was using the command: mysqli_connect(etc.
    What's the difference? Is that the problem?

    Do I need to set up user priveledges on the remote database? If so, why can I see the database already in Dreamweaver?

    Thanks
    Richard.

  2. #2
    SitePoint Addict Zarin Denatrose's Avatar
    Join Date
    Jan 2009
    Location
    Surrey BC, Canada
    Posts
    309
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure the remote server supports mysqli? It may only support standard mysql.

  3. #3
    SitePoint Member
    Join Date
    Oct 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ran the info() command and it showed both mysql and mysqli. Does that mean it does support both? How can I check for sure?






    "Are you sure the remote server supports mysqli? It may only support standard mysql"

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2008
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What type of server are you using?

    What are the permissions on the PHP file on the server?

    An Internal Server Error would likely mean that something is preventing the script from running in the first place.
    CanisHosting - Web Hosting plans starting at $3.95 per month

  5. #5
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    500 error isn't really an error.
    it is sign saying "Go for web-server error log and see detailed explanations on what really happened"

  6. #6
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shrapnel_N5 View Post
    500 error isn't really an error.
    it is sign saying "Go for web-server error log and see detailed explanations on what really happened"
    Good Point (y)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •