Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Testing database connection..........


Guest

Recommended Posts

Posted

Testing database connection...... is stuck. I've tried several times and the page just stays there, forever.

Posted
Testing database connection...... is stuck. I've tried several times and the page just stays there, forever.

 

I recompiled apache with mysql, curl, openssl and so on and managed to get through the install but it throws errors, then tells me it worked but when I go to the site it throws another error.

 

Warning: fopen(/includes/configure.php) [function.fopen]: failed to open stream: No such file or directory in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 116

 

Warning: fputs(): supplied argument is not a valid stream resource in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 117

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 118

 

Warning: fopen(/admin/includes/configure.php) [function.fopen]: failed to open stream: No such file or directory in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 152

 

Warning: fputs(): supplied argument is not a valid stream resource in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 153

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 154

 

The installation and configuration was successful!

Posted
I recompiled apache with mysql, curl, openssl and so on and managed to get through the install but it throws errors, then tells me it worked but when I go to the site it throws another error.

 

The installation and configuration was successful!

It appears you are installing the software on your local machine, and it could be a problem with apache / mod_php or any other package that is not available during compilation.

 

1. Verify your database is running. (Check Services / port to connect to etc using mysqladmin)

2. Use phpmyadmin to connect and test database connectivity.

3. Before you proceed with OSC install, you may write a stand-alone test script for database connection (and check output / echo) to see where exactly is the problem on your current installation. A sample code is mentioned below, you may extend it for your testing

<?php
$dbhost = 'localhost';  //<-------- input appropriate setting
$dbuser = 'root';	  //<--------- database username
$dbpass = 'password';  //<-------- password for user defined in dbuser.

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die					  ('Error connecting to mysql');
echo "Connected to mySQL database! ";
$dbname = 'mysql'; //<------- you may create a dummy database using phpmyadmin / or use existing database test or mysql
mysql_select_db($dbname) or die ('Could not select database');
echo "Connected to database: ".$dbname;


// --- Modify query as per your test table / database selected .. this is just for reference 
$result = mysql_query("SELECT * FROM user");
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
print ":".$row{'0'}." Name:".$row{'1'}."  ".$row{'2'}."<br>";

mysql_close($conn);

}

?>

 

Delete lines //<------ that i have placed to guide you.

 

* you may install XAMPP which comes configured with web server / database to run osc during dev / or use a free host to test your dev site.

 

----------

If you look at the first error

Warning: fopen(/includes/configure.php) [function.fopen]: failed to open stream: No such file or directory in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 116

 

the error indicates that file install_4.php which is stored in /public_html/catalog/install/templates/pages/ is asking to open file

configure.php stored in folder /includes/ . Since the file is not found in that location, it cannot be opened (and because configure.php is not available, database connection string is not available and thus it hangs at testing database connection.

 

Cheers

Best Regards,
Gaurav

Posted
It appears you are installing the software on your local machine, and it could be a problem with apache / mod_php or any other package that is not available during compilation.

 

1. Verify your database is running. (Check Services / port to connect to etc using mysqladmin)

2. Use phpmyadmin to connect and test database connectivity.

3. Before you proceed with OSC install, you may write a stand-alone test script for database connection (and check output / echo) to see where exactly is the problem on your current installation. A sample code is mentioned below, you may extend it for your testing

<?php
$dbhost = 'localhost';  //<-------- input appropriate setting
$dbuser = 'root';	  //<--------- database username
$dbpass = 'password';  //<-------- password for user defined in dbuser.

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die					  ('Error connecting to mysql');
echo "Connected to mySQL database! ";
$dbname = 'mysql'; //<------- you may create a dummy database using phpmyadmin / or use existing database test or mysql
mysql_select_db($dbname) or die ('Could not select database');
echo "Connected to database: ".$dbname;


// --- Modify query as per your test table / database selected .. this is just for reference 
$result = mysql_query("SELECT * FROM user");
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
print ":".$row{'0'}." Name:".$row{'1'}."  ".$row{'2'}."<br>";

mysql_close($conn);

}

?>

 

Delete lines //<------ that i have placed to guide you.

 

* you may install XAMPP which comes configured with web server / database to run osc during dev / or use a free host to test your dev site.

 

----------

If you look at the first error

Warning: fopen(/includes/configure.php) [function.fopen]: failed to open stream: No such file or directory in /home/gogadget/public_html/catalog/install/templates/pages/install_4.php on line 116

 

the error indicates that file install_4.php which is stored in /public_html/catalog/install/templates/pages/ is asking to open file

configure.php stored in folder /includes/ . Since the file is not found in that location, it cannot be opened (and because configure.php is not available, database connection string is not available and thus it hangs at testing database connection.

 

Cheers

 

I'm installing on a dedicated server, Cento OS x64 with cPanel, actually. I'm starting to detect all kinds of weird issues with my cPanel setup - the last time I installed oscommerce was smooth and easy.

 

Database keeps trying to default to Latin_swedish_ci collation. I set it to utf8_general_ci before cleaning up and re-running the install (fresh database). Once again I got past the database test and populate but at the end I get these errors:

 

 

 

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/gogadget/public_html/install/includes/functions/database.php on line 29

 

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/gogadget/public_html/install/includes/functions/database.php on line 29

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/gogadget/public_html/install/includes/functions/database.php on line 35

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/gogadget/public_html/install/includes/functions/database.php on line 35

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/gogadget/public_html/install/includes/functions/database.php on line 35

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/gogadget/public_html/install/includes/functions/database.php on line 35

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/gogadget/public_html/install/includes/functions/database.php on line 39

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/gogadget/public_html/install/includes/functions

 

I still get a success message but of course when I try the catalog or admin panel I get a weird 404.

Posted

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/gogadget/public_html/install/includes/functions/database.php on line 29

 

The first error indicates that username is not defined in the database (nobody@localhost) and even with a password, database would not allow the user to do anything.

 

Before you install OSC, you have to ensure that you have correction connection string available to you which is dbhost, username and password.

 

Cheers

Best Regards,
Gaurav

Posted

Hi, same with mine also. I bought a package ready made oscommerce template and installed to my server. But i cant continue the installation because it really stays on step 2 like forever ....it wont move to the next step?

 

It stucks in here

 

 

http://www.example.com/install/install.php?step=2

 

 

Please let me know if you were able to figure it out. I cant find any answer here....

Regards!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...