php-general Digest 17 Feb 2008 15:34:09 -0000 Issue 5298

2008-02-17 Thread php-general-digest-help
php-general Digest 17 Feb 2008 15:34:09 - Issue 5298 Topics (messages 269421 through 269429): Check time in between times 269421 by: Johny Burns 269423 by: Nathan Nobbe 269424 by: Emilio Astarita Re: Hex Strings Appended to Pathnames 269422 by: Mick Re:

Re: [PHP] Session destruction problem

2008-02-17 Thread Nick Stinemates
Adil Drissi wrote: Hi everybody, I need help with sessions. I have a simple authentification relying only on sessions (i don't use cookies). After the user submits his username and password, the script checks if that corresponds to a record in a mysql table. If this is the case

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Nick Stinemates
Petrus Bastos wrote: Hey folks, Do you know how can I create a protected zip file with password? Is there anyway? I've search on the internet, but without success. Thank's in advance, Petrus Bastos. The easiest way to accomplish this would be to write a wrapper function using the

Re: [PHP] Session destruction problem

2008-02-17 Thread Adil Drissi
Is your session being set in any other place but your login page? No, just in the page just to which the form of login and password points. Looking for last minute shopping deals? Find them

Re: [PHP] regex usage

2008-02-17 Thread Shawn McKenzie
Valedol wrote: Is there a mothod to check string`s length with regex or the only way is using strlen? I want string consisting of 4 digits and check string with this code: if (preg_match(/\d{4}/,$_POST[id])) { echo $_POST[id]; } but preg_match returns true when string consists of 4

Re: [PHP] regex usage

2008-02-17 Thread Richard Heyes
Is there a mothod to check string`s length with regex or the only way is using strlen? I want string consisting of 4 digits and check string with this code: if (preg_match(/\d{4}/,$_POST[id])) { echo $_POST[id]; } but preg_match returns true when string consists of 4 or more digits You

Re: [PHP] Re: stream_select problem with signals

2008-02-17 Thread Marcos Lois Bermúdez
Nathan Rixham escribió: socket_strerror(socket_last_error()) maybe? That i can see in PHP manual socket functions sre not bundled by default in PHP 5.3.0 and above, so if i'm using the stream implementation, how i can determine if a signal interrupt a stream_select call, the stream not will

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Hi Nick, Sorry, but I forgot to tell you that I can't use this exec neither system commands because they are disabled for security precautions. So, Do you have any other ideas on how can I do that? Thanks for your help, Petrus Bastos. On Feb 17, 2008 5:15 AM, Nick Stinemates [EMAIL

Re: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-17 Thread Daniel Brown
On Feb 16, 2008 6:22 PM, Rob Gould [EMAIL PROTECTED] wrote: I've got a PHP script that inserts 00012345678 into a record in a mySQL database (it's a barcode). Things work ok unless the number has preceding zeros, and then the zeros get cut off and all I get is 12345678. I have the mySQL

Re: [PHP] Session destruction problem

2008-02-17 Thread Daniel Brown
On Feb 16, 2008 3:31 PM, Adil Drissi [EMAIL PROTECTED] wrote: Hi everybody, I need help with sessions. I have a simple authentification relying only on sessions (i don't use cookies). Just to let you know, if you're using sessions, you're using cookies. You're not setting the data in

Re: [PHP] regex usage

2008-02-17 Thread Nirmalya Lahiri
--- Valedol [EMAIL PROTECTED] wrote: Is there a mothod to check string`s length with regex or the only way is using strlen? I want string consisting of 4 digits and check string with this code: if (preg_match(/\d{4}/,$_POST[id])) { echo $_POST[id]; } but preg_match returns true

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Daniel Brown
On Feb 16, 2008 3:39 PM, Petrus Bastos [EMAIL PROTECTED] wrote: Hey folks, Do you know how can I create a protected zip file with password? Is there anyway? I've search on the internet, but without success. If you have system() access, use something in the exec() family (and be sure

Re: [PHP] regex usage

2008-02-17 Thread Jim Lucas
Valedol wrote: Is there a mothod to check string`s length with regex or the only way is using strlen? I want string consisting of 4 digits and check string with this code: if (preg_match(/\d{4}/,$_POST[id])) { echo $_POST[id]; } but preg_match returns true when string consists of 4 or more

Re: [PHP] Session destruction problem

2008-02-17 Thread Adil Drissi
Hi, I suppose this can be used to solve the problem i posted. Can you please tell me how, or send a link to ressource explaining that? Thanks --- Daniel Brown [EMAIL PROTECTED] wrote: On Feb 16, 2008 3:31 PM, Adil Drissi [EMAIL PROTECTED] wrote: Hi everybody, I need help with sessions.

Re: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-17 Thread Nathan Rixham
Daniel Brown wrote: On Feb 16, 2008 6:22 PM, Rob Gould [EMAIL PROTECTED] wrote: I've got a PHP script that inserts 00012345678 into a record in a mySQL database (it's a barcode). Things work ok unless the number has preceding zeros, and then the zeros get cut off and all I get is 12345678.

