[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Test script



> Cool, I can get in.  Now I think the only hindrance to progress is that
> my test script still doesn't connect to the DB.  Have you (or anyone
> else) written a script in PHP, Perl, or whatever, that connects to it? 
> It's failing on the first line:
> 
>   $conn = mysql_pconnect( "vodka.linuxkb.org",  "nobody",  "nobody");

OK... sorry for the delay on this one.  I finally got to check out yur
test script.  Here were the issues:

#1 even if the script was 100% correct (which it would be given certain
variables in config) I had not given user nobody access to the linuxkb DB.
nobody now has select, insert, update, and delete perms though I think we
want to change this eventually and impliment a layer of security there...
fine now though for initial testing, I'll post my thoughts on that later.

#2 changes I made to the script to get it to work are available at
http://www.linuxkb.org/~jpincin/test.phps
old script was http://www.linuxkb.org/~micah/test.phps

working script is http://www.linuxkb.org/~jpincin/test.php

on the pconnect line I changed the host to localhost as thats the only
host I gave user nobody access from.

DB field names are case-sensative, I changed all instances of fname to
FName.

The database had to be selected.  I did this with the following line:
$selecteddb = mysql_select_db("linuxkb", $conn)

After that, all was right in the world.

Jason