Date: 08/01/00
- Next message: Morgan: "[phplib] Templates, quotes being escaped???"
- Previous message: francis bouchard: "[phplib] HELP: page_close() error"
- Next in thread: Philippe Paravicini: "RE: [phplib] Can't use database, any ideas?"
- Reply: Philippe Paravicini: "RE: [phplib] Can't use database, any ideas?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
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>
- Next message: Morgan: "[phplib] Templates, quotes being escaped???"
- Previous message: francis bouchard: "[phplib] HELP: page_close() error"
- Next in thread: Philippe Paravicini: "RE: [phplib] Can't use database, any ideas?"
- Reply: Philippe Paravicini: "RE: [phplib] Can't use database, any ideas?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

