RE: [PHP-DB] Cannot print the data from database in the webpage

2009-02-14 Thread Chris Verges
You may also want to look into the heredoc string literals. It may or may not help you with some of these longer "echo" commands. http://www.tizag.com/phpT/strings.php has a good explanation, and of course the bible is at http://us2.php.net/manual/en/language.types.string.php#language.types.s

RE: [PHP-DB] INSERT img+ID

2009-01-24 Thread Chris Verges
Hi Emiliano, You may want to look at escaping your $_POST, $_REQUEST, and $_GET variables before using them in their raw form. Otherwise, you may be susceptible to SQL injection attacks. http://us2.php.net/mysql_escape_string This may also affect the upload of your binary data using SQL, sinc

Re: [PHP-DB] upload file [heur]

2008-07-04 Thread Chris Verges
Hey Ron, One method that I've used in the past is to dedicate one server based on some kind of hashing algorithm (username?) to be the upload server. That server should have a unique DNS entry (www2.domain.ext) which all URLs that need upload processing refer to. The other way to do it is to sto

Re: [PHP-DB] Password Reset [bayes]

2008-02-26 Thread Chris Verges
Don't. Re-generate a randomized password and force the user to reset it upon first login. Only allow the user to do this if they answer a security question successfully. It's how many online entities will perform password recovery. Thanks, Chris On 2/26/08 10:52 PM, "Nasreen Laghari" <[EM

Re: [PHP-DB] die vs exception

2007-04-29 Thread Chris Verges
The DB and MDB2 packages in the PEAR library use a third option, which is to return an "Error" subclass as the result rather than "throw"ing it. Prons and cons for all, just wanted to throw in this option too. Btw, both the DB and MDB2 packages are already generic classes that support mssql as we

Re: [PHP-DB] Forking and database connections

2007-04-23 Thread Chris Verges
For anyone interested in following the progress of this forking/PEAR::DB issue, see http://pear.php.net/bugs/bug.php?id=10813. Thanks, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Forking and database connections

2007-04-23 Thread Chris Verges
Hey Dwight, After getting your first e-mail, I started adding the PEAR::DB persistent connection code. Unfortunately, it yielded the same results that I was getting before. At a hunch, I created a second proof-of-concept script that uses the mysql_* functions in the PHP base. For each of these,

Re: [PHP-DB] Forking and database connections

2007-04-23 Thread Chris Verges
cntl_waitpid($pid, $status) ? Just reverse the lines? >> >> I think after the wait is when the child closes the connection (since I >> suppose you are reusing the same connection), so it is already closed. >> >> >> Regards, >> Dwight >>> -Ori

[PHP-DB] Forking and database connections

2007-04-21 Thread Chris Verges
Hey all, I'm writing a PHP script that queries a database for some records, splits the records into N number of groups of equal size, and then creates N number of forks where each child handles one of the groups. During the execution of each of the child processes, I'd like the parent process to