php-general Digest 19 Aug 2009 07:52:37 -0000 Issue 6293

2009-08-19 Thread php-general-digest-help
php-general Digest 19 Aug 2009 07:52:37 - Issue 6293 Topics (messages 296941 through 296952): Really quick try/catch question 296941 by: Brian Dunning 296942 by: Nathan Nobbe PHP and CGI 296943 by: sono-io.fannullone.us 296944 by: Daevid Vincent

php-general Digest 19 Aug 2009 21:13:07 -0000 Issue 6294

2009-08-19 Thread php-general-digest-help
php-general Digest 19 Aug 2009 21:13:07 - Issue 6294 Topics (messages 296953 through 296984): How to make sure that the target file to read is not under writing by others? 296953 by: Dengxule 296956 by: Ashley Sheridan 296957 by: Arno Kuhl 296958 by: Ashley

Re: [PHP] daemon without pcntl_fork

2009-08-19 Thread Jim Lucas
Lars Torben Wilson wrote: 2009/8/18 Per Jessen p...@computer.org: Jim Lucas wrote: Does anybody know how to use PHP as a daemon without the use of pcntl_fork. Sure. Just start it and leave it running. I want to launch a daemon out of the /etc/rc.local when the system starts. Yep, I do

[PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Dengxule
Hi everyone: I have a crontab command to execuate my php-script every half an hour. The mission of the php-script is to open a file(log file), examine it. The target file(log file) is transported to local every half an hour. I've no idea how much time it will costs and on the other hand, i

[PHP] Lots of fstat() calls in PHP 5.3

2009-08-19 Thread Olga Khenkin
Hi, We recently upgraded our web servers with PHP 5.3 and found out that there are lots of fstat() calls. fstat() is called 3 times on each file open. Do you know why this happens and how can these calls be reduced? We're running Red Hat 3.4.6, Apache 2.0.59, PHP 5.3.0 with APC. Here's strace

Re: [PHP] daemon without pcntl_fork

2009-08-19 Thread Per Jessen
Jim Lucas wrote: Currently, I have two different uses for this startup script and daemon/bg process. One will deal with a master server for one of my games and the second will be for running a PBX SMDR/CDR capturing tool. The first must be able to deal with multiple simultaneous

Re: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Ashley Sheridan
On Wed, 2009-08-19 at 15:55 +0800, Dengxule wrote: Hi everyone: I have a crontab command to execuate my php-script every half an hour. The mission of the php-script is to open a file(log file), examine it. The target file(log file) is transported to local every half an hour. I've no

RE: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Arno Kuhl
-Original Message- From: Dengxule [mailto:dengx...@gmail.com] Sent: 19 August 2009 09:56 AM To: Php Maillist Subject: [PHP] How to make sure that the target file to read is not under writing by others? Hi everyone: I have a crontab command to execuate my php-script every half an hour.

RE: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Ashley Sheridan
On Wed, 2009-08-19 at 11:55 +0200, Arno Kuhl wrote: -Original Message- From: Dengxule [mailto:dengx...@gmail.com] Sent: 19 August 2009 09:56 AM To: Php Maillist Subject: [PHP] How to make sure that the target file to read is not under writing by others? Hi everyone: I have a

RE: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Arno Kuhl
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: 19 August 2009 11:57 AM To: a...@dotcontent.net Cc: 'Dengxule'; 'Php Maillist' Subject: RE: [PHP] How to make sure that the target file to read is not under writing by others? On Wed, 2009-08-19 at 11:55

RE: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Ashley Sheridan
On Wed, 2009-08-19 at 12:56 +0200, Arno Kuhl wrote: -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: 19 August 2009 11:57 AM To: a...@dotcontent.net Cc: 'Dengxule'; 'Php Maillist' Subject: RE: [PHP] How to make sure that the target file to read is

Re: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Nitebirdz
On Wed, Aug 19, 2009 at 11:59:39AM +0100, Ashley Sheridan wrote: No, what you're saying is 'use a log file in order to know when to look at another log file'. What would happen if you tried to access the control log file whilst it was in the process of being written to? Admittedly, you

Re: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Kyle Smith
Nitebirdz wrote: On Wed, Aug 19, 2009 at 11:59:39AM +0100, Ashley Sheridan wrote: No, what you're saying is 'use a log file in order to know when to look at another log file'. What would happen if you tried to access the control log file whilst it was in the process of being written to?

[PHP] PHP/Ajax Framework - Call for Developers Testers

2009-08-19 Thread Raymond Irving
Hello, I've just released Raxan Beta 2 with lots for features for both PHP and Ajax developers. I'm looking for persons to help me test and improve the framework. If you're interested, then please download the framework , join the community and share your thoughts and ideas. Feel free to send

Re: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Tom Worster
On 8/19/09 3:55 AM, Dengxule dengx...@gmail.com wrote: I have a crontab command to execuate my php-script every half an hour. The mission of the php-script is to open a file(log file), examine it. The target file(log file) is transported to local every half an hour. I've no idea how

RE: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Arno Kuhl
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: 19 August 2009 01:00 PM To: a...@dotcontent.net Cc: 'Dengxule'; 'Php Maillist' Subject: RE: [PHP] How to make sure that the target file to read is not under writing by others? On Wed, 2009-08-19 at 12:56

RE: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Ashley Sheridan
On Wed, 2009-08-19 at 15:31 +0200, Arno Kuhl wrote: (any computer would instantly crash if that sort of basic housekeeping wasn't done) No, it really wouldn't! If it did, then you'd never have video playing software out there that supported broken downloads, no preview software for

Re: [PHP] DB Question | A hotel reservation scenario

2009-08-19 Thread tedd
At 2:46 PM -0400 8/18/09, Floyd Resler wrote: I would create a room history table that contained three fields: room number, status, date stamp. Each time the status of a room changes insert a new record into the table with the current status and date/time. Take care, Floyd That's the way

Re: [PHP] PHP and CGI

2009-08-19 Thread tedd
At 5:10 PM -0700 8/18/09, sono...@fannullone.us wrote: I've searched high and low for an answer to this. Hopefully someone here might know. Can PHP be used under a CGI? I tried to put the following code on one of my perl shopping cart pages but it doesn't work: ?php echo select

[PHP] Re: Help on pregreplace

2009-08-19 Thread tedd
At 10:51 AM -0400 8/18/09, Al wrote: Merlin Morgenstern wrote: Hi there, I am highlighting keywords with the help of pregreplace. This works great with one limitation. If the word that has to be replaced contains a slash, preg throws an error. So far I could not find a fix. Can someone

[PHP] Re: getting the search words from a google query

2009-08-19 Thread Shawn McKenzie
MURTUZA KUTUB wrote: hey, i am a beginner at php and i need your help. i have a list of urls visited on a particular day in mysql database. using php i find out all the websites that have a google search. now i need to strip apart the google query from the entire url. i think parse

RE: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Arno Kuhl
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: 19 August 2009 03:34 PM To: a...@dotcontent.net Cc: 'Dengxule'; 'Php Maillist' Subject: RE: [PHP] How to make sure that the target file to read is not under writing by others? On Wed, 2009-08-19 at 15:31

Re: [PHP] Re: PHP and CGI

2009-08-19 Thread Ben Dunlap
       That's exactly the case.  I have been running my business on a Perl cart for the last 5+ years, and I can't switch to a PHP cart just yet.  I was just hoping to add some functionality with PHP.  Perl was much harder It would probably bomb your performance but you could always call a

RE: [PHP] DB Question | A hotel reservation scenario

2009-08-19 Thread Bob McConnell
From: Ashley Sheridan On Tue, 2009-08-18 at 19:15 +0430, Behzad wrote: I'm faced with an interesting and challenging problem. Consider a database, designed for a hotel. At any given time, each room has a different status: It's Busy or Reserved, or Free. It's easy to retrieve number of

Re: [PHP] SESSIONS lost sometimes

2009-08-19 Thread Ben Dunlap
We have a server with a site that does some XML calls. After lots of testing I have found that the server is losing session variables. [8] Also the site goes from HTTP to HTTPS at some point but this isn't the issue as it loses the sessions as soon as they are set sometimes. Therefore I

[PHP] PDF Width

2009-08-19 Thread Floyd Resler
Does anyone know how I can find the width of a PDF in PHP? Thanks! Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: PHP and CGI

2009-08-19 Thread Bob McConnell
From: sono...@fannullone.us On Aug 18, 2009, at 7:13 PM, Shawn McKenzie wrote: P.S. Does anyone know of a good Perl mailing list? beginn...@perl.org Or you can try www.perlmonks.org. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Extract column names from a (my)SQL query

2009-08-19 Thread דניאל דנון
Lets assume I have the following string: SELECT field1, field2, field3 FROM tablename WHERE field1 = 'something' Is there any way to get field1, field2, field3? assuming it might also have join, left join - things like that. I can easily do it with preg_match, but I have to make sure its

Re: [PHP] Another date exercise

2009-08-19 Thread tedd
At 10:43 AM -0500 8/19/09, Shawn McKenzie wrote: First stab at it. Of course it needs US date ordering (month day year). You can't do euro type dates or any other format because there is no way to tell the difference between 1/2/2009 (January) and 1/2/2009 (February): ?php $dates =

Re: [PHP] How to make sure that the target file to read is not under writing by others?

2009-08-19 Thread Clancy
On Wed, 19 Aug 2009 08:13:56 -0400, kyle.sm...@inforonics.com (Kyle Smith) wrote: Nitebirdz wrote: On Wed, Aug 19, 2009 at 11:59:39AM +0100, Ashley Sheridan wrote: No, what you're saying is 'use a log file in order to know when to look at another log file'. What would happen if you

Re: [PHP] PHP/Ajax Framework - Call for Developers Testers

2009-08-19 Thread Raymond Irving
Hi Nathan, Many thanks for the feedback. There many other useful features built into the API but my favorite is the embedded feature. You can see a live example here: http://raxanpdi.com/shoutbox-embedded-example.html Best regards, __ Raymond Irving --- On Wed, 8/19/09, Nathan Nobbe