Re: [PHP-DB] Locating php.ini file

2001-09-10 Thread John Pickett

Jeff,

I believe /usr/local/lib is the path for the application.  The ini file is
typically located in /etc...

For example, mine is:  /etc/php.ini

Hope this helps, cheers!

John Pickett
http://www.bvstudios.com/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Locating php.ini file

2001-09-10 Thread John Pickett

Jeff,

This also worked for me (sorry for the double-post):

[root@server johnp]# find / -name php.ini

Make sure you're logged in as root just in case although it should work
anyway...

That'll return filenames of php.ini in every directory (I think, not very
literate with CLI yet ;-)).  L8R!

John


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Password Question

2001-08-31 Thread John Pickett

Ugh, need to proof-read...  Let me repost:

Jeff,

In order to maintain a strong encryption of passwords, you should probably
use an MD5 hash.  Unfortunately, this is a one-way street.  What I would
suggest doing however, is not actually attempt to give the user their
password, but allow them to change it.

To do this, you would need to have some sort of lost password script.  This
would ask for an email address as input (you might also consider allowing a
username input... or both).  The script would then insert a new MD5 hash of
some useful, but meaningless information into the database (same row as
their
user information, such as a timestamp or something similar...  Of course,
you
might want to make it a little more difficult than that for genuine
randomness...
It would then email a URL of another script with this MD5 hash in the URL.
When the go to the URL, you would check the MD5 hash they provide with
the one you stored in the database.  If it matches, you can let them change
their password.

I've never actually done this, but it seems logical and is definately how
I'd do it given the need...  Cheers!


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Password Question

2001-08-31 Thread John Pickett
 seen this done
however, many sites use it I believe...  I'm providing this information
as-is, with no warranty of its' security level or anything of the sort...
Just don't wanna get crap if it isn't executed correctly :-)  Cheers!

John Pickett
http://www.bvstudios.com/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Random question selection in PHP w/ MySQL backend.

2001-07-31 Thread John Pickett

Adam,

I'm what I would call a novice to PHP and databases in general, however if I
had to do what you're doing, I might do the following...

Add a field to the table that contains your questions called displayed and
have it be an enum of Yes/No True/False, etc...  In your script, you'd then
query for all the questions that haven't already been displayed.  Then get a
random one of those (plenty of randomizing functions in PHP I believe).
Display it, mark it as displayed in the db...  Next time, it won't even get
returned in the query.  I don't know if you have to do this on a per-user
basis or what.  If so, you will probably have to create a session table and
keep track of the questions each user has viewed...  Hope this gets you
started...  Cheers!

My 2 ¢
John Pickett
http://www.bvstudios.com/
Co-Author:  Inside Dreamweaver 4
http://www.amazon.com/exec/obidos/ASIN/0735710848/xtremist

- Original Message -
From: Adam Lundrigan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 2:32 PM
Subject: [PHP-DB] Random question selection in PHP w/ MySQL backend.


I'm having a bit of trouble creating a random question selector. I'm using
PHP 4.0.6 and MySQL 3.23.36 on Windows 98 SE.
I've tried several different solutions, but none work at all.

What i need to do is select 10 questions from a database (db: vpt, table:
questions), and make sure that the same question doesn't appear twice. The
questions need to appear in a random order each time the script is loaded.
It sounds simple enough, but i just can't seem to get it to work.

Any suggestions??


Thanks in advance,

-Adam Lundrigan
 CEO, VPU
 http://www.vpu-virtual.com/

 ICQ # 73617446
 [EMAIL PROTECTED]





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Allowing refresh without form processing?

2001-07-25 Thread John Pickett

Hey,

I have a page where I'd like to allow the client to use their refresh
button.  The only problem with this is, when they submit a form that's on
the page, it is parsed by the same page.  So if they hit refresh, the same
information will be submitted twice (or more).  How can I clear out any
knowledge that a form was submitted?  I've tried adding unset
($HTTP_POST_VARS); to the bottom of the page but that didn't do anything for
it...  Any other ideas?

BTW, I'm asking this because the form uses a db to process and I'm unsure if
that may be the issue or not...

My 2 ¢
John Pickett
http://www.bvstudios.com/
Co-Author:  Inside Dreamweaver 4
http://www.amazon.com/exec/obidos/ASIN/0735710848/xtremist



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Unexplained MySQL Error..

2001-07-20 Thread John Pickett

Chris:  The MySQL documentation would make you think so...

UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
SET col_name1=expr1, [col_name2=expr2, ...]
[WHERE where_definition]
[LIMIT #]

Note there isn't a tbl_name [, tbl_name2, ...].  It's just tbl_name...
Cheers!

My 2 ¢
John Pickett
http://www.bvstudios.com/
Co-Author:  Inside Dreamweaver 4
http://www.amazon.com/exec/obidos/ASIN/0735710848/xtremist

- Original Message -
From: Boget, Chris [EMAIL PROTECTED]
To: 'Mike Gifford' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 2:25 PM
Subject: RE: [PHP-DB] Unexplained MySQL Error..


  UPDATE
  WLPbib, WLPpublisher,WLPprofile,WLPbib2profile

 I think you can only update one table at a time...
 I could be wrong, though...

 Chris



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Unexplained MySQL Error..

2001-07-20 Thread John Pickett

Chris,

My first sentance was in response to your I think you can only update one
table at a time... statement, not I could be wrong, though...  Supported
by the example I gave.  Sorry for the confusion...

My 2 ¢
John Pickett
http://www.bvstudios.com/
Co-Author:  Inside Dreamweaver 4
http://www.amazon.com/exec/obidos/ASIN/0735710848/xtremist

- Original Message -
From: Boget, Chris [EMAIL PROTECTED]
To: 'John Pickett' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 2:35 PM
Subject: RE: [PHP-DB] Unexplained MySQL Error..


  Chris:  The MySQL documentation would make you think so...

 I don't think so

  UPDATE [LOW_PRIORITY] [IGNORE] tbl_name
  Note there isn't a tbl_name [, tbl_name2, ...].  It's just tbl_name...

 Right... that means just *one* table.  Your query is updating
 4 tables.

 Chris



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Error 127

2001-07-19 Thread John Pickett

Cami,

Here's what I found on the error and what to do about it:

http://www.mysql.com/doc/R/e/Repair.html

Hope that helps!

My 2 ¢
John Pickett
http://www.bvstudios.com/
Co-Author:  Inside Dreamweaver 4
http://www.amazon.com/exec/obidos/ASIN/0735710848/xtremist
  - Original Message - 
  From: Cami 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 19, 2001 8:56 AM
  Subject: [PHP-DB] Error 127



  Hi everybody,
  All of the sudden I got an error one of mysql tables.
  Got error 127 from table handler.
  Can't browse it not even from phpmyadmin get the same error. Anybody had
  this before? What do I do to recuperate my table?
  I really appreciate any help,
  Thanks,
  Cami


  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]