php-general Digest 13 Sep 2011 07:35:55 - Issue 7475
Topics (messages 314774 through 314779):
Re: PHP cron job optimization
314774 by: Igor Escobar
314775 by: Eric Butera
314777 by: Igor Escobar
Stop PHP execution on client connection closed
314776 by: Marco
php-general Digest 13 Sep 2011 19:36:47 - Issue 7476
Topics (messages 314780 through 314811):
Re: Stop PHP execution on client connection closed
314780 by: vikash.iitb.gmail.com
314781 by: Marco Lanzotti
314788 by: Eric Butera
314789 by: yeer tai
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
On 13 September 2011 13:05, Marco Lanzotti ma...@lanzotti.com wrote:
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
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
Hi,
Recently, I decided to use PHP FPM, installation went well, I configured it
with Nginx.
I can run php script without any issue.
But when I used a script to connect to Oracle database using oci module, I
got a blank page.
Below is the code I am using in script.
?php
$c = oci_connect(mydb,
Hi,
Recently, I decided to use PHP FPM, installation went well, I configured it
with Nginx.
I can run php script without any issue.
But when I used a script to connect to Oracle database using oci module, I
got a blank page.
Below is the code I am using in script.
?php
$c = oci_connect(mydb,
is your oci module enabled in php.ini?
I mean something like this?
extension=oci8.so
Yes, it is enabled, I checked through phpinfo()
On Tue, Sep 13, 2011 at 2:54 PM, Negin Nickparsa nickpa...@gmail.comwrote:
is your oci module enabled in php.ini?
I mean something like this?
extension=oci8.so
use gdb
Could you please tell me how to use GDB here?
On Tue, Sep 13, 2011 at 4:07 PM, Negin Nickparsa nickpa...@gmail.comwrote:
use gdb
On Tue, Sep 13, 2011 at 4:01 AM, Marco Lanzotti ma...@lanzotti.com wrote:
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
You can use ajax.
Date: Tue, 13 Sep 2011 09:22:54 -0400
From: eric.but...@gmail.com
To: ma...@lanzotti.com
CC: php-general@lists.php.net
Subject: Re: [PHP] Re: Stop PHP execution on client connection closed
On Tue, Sep 13, 2011 at 4:01 AM, Marco Lanzotti ma...@lanzotti.com wrote:
Il
I have a MySQL database table with about 10,000 rows. If I want to
query for 50 specific users (so no LIMIT ORDER BY) then I seem to have
these choices:
1) SELECT * FROM table
This will pull in all 10,000 rows, not nice!
2) foreach ($user as $u) { mysql_query(SELECT * FROM table WHERE
Dotan Cohen dotanco...@gmail.com wrote:
I have a MySQL database table with about 10,000 rows. If I want to
query for 50 specific users (so no LIMIT ORDER BY) then I seem to have
these choices:
1) SELECT * FROM table
This will pull in all 10,000 rows, not nice!
2) foreach ($user as $u) {
Yes there is but all the IDs in one string like this
$ids = $id1.', '.$id2.', ' ;
note : remove the last comma from the string
the make the query like this:
mysql_query(SELECT * FROM table WHERE
userID= in($ids ) }
On Tue, Sep 13, 2011 at 7:24 AM, Dotan Cohen dotanco...@gmail.com wrote:
I have
On Tue, 2011-09-13 at 17:24 +0300, Dotan Cohen wrote:
I have a MySQL database table with about 10,000 rows. If I want to
query for 50 specific users (so no LIMIT ORDER BY) then I seem to have
these choices:
1) SELECT * FROM table
This will pull in all 10,000 rows, not nice!
2) foreach
select * from table where userID in(1,2,3,etc)
From: a...@ashleysheridan.co.uk
Date: Tue, 13 Sep 2011 15:29:26 +0100
To: dotanco...@gmail.com; php-general@lists.php.net
Subject: Re: [PHP] Querying a database for 50 users' information: 50 queries
or a WHERE array?
Dotan Cohen
I enabled debug in log and found this in the log file
[13-Sep-2011 17:03:19.966801] DEBUG: pid 16974, fpm_got_signal(), line 76:
received SIGCHLD
[13-Sep-2011 17:03:19.966832] WARNING: pid 16974, fpm_children_bury(), line
252: [pool www] child 16992 exited on signal 11 (SIGSEGV) after 58.213448
yeer tai yeer...@hotmail.com wrote:
select * from table where userID in(1,2,3,etc)
From: a...@ashleysheridan.co.uk
Date: Tue, 13 Sep 2011 15:29:26 +0100
To: dotanco...@gmail.com; php-general@lists.php.net
Subject: Re: [PHP] Querying a database for 50 users' information: 50
queries or a
Oh no, he stole your internet points!
On Tue, Sep 13, 2011 at 10:44 AM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
yeer tai yeer...@hotmail.com wrote:
select * from table where userID in(1,2,3,etc)
From: a...@ashleysheridan.co.uk
Date: Tue, 13 Sep 2011 15:29:26 +0100
To:
On 13/09/2011 09:01, Marco Lanzotti wrote:
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
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.'
On 9/12/2011 7:40 AM, Marco Lanzotti wrote:
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.
On Tue, Sep 13, 2011 at 7:29 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
SELECT * FROM table WHERE userID IN (1,2,3,4,5,etc)
+1. And this is a great place to use implode():
$sql = 'select ... where userID in (' . implode(',', $ids) . ')';
David
On Tue, 2011-09-13 at 09:48 -0700, David Harkness wrote:
On Tue, Sep 13, 2011 at 7:29 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
SELECT * FROM table WHERE userID IN (1,2,3,4,5,etc)
+1. And this is a great place to use implode():
$sql = 'select ... where userID in (' .
Another theoretical approach, given the grey areas, would be to add a
field to your table to indicate these special users. I would call
the field is_awesome and have it default to zero, because that's
just the way it is. Then you can make your query SELECT * FROM users
WHERE is_awesome=1. This
On Tue, Sep 13, 2011 at 2:06 PM, Steve Staples sstap...@mnsi.net wrote:
On Tue, 2011-09-13 at 09:48 -0700, David Harkness wrote:
On Tue, Sep 13, 2011 at 7:29 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:
SELECT * FROM table WHERE userID IN (1,2,3,4,5,etc)
+1. And this is a
Is there a way to only change accented characters and not HTML (Example: p
/p a href =”” /a )
The syntax
echo htmlentities( stripslashes(mysql_result($whats_new_result,0,message)) )
. \r\n;
is doing everything (as I expect). I store breaking news within the database
as HTML formatted text.
You could store the accented characters in your DB if you set
everything to UTF-8, including calling the SET NAMES utf8 MySQL
command after connecting. I find this much easier than
encoding/decoding.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Tue, Sep 13, 2011 at 11:44 AM, Jim Lucas li...@cmsws.com wrote:
On 9/12/2011 7:40 AM, Marco Lanzotti wrote:
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
On Tue, Sep 13, 2011 at 10:40 AM, linuxsupport lin.supp...@gmail.comwrote:
I enabled debug in log and found this in the log file
[13-Sep-2011 17:03:19.966801] DEBUG: pid 16974, fpm_got_signal(), line 76:
received SIGCHLD
[13-Sep-2011 17:03:19.966832] WARNING: pid 16974, fpm_children_bury(),
On 9/13/2011 11:58 AM, Alex Nikitin wrote:
On Tue, Sep 13, 2011 at 11:44 AM, Jim Lucas li...@cmsws.com wrote:
On 9/12/2011 7:40 AM, Marco Lanzotti wrote:
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.
Absolutely, it was only a minor correction of a sub-point.
--
The trouble with programmers is that you can never tell what a programmer is
doing until it’s too late. ~Seymour Cray
On Tue, Sep 13, 2011 at 3:20 PM, Jim Lucas li...@cmsws.com wrote:
On 9/13/2011 11:58 AM, Alex Nikitin wrote:
On Tue, Sep 13, 2011 at 17:29, Ashley Sheridan a...@ashleysheridan.co.uk
wrote:
SELECT * FROM table WHERE userID IN (1,2,3,4,5,etc)
Much smaller than what you proposed in #3, and easier to make if your user is
list is already an array.
Thank you Ash, that is exactly what I was looking for!
On Tue, Sep 13, 2011 at 17:32, muad shibani muad.shib...@gmail.com wrote:
Yes there is but all the IDs in one string like this
$ids = $id1.', '.$id2.', ' ;
note : remove the last comma from the string
the make the query like this:
mysql_query(SELECT * FROM table WHERE
userID= in($ids ) }
On Tue, Sep 13, 2011 at 17:34, Steve Staples sstap...@mnsi.net wrote:
what criteria are you using to get the stats for these 50 users?
They are passed as an array into a function I'm cleaning up.
also, wouldn't this be much better suited for the mysql mailing list?
Yes.
if you know all
On Tue, Sep 13, 2011 at 21:06, Steve Staples sstap...@mnsi.net wrote:
I mentioned that implode earlier, but there is also the underlying
question (which I also asked earlier)... how is he getting the 50 id's
to populate?
here are 2 other ways of skinning the cat:
using an inner join:
On Tue, Sep 13, 2011 at 21:34, Alex Nikitin niks...@gmail.com wrote:
And this will be faster or at least more efficient with a limit (e.g. limit
50) this way when you have found the 50 users in the in statement, you
don't continue iterating through the rest of your data set...
The number is
On Tue, Sep 13, 2011 at 3:45 PM, Dotan Cohen dotanco...@gmail.com wrote:
On Tue, Sep 13, 2011 at 21:34, Alex Nikitin niks...@gmail.com wrote:
And this will be faster or at least more efficient with a limit (e.g.
limit
50) this way when you have found the 50 users in the in statement, you
Hello all you php coders out there,
I'm doing an Open Source text editor (just a hobby) that's designed for
PHP developers and is accessible through the web. This has been stewing
for a while, and has gotten to the point where I can use it for my own
work. I would like any feedback on things
Hello all you PHP devs,
I'm building an Open Source text editor accessible through the web. It
has been brewing for a while in one form or another. But I think I
finally have something solid to build on. I would like some feedback on
things people like/dislike about their current editors.
I
Hello all you php coders out there,
I'm doing an Open Source text editor (just a hobby) that's designed for
PHP developers and is accessible through the web. This has been stewing
for a while, and has gotten to the point where I can use it for my own
work. I would like any feedback on things
On 11-09-13 03:56 PM, Brad Huskins wrote:
Hello all you php coders out there,
I'm doing an Open Source text editor (just a hobby) that's designed for
PHP developers and is accessible through the web. This has been stewing
for a while, and has gotten to the point where I can use it for my own
My apologies for the triplicate errors. My newsgroup client is doing
screwy things.
Again, I am SO sorry for the multiple posts.
/Brad.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 09/13/2011 01:38 PM, Ron Piggott wrote:
Is there a way to only change accented characters and not HTML (Example: p
/p a href =”” /a )
The syntax
echo htmlentities( stripslashes(mysql_result($whats_new_result,0,message))
) . \r\n;
is doing everything (as I expect). I store
+1 on terminal.
For gui-based ones, i like to be able to syntax check my code and run it
from within the editor window, tabs for dozens of files i usually have open
at once, highlight that supports many languages as i can be working on many
at once (php, css, js, ruby, python, C, lua, sql, for
+ extensible plug-ins.
Regards,
Igor Escobar
*Software Engineer
*
+ http://blog.igorescobar.com
+ http://www.igorescobar.com
+ @igorescobar http://www.twitter.com/igorescobar
On Tue, Sep 13, 2011 at 6:13 PM, Alex Nikitin niks...@gmail.com wrote:
+1 on terminal.
For gui-based ones, i
On 09/13/2011 04:35 PM, Robert Cummings wrote:
On 11-09-13 03:56 PM, Brad Huskins wrote:
Hello all you php coders out there,
I'm doing an Open Source text editor (just a hobby) that's designed for
PHP developers and is accessible through the web. This has been stewing
for a while, and has
On Tue, Sep 13, 2011 at 18:50, Brad Huskins brad.husk...@gmail.com wrote:
Thanks for the input.
Brad, I'd be willing to bet that, if you added in the ability for
multiple users to simultaneously view and edit the same file without
issues of corruption and such (think along the same lines as
On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummings rob...@interjinn.com wrote:
I'm a big fan of editors that work in the terminal.
You'll get my emacs when you pry it out of my cold dead hands.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 9/13/2011 5:23 PM, tamouse mailing lists wrote:
On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummings rob...@interjinn.com wrote:
I'm a big fan of editors that work in the terminal.
You'll get my emacs when you pry it out of my cold dead hands.
+1
mg too
--
PHP General Mailing List
On 09/13/2011 08:40 PM, Jim Lucas wrote:
On 9/13/2011 5:23 PM, tamouse mailing lists wrote:
On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummings rob...@interjinn.com
wrote:
I'm a big fan of editors that work in the terminal.
You'll get my emacs when you pry it out of my cold dead hands.
+1
Daniel,
Thanks for your response. That's the direction I was thinking of taking
this, but wanted to get some input before I got ahead of myself.
-Brad.
On 09/13/2011 06:54 PM, Daniel Brown wrote:
On Tue, Sep 13, 2011 at 18:50, Brad Huskinsbrad.husk...@gmail.com wrote:
Thanks for the
Oh geez. Didn't mean to start a flame war...
On 09/13/2011 08:56 PM, James Yerge wrote:
On 09/13/2011 08:40 PM, Jim Lucas wrote:
On 9/13/2011 5:23 PM, tamouse mailing lists wrote:
On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummingsrob...@interjinn.com wrote:
I'm a big fan of editors that work
Hi,
There are 2 peoblems with subselect
1. You cant use a limit on the nested select
2. Id the number of elements in the in clause exceeds the subselect buffer
you will run into performance issues ans eventually you query will be
doomed. Inner joins in,this is the best option for this . You can
On 9/13/2011 7:11 PM, Brad Huskins wrote:
Oh geez. Didn't mean to start a flame war...
Quit fanning it then... :)
On 09/13/2011 08:56 PM, James Yerge wrote:
On 09/13/2011 08:40 PM, Jim Lucas wrote:
On 9/13/2011 5:23 PM, tamouse mailing lists wrote:
On Tue, Sep 13, 2011 at 3:35 PM, Robert
57 matches
Mail list logo