Date: 08/02/00
- Next message: INFO jpmnet.de: "Re: [phplib] Multiple database handling in one app. What if ...?"
- Previous message: layne <email protected>: "RE: [phplib] Multiple database handling in one app. What if ...?"
- In reply to: Ken: "[phplib] Can't use database, any ideas?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
For one thing, the latest phplib is version 7.2c. I am not familiar with
version 6.1, but I am not sure that you are having a problem with phplib.
It seems that the problem is with mySql.
Step 13 moves the example pages to the localhost/pages directory (ie
/usr/local/apache/htdocs/pages) but you do not show anything being moved to
/usr/local/apache/htdocs/phplib (localhost/phplib), which would explain the
page not found errors.
Regarding the mysql error, can you connect to the poe_sessions database from
the mysql command line? If so, what user name/password are you using?
It would appear that your script is successfully connecting to mySQL but is
using a user name/password that does not have permissions to use the
poe_sessions database, hence the error.
pp
> -----Original Message-----
> From: Ken [mailto:knowack <email protected>]
> Sent: Tuesday, August 01, 2000 3:57 PM
> To: phplib <email protected>
> Subject: [phplib] Can't use database, any ideas?
>
>
> Hello all,
>
> This is my first post to this list.
>
> //<?Dislcaimer
> //*Newbie to PHP*
> //End Disclaimer ?>
>
> I bought a book and have been following the instructions to get MySQL,
> Apache, PHP, PHPMyAdmin, and phplib installed.
> Everything installed fine and functioned expcept for phplib. Here's what I
> have done so far.
>
> The instructions said to do the following:
>
>
> Installing PHPLIB -
> PHPLIB needs to be installed before you read Chapter 15, "Managing
> Concurrent Access". Follow these steps:
>
> 1.Login as the root user, or any other user that can write files in the
> /usr/local/apache directory.
>
> 2.cd /usr/local/apache/ - Connects to the web server root
> directory before
> beginning the download.
>
> 3.Download the latest version from the following web site. Take
> notice of
> the gz file's name just in case it
> has been changed from phplib.tar.gz.
>
> http://phplib.shonline.de/
>
> 4.tar xvzf phplib.tar.gz - Uncompresss the PHPLIB module.
>
> 5.Edit the /usr/local/lib/php3.ini file so the following lines are
> included:
>
> include_path=.:/usr/local/apache/phplib-6.1/php
> auto_prepend_file = /usr/local/apache/phplib-6.1/php/prepend.php3
> track_vars = on
> magic_quotes_gpc = on
> sendmail_path /usr/sbin/sendmail -t
>
> 6.Create a mysql database called poe_sessions. I used
> phpMyAdmin, but you
> can issue SQL commands if
> you'd prefer.
>
> 7.cd /usr/local/apache/phplib-6.1/stuff - Connect to the directory of
> table creation scripts.
>
> 8.mysql php_book --user=root --password < create_database.mysql
> - Creates
> the database tables
> needed by PHPLIB.
>
> 9.Create a new record in the user table of the mysql database
> using these
> values
>
> host: %
> password: <-- no password.
> select_priv: Yes
> insert_priv: Yes
> update_priv: Yes
> delete_priv: Yes
>
> for users named "kris", "user01", and "user02".
>
> Note: You can use the following SQL:
>
> INSERT INTO
> user
> (
> Host
> ,User
> ,Password
> ,Select_priv
> ,Insert_priv
> ,Update_priv
> ,Delete_priv
> )
> VALUES (
> '%'
> ,'kris'
> ,''
> ,'Y','Y','Y','Y'
> )
>
> 10.Create a new record in the db table of the mysql database using these
> values
>
> host: %
> db: poe_sessions
> select_priv: Yes
> insert_priv: Yes
> update_priv: Yes
> delete_priv: Yes
>
> for users named "kris", "user01", and "user02".
>
> Note: You can use the following SQL:
>
> INSERT INTO
> db
> (
> Host
> ,Db
> ,User
> ,Select_priv
> ,Insert_priv
> ,Update_priv
> ,Delete_priv
> )
> VALUES (
> '%'
> ,'poe_sessions'
> ,'kris'
> ,'Y', 'Y', 'Y', 'Y'
> )
>
> 11./usr/local/mysql/bin/mysqladmin -u root -p reload - reload the MySQL
> privledge tables.
>
> 12.Create two PHPLIB authorized users (user01 and user02) using the
> following SQL in the php_book
> database:
>
> INSERT INTO
> auth_user
> (
> uid
> ,username
> ,password
> ,perms
> ) VALUES (
> 'c14cbf141ab1b7cd009356f555b1234'
> ,'user01'
> ,'test'
> ,'admin')
>
> INSERT INTO
> auth_user
> (
> uid
> ,username
> ,password
> ,perms
> ) VALUES (
> 'c14cbf141ab1b7cd009356f555b3241'
> ,'user02'
> ,'test'
> ,'admin')
>
> ****Everything up to here went fine.
>
> 13.mv /usr/local/apache/phplib-6.1/pages
> /usr/local/apache/htdocs/ - Moves
> the demonstration
> directory under the web server's root directory so they can
> be accessed
> via a browser.
>
> 14.Edit your /usr/local/apache/htdocs/robots.txt file to include the
> following line:
>
> Disallow: /phplib/
>
> 15.Use a web browser to connect to http://localhost/phplib/. You
> should see
> a page like Figure 2.1. Figure 2.1
> - The PHPLIB demo pages after reloading twice.
>
> End instructions.
>
> *** When I tried to access the phplib directory I got 404, file not found
> error. In order to access the directory
> I have to use http://localhost/pages/ whice gives me the index.php3 file.
> Instead of looking how it is supposed to though
> I get the following:
>
> Database error: cannot use database poe_sessions
> MySQL Error: 0 ()
> Session halted.
>
> ***So I am at a loss. Here is what my php3.ini file looks like
> for accuracy:
>
> -->Begin file
> include_path=.:/usr/local/apache/php/
> auto_prepend_file=/usr/local/apache/php/prepend.php3
> track_vars = on
> magic_quotes_gpc = on
> sendmail_path /usr/sbin/sendmail -t
> include_path=.:/usr/local/apache/phplib-6.1/php
> auto_prepend_file = /usr/local/apache/phplib-6.1/php/prepend.php3
> track_vars = on
> magic_quotes_gpc = on
> sendmail_path /usr/sbin/sendmail -t
> <--End file
>
> ****My apologies if I included too much or too little
> information. Im new to
> this as I said. Thanks for taking the time
> to look over this. Let me know if you have any ideas about how I could fix
> it.
>
> Thanks very much,
>
> Ken
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: INFO jpmnet.de: "Re: [phplib] Multiple database handling in one app. What if ...?"
- Previous message: layne <email protected>: "RE: [phplib] Multiple database handling in one app. What if ...?"
- In reply to: Ken: "[phplib] Can't use database, any ideas?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

