Domanda

I set up a server on a VM I have running in college. I have phpmyadmin working and I can access my database remotely. I also have a test.php script which contains phpinfo() which works happily enough.

When I try to run any of my other scripts I get an internal server error. I have no idea whats wrong as I copied the scripts which I had working on my local computer exactly over.

Does anybody know any commands or steps I can take to isolate the problem?

Edit Here is the script I am trying to run

<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
include('db_config.php');
mysql_connect(DB_SERVER,DB_USER,DB_PASSWORD) or die(mysql_error())
$db = mysql_select_db(DB_DATABASE) or die(mysql_error()) or die(mysql_error())
?>
È stato utile?

Soluzione

As Terry pointed out in the comments:

You are not terminating your lines with ; and you have a duplicate or die(mysql_error())

derp!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top