MySQL geen inhoud
Ben nieuw op dit forum en benieuwd of jullie me op weg kunnen helpen.
Heb een PHP script voor foto's: SlideShowPro en dan de director versie. Via FTP op de server. Safe-mode is off, alles op 777, MySQL database aangemaakt via Plesk met localhost, naam, user en password. Script zou vervolgens aantal tabellen moeten aanmaken; maar jammer er gebeurt helemaal niets.
Hoe nu verder? Hoe analyseer ik dit?
Thanks
krijg je enkel een wit scherm?
Wat voor foutmeldingen krijg je?
http://www.vernede.nl/ssp_director/_install.php.
Dus ergens schiet ie er door zonder iets aan te maken. Enkel zwart scherm met standaardopmaak en het woord installing.
Error reporting aangezet; maar ik krijg geen foutmelding. Pagina geeft simpelweg aan: Done. De php scrit staat op: Dus ergens schiet ie er door zonder iets aan te maken. Enkel zwart scherm met standaardopmaak en het woord installing.
Kun je een klein stukje PHP code posten hier?
Hierbij stukje script. Je kunt ook met de muis op de link gaan staan en dan save link as en dan heb je het ook (bij Firefox). http://www.vernede.nl/ssp_director/_install.php
Hij komt dus niet verder als ergen bovenaan installing. Hij heeft wel toegang tot de sql server.
Nog tips?? Erg dankbaar.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SlideShowPro Director :: Install</title>
<link rel="stylesheet" href="css/master.css" />
</head>
<body>
<div id="header" style="margin-bottom:15px;"><img class="logo" src="images/director_logo.gif" width="192" height="48" alt="SlideShowPro Director" /></div>
<div id="sub-header" class="clearfix">
<div class="message"><div class="left">
<p>Installing...</p>
</div></div>
</div>
<div id="container" class="clearfix">
<?php //NBG
$test = version_compare(phpversion(), "4.3.0");
if ($test >= 0):
if (extension_loaded('mysql')):
?>
<div class="left">
<?php
error_reporting(E_ALL);
require_once('inc/data/head.php');
$u = $_REQUEST['usr'];
$p = $_REQUEST['pwd'];
$auto = false;
if (!$u){
$u = 'admin';
$p = substr(md5(uniqid(microtime())), 0, 6);
$auto = true;
}
// Create Tables
mysql_query("CREATE TABLE $atbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(100), description BLOB, path VARCHAR(50), tn TINYINT(1) NOT NULL DEFAULT '0', aTn VARCHAR(150), active TINYINT(1) NOT NULL DEFAULT '0', startHere TINYINT(1) NOT NULL DEFAULT '0', audioFile VARCHAR(100) DEFAULT NULL, audioCap VARCHAR(200) DEFAULT NULL, displayOrder INT(4) DEFAULT '999', target TINYINT(1) NOT NULL DEFAULT '0', thumb_specs VARCHAR(255), process_specs VARCHAR(255), show_headers INT(1) NOT NULL DEFAULT '1')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Albums table written successfully...</p>";
mysql_query("CREATE TABLE $itbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), aid INT, title VARCHAR(255), src VARCHAR(255), caption TEXT, link TEXT, active TINYINT(1) NOT NULL DEFAULT '1', seq INT(4) NOT NULL DEFAULT '999', pause INT(4) NOT NULL DEFAULT '0', target TINYINT(1) NOT NULL DEFAULT '0')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Images table written successfully...</p>";
mysql_query("CREATE TABLE $utbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), usr VARCHAR(50), pwd VARCHAR(50), perms TINYINT(1) NOT NULL DEFAULT '1')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Users table written successfully...</p>";
mysql_query("CREATE TABLE $dtbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(100))") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
mysql_query("CREATE TABLE $dltbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), did INT, aid INT, display INT DEFAULT '800')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Dynamic gallery tables written successfully...</p>";
mysql_query("CREATE TABLE $stbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(255), url VARCHAR(255))") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Slide show tables written successfully...</p>";
mysql_query("INSERT INTO $utbl (id, usr, pwd, perms) VALUES (NULL, '$u', '$p', 4)") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
?>
<h3>Success!</h3>
<p>It is highly recommended that you now delete start.php, write.php and _install.php from your webserver.</p>
<?php if ($auto): ?>
<p>We have generated a username and password for you, be sure to write this information down before continuing (you will need it to login to Director).</p><p><strong>Username:</strong> <?php echo($u); ?><br /><strong>Password:</strong> <?php echo($p); ?></p>
<?php endif; ?>
<p><a href="index.php?p=login">Click here to login</a>.</p>
<?php else: ?>
<h4>SlideShowPro Director requires PHP be built with the MySQL extension enabled. MySQL may very well be installed, but PHP has not been configured to work with MySQL.</h4>
<?php endif; ?>
<?php else: ?>
<h4>SlideShowPro Director requires a PHP version of at least 4.3.0. We have determined your PHP version to be <?php echo(phpversion())?>. SlideShowPro Director is not compatible with this version of PHP. Contact your host to see if an upgrade to PHP is available.</h4>
<?php endif; ?>
</div></div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SlideShowPro Director :: Install</title>
<link rel="stylesheet" href="css/master.css" />
</head>
<body>
<div id="header" style="margin-bottom:15px;"><img class="logo" src="images/director_logo.gif" width="192" height="48" alt="SlideShowPro Director" /></div>
<div id="sub-header" class="clearfix">
<div class="message"><div class="left">
<p>Installing...</p>
</div></div>
</div>
<div id="container" class="clearfix">
<?php //NBG
$test = version_compare(phpversion(), "4.3.0");
if ($test >= 0):
if (extension_loaded('mysql')):
?>
<div class="left">
<?php
error_reporting(E_ALL);
require_once('inc/data/head.php');
$u = $_REQUEST['usr'];
$p = $_REQUEST['pwd'];
$auto = false;
if (!$u){
$u = 'admin';
$p = substr(md5(uniqid(microtime())), 0, 6);
$auto = true;
}
// Create Tables
mysql_query("CREATE TABLE $atbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(100), description BLOB, path VARCHAR(50), tn TINYINT(1) NOT NULL DEFAULT '0', aTn VARCHAR(150), active TINYINT(1) NOT NULL DEFAULT '0', startHere TINYINT(1) NOT NULL DEFAULT '0', audioFile VARCHAR(100) DEFAULT NULL, audioCap VARCHAR(200) DEFAULT NULL, displayOrder INT(4) DEFAULT '999', target TINYINT(1) NOT NULL DEFAULT '0', thumb_specs VARCHAR(255), process_specs VARCHAR(255), show_headers INT(1) NOT NULL DEFAULT '1')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Albums table written successfully...</p>";
mysql_query("CREATE TABLE $itbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), aid INT, title VARCHAR(255), src VARCHAR(255), caption TEXT, link TEXT, active TINYINT(1) NOT NULL DEFAULT '1', seq INT(4) NOT NULL DEFAULT '999', pause INT(4) NOT NULL DEFAULT '0', target TINYINT(1) NOT NULL DEFAULT '0')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Images table written successfully...</p>";
mysql_query("CREATE TABLE $utbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), usr VARCHAR(50), pwd VARCHAR(50), perms TINYINT(1) NOT NULL DEFAULT '1')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Users table written successfully...</p>";
mysql_query("CREATE TABLE $dtbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(100))") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
mysql_query("CREATE TABLE $dltbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), did INT, aid INT, display INT DEFAULT '800')") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Dynamic gallery tables written successfully...</p>";
mysql_query("CREATE TABLE $stbl(id INT AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(255), url VARCHAR(255))") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
echo "<p class=\"accept\">Slide show tables written successfully...</p>";
mysql_query("INSERT INTO $utbl (id, usr, pwd, perms) VALUES (NULL, '$u', '$p', 4)") or die('<p class="error"><strong>There was an error during installation:</strong> ' . mysql_error() . '.</p><p> Installation was not successful. If you continue to have errors, post the preceding error message to the SlideShowPro forums.</p>');
?>
<h3>Success!</h3>
<p>It is highly recommended that you now delete start.php, write.php and _install.php from your webserver.</p>
<?php if ($auto): ?>
<p>We have generated a username and password for you, be sure to write this information down before continuing (you will need it to login to Director).</p><p><strong>Username:</strong> <?php echo($u); ?><br /><strong>Password:</strong> <?php echo($p); ?></p>
<?php endif; ?>
<p><a href="index.php?p=login">Click here to login</a>.</p>
<?php else: ?>
<h4>SlideShowPro Director requires PHP be built with the MySQL extension enabled. MySQL may very well be installed, but PHP has not been configured to work with MySQL.</h4>
<?php endif; ?>
<?php else: ?>
<h4>SlideShowPro Director requires a PHP version of at least 4.3.0. We have determined your PHP version to be <?php echo(phpversion())?>. SlideShowPro Director is not compatible with this version of PHP. Contact your host to see if an upgrade to PHP is available.</h4>
<?php endif; ?>
</div></div>
</body>
</html>
Gewijzigd op 01/01/1970 01:00:00 door RealRedHair
Verder zie ik niet zo snel waar contact wordt gemaakt met de mysql server en ik zie ook nergens dat er een database wordt aangemaakt. Alleen tabellen, meer niet.
Gewijzigd op 01/01/1970 01:00:00 door - SanThe -
http://www.vernede.nl/ssp_director/write.php Hier voor je de de login gegevens. En dan gaat ie naar _install.php
Nog een hiervoor zit: http://www.vernede.nl/ssp_director/start.php daar geef je sql name, user, password etc aan.
Tja dat levert geen extra info op; ofwel geen foutmeldingen. Wel nog even hier de link naar het script dat hiervoor zit. Nog een hiervoor zit: http://www.vernede.nl/ssp_director/start.php daar geef je sql name, user, password etc aan.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SlideShowPro Director :: Install</title>
<link rel="stylesheet" href="css/master.css" />
<script type="text/javascript">
function checkPwd(){
elem = document.getElementById('theForm');
var pwd = elem.pwd.value;
var pwd2 = elem.pwd2.value;
if (pwd == pwd2)
{
return true;
}
else
{
alert('Passwords Do Not Match!');
return false;
}
}
</script>
</head>
<body>
<div id="header" style="margin-bottom:15px;"><img class="logo" src="images/director_logo.gif" width="192" height="48" alt="SlideShowPro Director" /></div>
<div id="sub-header" class="clearfix">
<div class="message"><div class="left">
<p>Writing configuration file...</p>
</div></div>
</div>
<div id="container" class="clearfix">
<div class="left">
<?php
if ( !$_POST )
{
die('<h3 class="error">Error</h3><p>Please start the installation from <a href="start.php">start.php</a>.</p>');
} else
{
$server = $_REQUEST['svr'];
$db = $_REQUEST['db'];
$usr = $_REQUEST['usr'];
$pwd = $_REQUEST['pwd'];
$pr = $_REQUEST['pr'];
$filename = 'config/';
$perms = substr(sprintf('%o', fileperms($filename)), -4);
if ($perms != '0777')
@chmod($filename, 0777) or die("<h3 class=\"error\">Error</h3><p>SlideShowPro Director does not have the proper permissions to write the <strong>config/conf.php</strong> file. Director tried to set the permissions for you, but was rejected. Please change permissions on this directory to 777 and restart setup.</p><p>If you cannot set the permissions to this directory, open up the example configuration file (conf.php.example) in a text editor, fill in the values manually and save it as conf.php. Then simply run _install.php.</p><p><a href=\"start.php\">Go back to setup</a></p>");
$fill = "<?php\n\n";
$fill .= '$host = \''.$server."';\n";
$fill .= '$db = \''.$db."';\n";
$fill .= '$user = \''.$usr."';\n";
$fill .= '$pass = \''.$pwd."';\n\n";
$fill .= '$pre = \''.$pr."';\n\n";
$fill .= '?>';
$filename = $filename . 'conf.php';
$handle = fopen($filename, 'w+');
if (fwrite($handle, $fill) == false)
{
die('<h3 class="error">Error</h3><p>An error occured. Your server may not allow writing files via PHP. If not, follow the instructions for creating the configuration file in the help documents.</p>');
}
fclose($handle);
echo '<h3 class="accept">Success</h3><p>Your configuration file was successfully created.</p><p>You are now ready to install. Please enter a username and password below. This will be your administrator login for SlideShowPro Director.</p>';
?>
<form id="theForm" action="_install.php" method="post" onsubmit="return checkPwd()">
<fieldset><label>Username:</label><input type="text" name="usr" /></fieldset>
<fieldset><label>Password:</label><input type="password" name="pwd" /></fieldset>
<fieldset><label>Password Again:</label><input type="password" name="pwd2" /></fieldset>
<fieldset><input type="submit" value="Install Director" /></fieldset>
</form>
<?php } ?>
</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>SlideShowPro Director :: Install</title>
<link rel="stylesheet" href="css/master.css" />
<script type="text/javascript">
function checkPwd(){
elem = document.getElementById('theForm');
var pwd = elem.pwd.value;
var pwd2 = elem.pwd2.value;
if (pwd == pwd2)
{
return true;
}
else
{
alert('Passwords Do Not Match!');
return false;
}
}
</script>
</head>
<body>
<div id="header" style="margin-bottom:15px;"><img class="logo" src="images/director_logo.gif" width="192" height="48" alt="SlideShowPro Director" /></div>
<div id="sub-header" class="clearfix">
<div class="message"><div class="left">
<p>Writing configuration file...</p>
</div></div>
</div>
<div id="container" class="clearfix">
<div class="left">
<?php
if ( !$_POST )
{
die('<h3 class="error">Error</h3><p>Please start the installation from <a href="start.php">start.php</a>.</p>');
} else
{
$server = $_REQUEST['svr'];
$db = $_REQUEST['db'];
$usr = $_REQUEST['usr'];
$pwd = $_REQUEST['pwd'];
$pr = $_REQUEST['pr'];
$filename = 'config/';
$perms = substr(sprintf('%o', fileperms($filename)), -4);
if ($perms != '0777')
@chmod($filename, 0777) or die("<h3 class=\"error\">Error</h3><p>SlideShowPro Director does not have the proper permissions to write the <strong>config/conf.php</strong> file. Director tried to set the permissions for you, but was rejected. Please change permissions on this directory to 777 and restart setup.</p><p>If you cannot set the permissions to this directory, open up the example configuration file (conf.php.example) in a text editor, fill in the values manually and save it as conf.php. Then simply run _install.php.</p><p><a href=\"start.php\">Go back to setup</a></p>");
$fill = "<?php\n\n";
$fill .= '$host = \''.$server."';\n";
$fill .= '$db = \''.$db."';\n";
$fill .= '$user = \''.$usr."';\n";
$fill .= '$pass = \''.$pwd."';\n\n";
$fill .= '$pre = \''.$pr."';\n\n";
$fill .= '?>';
$filename = $filename . 'conf.php';
$handle = fopen($filename, 'w+');
if (fwrite($handle, $fill) == false)
{
die('<h3 class="error">Error</h3><p>An error occured. Your server may not allow writing files via PHP. If not, follow the instructions for creating the configuration file in the help documents.</p>');
}
fclose($handle);
echo '<h3 class="accept">Success</h3><p>Your configuration file was successfully created.</p><p>You are now ready to install. Please enter a username and password below. This will be your administrator login for SlideShowPro Director.</p>';
?>
<form id="theForm" action="_install.php" method="post" onsubmit="return checkPwd()">
<fieldset><label>Username:</label><input type="text" name="usr" /></fieldset>
<fieldset><label>Password:</label><input type="password" name="pwd" /></fieldset>
<fieldset><label>Password Again:</label><input type="password" name="pwd2" /></fieldset>
<fieldset><input type="submit" value="Install Director" /></fieldset>
</form>
<?php } ?>
</div>
</div>
</body>
</html>
Je moet die start.php runnen en de juiste gegevens ingeven.