[PHP] Error handling for Memcached PHP Extension

2007-02-25 Thread Cabbar Duzayak
Hi, Before I start, I am not sure whether I should have sent this to Memcached or PHP mailing list. So, for those who are subscribed to both, I apologize. I have started using the PHP extension at http://pecl.php.net/package/memcache for memcached. But, one problem I am having right now is that,

[PHP] Going crazy over mod_deflate

2006-12-07 Thread Cabbar Duzayak
Before I start, I am using apache 2.0.52 with PHP 4.3.9. In my .htaccess, I have a rewrite rule that rewrites /bb.flv as /bb.php, and this bb.php file reads a flv file and outputs it. In the PHP file, I am specifying content-type as video/x-flv and content-length, however mod_deflate still compre

[PHP] Re: PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Cabbar Duzayak
As a side note, even though user is shown as apache, this code was executed from command line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Cabbar Duzayak
Hi, I have written a simple test program to see how php allocates memory. Test code allocates ~10 Meg of RAM in an array within a loop till it runs out of memory as: $str = rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95) . rand(65, 95); $aa[] = str_repeat($str, 200); What I don'

[PHP] PhpMailer vs Pear:Mail

2005-11-27 Thread Cabbar Duzayak
Could you please tell which one you recommend in terms of stability/speed and share your experience in terms of these 2? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sending E-Mail - Setting O/S User

2005-10-27 Thread Cabbar Duzayak
Hi, When someone sends an e-mail using php, exim sets the following 2 headers (along with others of course): Received:from x.x.x.x (EHLO host.mydomain.com) (x.x.x.x) by mta151.mail.dcn.yahoo.com with SMTP; Wed, 24 Sep 2005 10:29:04 -0700 Received: from by host.mydomain.com with lo

[PHP] SMTP & PHP: Spam Tagging Problem

2005-10-25 Thread Cabbar Duzayak
Hi, I am having a problem with my system when sending e-mails to yahoo accounts, and it has been baffling me for the last couple of days, actually I should say it is driving me crazy... As I mentioned, I have a cpanel and have 2 domains/sites with dedicated IP addresses on my system. The base acc

[PHP] preg_match and $ sign in PHP5

2005-09-05 Thread Cabbar Duzayak
Hi, I have a regular expression check as: preg_match("/$xyz/", $data, $matches); And, as you know $xyz means "string starts with xyz". But somehow PHP 5 is interpreting this as variable xyz, and gives the notice below. You can ignore the message, but now it matches everything that has xyz, i.e.

[PHP] Initiating cronjobs from PHP?

2005-08-16 Thread Cabbar Duzayak
Hi all, I have a requirement for initiating tasks from my site that requires long processing times, i.e. uploading/downloading some files to remote nodes. And, to avoid timeouts and hence to be able to provide instant responses to the user (user does not need to get the result right away), I was t

[PHP] Javascript Src and HTTP_REFERER

2005-08-05 Thread Cabbar Duzayak
Hi, I have a web page (say page1) which refers to a php within javascript tag as: http://mysite.com/javascript_dump.php";> As you can see, this calls a php file which dumps javascript. The problem here is, within this php I couldn't get which page it is called from. Basically, if it comes f

[PHP] Mail Function

2005-07-19 Thread Cabbar Duzayak
Hi, I have a web site that is going to have around total of 10-20 thousand unique users, about 1000 unique hits per day on shared hosting. I have been using PHP's internal mail mechanism with the local smtp server on my hosting company, but it is more like a hit-and-miss kind of thing. And, there

[PHP] is fwrite atomic?

2005-04-13 Thread Cabbar Duzayak
Hi, As the subject mentions, is fwrite method atomic in PHP? What I mean by that is, does fwrite function acquire an implicit lock while writing or do I need to explicitly acquire an EXCLUSIVE lock on the file before I call fwrite? The problem I am having is that, I want to track user requests by

[PHP] Locking in PHP (Question for PHP Gurus)

2005-04-06 Thread Cabbar Duzayak
Hi All, I am using PHP on Apache/Linux with mod_php4. I need to implement a lazy cache for some resource which should be updated say every 1 hour in a way that the first person who arrives after an hour will be updating the cache. As you can imagine, I need to implement a write lock in this case,

[PHP] Weird WMV/Media Player behaviour (Loading media file twice)

2005-03-02 Thread Cabbar Duzayak
Hi, I have embedded a media player on my page with the html pasted below, and modified my .htaccess file to redirect this /aa/bb/cc.wmv to a php file... My php file (used below) does nothing, but logs the requests+checks access, opens the actual .wmv file and prints it out. The problem when I use