[PHP] upload issue

2008-02-17 Thread nihilism machine
any idea why this fails?this is the error: Sorry, there was a problem uploading your file ?php require_once(classes/db.class.php); $target = ; $fileName = basename( $_FILES['uploaded']['name']); $extension = strtolower(strrchr($fileName,.)); $DB = new DB(); $insertID = $DB-insert_sql(INSERT

Re: [PHP] Session destruction problem

2008-02-17 Thread tedd
At 12:31 PM -0800 2/16/08, Adil Drissi wrote: Hi everybody, I need help with sessions. I have a simple authentification relying only on sessions (i don't use cookies). After the user submits his username and password, the script checks if that corresponds to a record in a mysql table. If this

Re: [PHP] upload issue

2008-02-17 Thread Børge Holen
On Sunday 17 February 2008 19:22:03 nihilism machine wrote: any idea why this fails?this is the error: Sorry, there was a problem uploading your file ?php require_once(classes/db.class.php); $target = ; $fileName = basename( $_FILES['uploaded']['name']); $extension =

Re: [PHP] Session destruction problem

2008-02-17 Thread Adil Drissi
Hi, Thanks for the link, it is very interesting, but as the author says, the solutions are not perfect. I'm wondering how yahoo mail for example are doing, or maybe they are using something else (not php)? Thank you --- tedd [EMAIL PROTECTED] wrote: At 12:31 PM -0800 2/16/08, Adil Drissi

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Nick Stinemates
Petrus Bastos wrote: Hi Nick, Sorry, but I forgot to tell you that I can't use this exec neither system commands because they are disabled for security precautions. So, Do you have any other ideas on how can I do that? Thanks for your help, Petrus Bastos. On Feb 17, 2008 5:15 AM,

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Unfortunately I don't have access to this family of methods because security policy. Lefting this way out, I didn't find anyway on how to do that. If you have any idea or know any module can do that, I'll appreciate to know too! Thanks in advance, Petrus Bastos. On Feb 17, 2008 2:30 PM, Daniel

Re: [PHP] Better DB Class MySQL

2008-02-17 Thread Larry Garfield
On Thursday 14 February 2008, Richard Lynch wrote: On Sun, February 10, 2008 9:31 am, Jochem Maas wrote: Larry Garfield schreef: http://www.php.net/pdo All the cool kids are doing it. not true - some of them use firebird ;-) And some have figured out that PDO does not quite live up

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Nick, I thank you help! But unfortunalety I didn't find way to do this. I'll continue trying. If you have any other idea, I'll appreciate to hear! Best regards, Petrus Bastos. On Feb 17, 2008 4:57 PM, Nick Stinemates [EMAIL PROTECTED] wrote: Petrus Bastos wrote: Hi Nick, Sorry,

[PHP] separating strings from extensions

2008-02-17 Thread nihilism machine
i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can i get the text BEFORE the . (period) ? thanks in advance. -e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] separating strings from extensions

2008-02-17 Thread Børge Holen
On Monday 18 February 2008 00:10:30 John Meyer wrote: Daniel Brown wrote: On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can i get the text BEFORE the .

Re: [PHP] separating strings from extensions

2008-02-17 Thread John Meyer
Daniel Brown wrote: On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can i get the text BEFORE the . (period) You can STFW and RTFM. This list should

Re: [PHP] separating strings from extensions

2008-02-17 Thread Daniel Brown
On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can i get the text BEFORE the . (period) You can STFW and RTFM. This list should never be your first place to

Re: [PHP] separating strings from extensions

2008-02-17 Thread John Meyer
Børge Holen wrote: On Monday 18 February 2008 00:10:30 John Meyer wrote: Daniel Brown wrote: On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can

Re: [PHP] separating strings from extensions

2008-02-17 Thread Nick Stinemates
John Meyer wrote: Børge Holen wrote: On Monday 18 February 2008 00:10:30 John Meyer wrote: Daniel Brown wrote: On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension =

[PHP] Re: Session destruction problem

2008-02-17 Thread Shawn McKenzie
Adil Drissi wrote: Hi everybody, I need help with sessions. I have a simple authentification relying only on sessions (i don't use cookies). After the user submits his username and password, the script checks if that corresponds to a record in a mysql table. If this is the case

Re: [PHP] separating strings from extensions

2008-02-17 Thread Brady Mitchell
On Feb 17, 2008, at 256PM, Daniel Brown wrote: On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can i get the text BEFORE the . (period) You can STFW and RTFM.

Re: [PHP] upload issue

2008-02-17 Thread Chris
nihilism machine wrote: any idea why this fails?this is the error: Sorry, there was a problem uploading your file It can't move the file to the $target location, or maybe the file wasn't uploaded properly in the first place. What's in $_FILES['uploaded']['error'] ?

Re: [PHP] upload issue

2008-02-17 Thread Chris
Børge Holen wrote: On Sunday 17 February 2008 19:22:03 nihilism machine wrote: any idea why this fails?this is the error: Sorry, there was a problem uploading your file ?php require_once(classes/db.class.php); $target = ; $fileName = basename( $_FILES['uploaded']['name']); $extension =

Re: [PHP] upload issue

2008-02-17 Thread Børge Holen
On Monday 18 February 2008 00:59:31 Chris wrote: Børge Holen wrote: On Sunday 17 February 2008 19:22:03 nihilism machine wrote: any idea why this fails?this is the error: Sorry, there was a problem uploading your file ?php require_once(classes/db.class.php); $target = ;

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Chris
Petrus Bastos wrote: Unfortunately I don't have access to this family of methods because security policy. Lefting this way out, I didn't find anyway on how to do that. If you have any idea or know any module can do that, I'll appreciate to know too! See if the pear package does what you want:

Re: [PHP] Better DB Class MySQL

2008-02-17 Thread Andrew Ballard
On Feb 17, 2008 3:49 PM, Larry Garfield [EMAIL PROTECTED] wrote: On Thursday 14 February 2008, Richard Lynch wrote: On Sun, February 10, 2008 9:31 am, Jochem Maas wrote: Larry Garfield schreef: http://www.php.net/pdo All the cool kids are doing it. not true - some of them use

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Chris, Thanks for your help, but I think that package can't make what I want. But , I appreciate your help anyway and if you have any other ideas, please let me know! :) Thanks, Petrus Bastos. On Feb 17, 2008 10:38 PM, Chris [EMAIL PROTECTED] wrote: Petrus Bastos wrote: Unfortunately I

Re: [PHP] Re: Session destruction problem

2008-02-17 Thread Adil Drissi
Well, i'm doing all that. Maybe something is wrong in my code. I'll arrange my code in a way that it will be easy to run and i'll post it. I think like that, you'll see by yourself and you gonna help to fix that for sure. Thank you --- Shawn McKenzie [EMAIL PROTECTED] wrote: Adil Drissi wrote:

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Nick Stinemates
Petrus Bastos wrote: Chris, Thanks for your help, but I think that package can't make what I want. But , I appreciate your help anyway and if you have any other ideas, please let me know! :) Thanks, Petrus Bastos. On Feb 17, 2008 10:38 PM, Chris [EMAIL PROTECTED] wrote: Petrus

Re: [PHP] Re: Session destruction problem

2008-02-17 Thread Shawn McKenzie
Adil Drissi wrote: Well, i'm doing all that. Maybe something is wrong in my code. I'll arrange my code in a way that it will be easy to run and i'll post it. I think like that, you'll see by yourself and you gonna help to fix that for sure. Thank you --- Shawn McKenzie [EMAIL PROTECTED]