2016-05-16 7 views
0

In Ordnung, so arbeite ich an einem Forum-Projekt, und ich habe in einen Haken geraten. Das Hochladen aller meiner Dateien in wamp und das Starten des Installationsprozesses läuft alles gut. Wenn ich jedoch die gleichen Dateien auf meine Live-Website hochlade (mit whm & cpanel) gehe ich den Installationsprozess durch und wenn ich index_3.php erreiche und alle Serverinformationen eintippe, klicke ich auf Weiter und boom white screen, keine Fehler. Ich habe meine php.ini überprüft und Display-Fehler eingeschaltet und nichts. Überprüft die cPanel Fehlerprotokoll, nichts ...Skript funktioniert auf Wamp-Server, aber nicht auf meinem vps

meine index_3.php Datei:

<?php if (!file_exists("install.txt")){ die("Installer locked."); } ?> 
 
<!doctype html> 
 
<html> 
 

 
<head> 
 
    <title>forum Installer - Step 3 of 7</title> 
 
    <link rel="stylesheet" type="text/css" href="css/installer.css" /> 
 
</head> 
 

 
<body> 
 
    <div id="wrap"> 
 
    <img src="images/mbbinstall_logo.png" /> 
 
    <div id="container"> 
 
     <div id="menu"> 
 
     <a href="#" class="current"> 
 
      <img src="images/green/welcome.png" alt="Y">Welcome to forum!</a> 
 
     <a href="#" class="current"> 
 
      <img src="images/green/percheck.png" alt="Y">Check Permissions</a> 
 
     <a href="#" class="current"> 
 
      <img src="images/grey/mysql.png" alt="Y">Configure MySQL</a> 
 
     <a href="#"> 
 
      <img src="images/grey/settings.png" alt="N">Configure Settings</a> 
 
     <a href="#"> 
 
      <img src="images/grey/table.png" alt="N">Install Tables</a> 
 
     <a href="#"> 
 
      <img src="images/grey/account.png" alt="N">Create Admin Account</a> 
 
     <a href="#"> 
 
      <img src="images/grey/forum.png" alt="N">Your New Forum</a> 
 
     </div> 
 
     <div id="content"> 
 
     <div class="title">forum MySQL Configuration</div> 
 
     <div class="title2">Step 3 of 7</div> 
 

 
     <?php if (isset($_GET[ "error"])){ echo "<div class=\"error\ ">Error accessing the MySQL database. Re-check database information. :[</div>"; } ?> 
 

 
     <div class="box"> 
 
      <form action="index_4.php" method="post"> 
 
      Database Host 
 
      <br /> 
 
      <span style="font-size:11px;">Commonly localhost, external MySQL servers may differ.</span> 
 
      <div class="clear"></div> 
 
      <input type="text" name="host" size="40" value="localhost"> 
 
      <br /> 
 
      <br />Database Username 
 
      <br /> 
 
      <span style="font-size:11px;">The username you configured for your MySQL database.</span> 
 
      <div class="clear"></div> 
 
      <input type="text" name="user" size="40"> 
 
      <br /> 
 
      <br />Database Password 
 
      <br /> 
 
      <span style="font-size:11px;">The password you configured for your MySQL database.</span> 
 
      <div class="clear"></div> 
 
      <input type="text" name="pass" size="40"> 
 
      <br /> 
 
      <br />Database Name 
 
      <br /> 
 
      <span style="font-size:11px;">The name you configured for your MySQL database.</span> 
 
      <div class="clear"></div> 
 
      <input type="text" name="name" size="40"> 
 
      <br /> 
 
      <br />Password Key 
 
      <br /> 
 
      <span style="font-size:11px;">A unique and random key to encrypt user passwords.</span> 
 
      <div class="clear"></div> 
 
      <input type="text" name="pass_key" size="40"> 
 
      <br /> 
 
      <br /> 
 
      <input type="submit" class="button" value="Continue"> 
 
      </form> 
 
     </div> 
 

 
     </div> 
 
    </div> 
 
    <div id="footer"> 
 
     <div style="float:left;"> 
 
     minstaller v1.2 - Powered by: <a href='http://www.forum.net'>Bulletin Board</a> 
 
     </div> 
 
     <div style="float:right;"> 
 
     <a href="http://www.forum.net/docs" target="_blank" style="color:#808080;">I need help!</a> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</body> 
 

 
</html>

und das ist mein index_4.php-Datei, die weiß nach index_3.php geht:

<?php if (!file_exists("install.txt")){ die("Installer locked."); } ?> 
 
<?php # Database Connection if ($_POST[ "host"] !=n ull && $_POST[ "user"] !=n ull && $_POST[ "pass"] !=n ull && $_POST[ "name"] !=n ull && $_POST[ "pass_key"] !=n ull) { [email protected] new mysqli($_POST[ "host"], $_POST[ "user"], $_POST[ "pass"], $_POST[ 
 
"name"]); } else { header('location: ./index_3.php?error=1'); exit(); } if (mysqli_connect_errno()) { header('location: ./index_3.php?error=1'); exit(); } else { $config_file='<?php 
 
\t /******************* 
 
\t | forum software 
 
\t | powered by forum 1.2 
 
\t *******************/ 
 
\t 
 
\t if(!defined("access")){ include("errors/access.html"); exit(); } 
 
\t 
 
\t /******************* 
 
\t | The following settings are related 
 
\t | to the MySQL side of the application 
 
\t *******************/ 
 
\t 
 
\t $DB_NAME = "' . $_POST[ "name"] . '"; // Your database name 
 
\t $DB_HOST = "' . $_POST[ "host"] . '"; // Your database host 
 
\t $DB_USER = "' . $_POST[ "user"] . '"; // Your database username 
 
\t $DB_PASS = "' . $_POST[ "pass"] . '"; // Your database password 
 
\t 
 
\t // Please change the following key to a secure phrase - do not modify after board installation 
 
\t $config["password_key"] = "' . $_POST[ "pass_key"] . '"; 
 
?> 
 
\t \t '; $write_config=f open("../forum/db_config.php", "w"); fwrite($write_config, $config_file); fclose($write_config); } ?> 
 
<!doctype html> 
 
<html> 
 

 
<head> 
 
    <title>forum Installer - Step 3 of 7</title> 
 
    <link rel="stylesheet" type="text/css" href="css/installer.css" /> 
 
</head> 
 

 
<body> 
 
    <div id="wrap"> 
 
    <img src="images/mbbinstall_logo.png" /> 
 
    <div id="container"> 
 
     <div id="menu"> 
 
     <a href="#" class="current"> 
 
      <img src="images/green/welcome.png" alt="Y">Welcome to forum!</a> 
 
     <a href="#" class="current"> 
 
      <img src="images/green/percheck.png" alt="Y">Check Permissions</a> 
 
     <a href="#" class="current"> 
 
      <img src="images/grey/mysql.png" alt="Y">Configure MySQL</a> 
 
     <a href="#"> 
 
      <img src="images/grey/settings.png" alt="N">Configure Settings</a> 
 
     <a href="#"> 
 
      <img src="images/grey/table.png" alt="N">Install Tables</a> 
 
     <a href="#"> 
 
      <img src="images/grey/account.png" alt="N">Create Admin Account</a> 
 
     <a href="#"> 
 
      <img src="images/grey/forum.png" alt="N">Your New Forum</a> 
 
     </div> 
 
     <div id="content"> 
 
     <div class="title">forum MySQL Configuration</div> 
 
     <div class="title2">Step 3 of 7</div> 
 

 
     <div class="box2"> 
 
      forum has successfully connected to your MySQL database. Next we are ready to configure your board settings! Click "Configure Settings" to begin your board configuration. 
 
      <br /> 
 
      <br /> 
 
     </div> 
 
     <div style="float:right;"> 
 
      <a href="index_5.php" class="button">Configure Settings</a> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    <div id="footer"> 
 
     <div style="float:left;"> 
 
     forum installer v1.2 - Powered by: <a href='https://forum.net'>forum Bulletin Board</a> 
 
     </div> 
 
     <div style="float:right;"> 
 
     <a href="https://forum.net/docs.html" target="_blank" style="color:#808080;"> I need help!</a> 
 
     </div> 
 
    </div> 
 
</body> 
 

 
</html>

+2

Zeigen Sie uns den Fehlerbericht mit 'error_reporting (E_ALL);' – asurbernardo

+0

'f open' =>' fopen'? –

Antwort

-1

Ich weiß nicht, wie Ihr Code in Ihrer Entwicklungsumgebung funktionieren kann. Es ist ein PHP-Syntaxfehler:

'; $write_config=f open("../forum/db_config.php", "w"); fwrite($write_config, $config_file); fclose($write_config); } ?> 

sein muss
'; $write_config=fopen("../forum/db_config.php", "w"); fwrite($write_config, $config_file); fclose($write_config); } ?> 

(Kein Leerzeichen zwischen "f" en "öffnen")

Wie dem auch sei: Wenn Sie einen solchen Fehler machen, um debuggen sicher error_reporting wurde E_ALL gesetzt. Möglicherweise möchten Sie auch Ihre Server-Fehlerprotokolle überprüfen.

+0

Eigentlich sieht diese PHP-Zeile so aus, als würde sie irgendwo außerhalb von PHP-Tags hängen. Das PHP-Tag ist eine Zeile vor – RiggsFolly

+0

geschlossen Oh, richtig! Und es ist wieder am Ende der Zeile geschlossen. ETWAS ist sowieso falsch :) – vrijdenker

+0

In Ordnung, ich habe den Raum von f auf fopen geöffnet. Jetzt komme ich. Parse-Fehler: Syntaxfehler, unerwarteter '' (T_ENCAPSED_AND_WHITESPACE), erwarte Kennung (T_STRING) oder Variable (T_VARIABLE) oder Nummer (T_NUM_STRING) in /home/forum/public_html/forum/install/index_4.php in Zeile 15 – LordOfSpoon