문제

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())
?>
도움이 되었습니까?

해결책

As Terry pointed out in the comments:

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

derp!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top