Hi, I've been searching online for the last few hours trying to find the best (and most recently active) thread on the topic of Windows + PHP + MySql + phpMyAdmin installation. And, I'm pleased to report that this is by far the best resource that I could google.
I'm hoping that you can help me understand the problem that I'm currently experiencing with my installation.
I am using:
- MySql 5.1.22-rc-win32
- PHP 5.2.5-win32-installer
- phpMyAdmin 2.11.4-rc1-english
- Windows 2003 Server
- IIS 6.0
I've tested a phpinfo.php file containing
and a test.php containing
<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'root', '<password redacted>')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('mysql') or die('Could not select database');
// Performing SQL query
$query = 'SELECT * FROM user';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
if ( !is_dir( session_save_path() ) ) {
echo "'session.save_path' directory not set! Please set your session.save_path in your php.ini file.";
} else {
echo "'session.save_path' is set. ";
echo session_save_path();
}
?>
- <?php
-
- // Connecting, selecting database
-
- $link = mysql_connect('localhost', 'root', '<password redacted>')
-
- or die('Could not connect: ' . mysql_error());
-
- echo 'Connected successfully';
-
- mysql_select_db('mysql') or die('Could not select database');
-
-
-
- // Performing SQL query
-
- $query = 'SELECT * FROM user';
-
- $result = mysql_query($query) or die('Query failed: ' . mysql_error());
-
-
-
- // Printing results in HTML
-
- echo "<table>\n";
-
- while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
-
- echo "\t<tr>\n";
-
- foreach ($line as $col_value) {
-
- echo "\t\t<td>$col_value</td>\n";
-
- }
-
- echo "\t</tr>\n";
-
- }
-
- echo "</table>\n";
-
-
-
- // Free resultset
-
- mysql_free_result($result);
-
-
-
- // Closing connection
-
- mysql_close($link);
-
-
-
-
-
- if ( !is_dir( session_save_path() ) ) {
-
- echo "'session.save_path' directory not set! Please set your session.save_path in your php.ini file.";
-
- } else {
-
- echo "'session.save_path' is set. ";
-
- echo session_save_path();
-
- }
-
-
-
- ?>
The results are a succesful phpinfo output containing the following (most likely relevant) entries:
header (not titled)
Loaded Configuration File C:\PHP\php.ini
configuration
extension_dir C:\PHP\ext
mysql
Client API version 5.0.45
session
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary wddx
session.save_path C:\PHP\sessions
The output of the test.php looks like this (modified to remove password output)
Connected successfully
localhost root *<password redacted> Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y 0 0 0 0
'session.save_path' is set. C:\PHP\sessions
Yet when I visit my myphpadmin page, I get
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
I have reviewed the suggestions in this thread and granted both the IUSR_<machinename> and NETWORK_SERVICE users full control of the C:\PHP\sessions directory.
I would greatly appreciate your assistance. Please help me figure out what I'm doing wrong.
Thank you
Edit: Before you ask, I have tried to turn on log files and have been unsuccessful. I'm entirely willing to try to turn log files on but I will need instructions.