Re: [PHP] RE: How can I check for characters in a $_POST[] variable?

2011-09-22 Thread Marco Lanzotti
Il 22/09/2011 17:54, Eric ha scritto: > if(preg_match('(.*)^[A-Za-z0-9]+', $_POST['username']) !== 0) { Whi this '(.*)'? For '.' and '..' problem use is_file(). Bye, Marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] What would you like to see in most in a text editor?

2011-09-16 Thread Marco Lanzotti
Il 13/09/2011 21:56, Brad Huskins ha scritto: > So I would like to get some feedback on what features people would > most want, since I am still at a very flexible stage in development. Configurable syntax highlight, autoindent and autocomplete. Bye, Marco -- PHP General Mailing List (http://ww

Re: [PHP] Stop PHP execution on client connection closed

2011-09-15 Thread Marco Lanzotti
Il 14/09/2011 19:34, Alex Nikitin ha scritto: > Perhaps if I, or we can understand your application a little better, > we could suggest better solutions, just remember that you are not the > first person to have to solve these similar issues. I can help you if > you want, glimpse over your database

Re: [PHP] Stop PHP execution on client connection closed

2011-09-14 Thread Marco Lanzotti
Il 14/09/2011 17:35, Jim Lucas ha scritto: > > SELECT ... FROM ... WHERE ... AND (1=1 OR 'unique value'); > > add 'unique value' to your session data and then, when the person changes the > selected fields and starts to execute another query, first, you could search > to > see if an SQL statement

Re: [PHP] Stop PHP execution on client connection closed

2011-09-14 Thread Marco Lanzotti
Il 13/09/2011 20:58, Alex Nikitin ha scritto: > Correction on Marco's post. You can absolutely stop a mysql query I know I can stop a query, but I don't know how to realize HTTP client has closed connection during query execution. My query count how many records match selected fields in a 50M rec

Re: [PHP] Re: Stop PHP execution on client connection closed

2011-09-13 Thread Marco Lanzotti
Il 13/09/2011 15:22, Eric Butera ha scritto: > Flush all buffers you have. Sometimes you have to do nasty hacks like > send a certain number of characters. I'm looking for a way to send some characters during query execution. > You might have better luck if you search for 'comet' or 'long polling

Re: [PHP] Re: Stop PHP execution on client connection closed

2011-09-13 Thread Marco Lanzotti
Il 13/09/2011 09:39, vikash.i...@gmail.com ha scritto: > > You can use ob_start() to start output buffering and ob_end_flush() to send > some data in the middle of script - that way your php script will send > some data to the client earlier than finishing execution and hence detect > the aborted

Re: [PHP] Re: Stop PHP execution on client connection closed

2011-09-13 Thread Marco Lanzotti
Il 12/09/2011 21:32, Al ha scritto: > See http://us2.php.net/manual/en/function.connection-aborted.php As I wrote, PHP doesn't detect that client aborted connection until it send some data. During query the script doesn't send any data to client, so it doesn't detect client aborted connenction. I

[PHP] Stop PHP execution on client connection closed

2011-09-12 Thread Marco Lanzotti
Hi all, I'm new in the list and I already have a question for you. I'm running an heavy query on my DB in a PHP script called by AJAX. Because client often abort AJAX connection to ask a new query, I need to stop query because DB will be too loaded. When AJAX connection is aborted, PHP script doesn