http 500 internal server error - installation problem only on MySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 11oclocktuesday
    New Member
    • Nov 2006
    • 3

    http 500 internal server error - installation problem only on MySQL

    Can anyone help.

    I try to run a simple MySQL script within PHP on my computer using it as a local host - and I keep getting http 500 internal server error. My computer will run the php script if I take out the MySQL instructions.

    I have set up my computer with php 5.2.5, Apache 2.0.63, MySQL 5.0. I can access all the files under locahost and it can run php scripts - so Apache and php must be OK. I can run MySQL from a command line - so that must be OK. I have pointed my.cnf to the correct directory. I have a windows XP professional operating system - and I can't see any permissions rights (under properties, advanced) so I am assuming that because there is only one login - then all programs should be able to execute all files.

    I read one of the other posts (related to JS script) saying that it could be a class path problem - where and how would I check that? and how do I find my log file?

    cheers

    Any suggestions?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    First check your error log to see what happened.

    (Many times this type of error shows with an invalid .htaccess definition, which shows up in the log as ".... htaccess: Invalid command 'xxxx', perhaps mis-spelled or defined by a module not included in the server configuration.. ..")

    Ronald

    Comment

    • 11oclocktuesday
      New Member
      • Nov 2006
      • 3

      #3
      There was a problem with the tutorial I was using, I found this test script for just testing if the MySQL connection works. I then just kept adding components until it was usefull[php]<?php $link = mysql_connect
      ('localhost','r oot','mysecretp assword');
      if (!$link) {
      die ('Could not connect to MySql: ' . mysql_error() );
      }
      echo 'Connection you little beauty it works;'
      mysql_close($li nk);
      ?>[/php]
      Last edited by ronverdonk; May 4 '08, 05:18 PM. Reason: format code and code tags!

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        WARNING:
        Please enclose your posted code in [code] tags (See How to Ask a Question).

        This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

        Please use [code] tags in future.

        MODERATOR

        Comment

        Working...