[PHPLIB] Trouble connecting PHPLIB to mySQL database From: Stephen Bolinger (phpfreak <email protected>)
Date: 11/18/99

I've just installed PHPLIB and when I go to the default index.php3 page, I
see the following result:

Database error: cannot use database
MySQL Error: 1046 (No Database Selected)
Session halted.

I created a database named "sessions" then added all of the default tables
using the "create_database.mysql" file. That seemed to work without
problem.

I edited the local.ini file and made the changes below ($User and $Password
value left out for obvious reasons):

class DB_Example extends DB_Sql {
  var $Host = "localhost";
  var $Database = "sessions";
  var $User = "*";
  var $Password = "*";
}

class Example_CT_Sql extends CT_Sql {
  var $database_class = "DB_Sql"; ## Which database to connect...
  var $database_table = "active_sessions"; ## and find our session data in
this table.
}

I then edited the php3.ini file and made the changes below:
auto_prepend_file =
/usr/local/apache/phplib-7.2/php/prepend.php3
include_path = .:/usr/local/apache/phplib-7.2/php

Then I restarted apache. Any ideas?

-Stephen Bolinger

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.