Re: [PHP] case-insensitive $_REQUEST,$_GET,$_POST keys?
On Fri, Apr 13, 2012 at 1:13 PM, tamouse mailing lists < tamouse.li...@gmail.com> wrote: > Anyone have a quick-and-dirty way to check $_REQUEST keys that is > case-insensitive? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > this what you asking? foreach ( $_REQUEST as $key => $value ) { if ( strtolower($key) in array('name','username','password')) $data[ strtolower($key) ] = $value; }
[PHP] Upcoming Outage: php.net
Greetings, all; This coming Monday, 16 April, 2012, between the hours of 18:00 and 20:00 EDT (22:00 to 00:00 GMT), the one of the primary php.net servers will be undergoing a critical preventative maintenance operation. In this two-hour maintenance window, we do expect a period of interruption lasting up to thirty minutes, during which certain core services will be partially or totally unavailable. The system that will experience the downtime is OSU1PHP.PHP.NET which, among other things, is the primary system for our mail exchange and master database. As such, a sample of services that will likely be unavailable for a short period of time will include: * Email (including mailing lists) * Events, user, and mirror management * User note submissions from userland * Et cetera We are informed by the on-site staff in Oregon State University's Open Source Lab, who quite generously provide this system free-of-charge, that while the maintenance is anticipated to take up to thirty minutes, they will be making all attempts to limit the downtime to a period of just five to ten minutes. My apologies for any inconvenience this may cause any of you, but as stated, this is critical preventative maintenance that is required to protect the integrity of the system, and to ensure that these services are not negatively impacted in the future. Please contact me directly if you have any questions or concerns. Thanks, all, and have a great weekend. -- Network Infrastructure Manager http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upcoming Outage: php.net
>This coming Monday, 16 April, 2012, between the hours of 18:00 and > 20:00 EDT (22:00 to 00:00 GMT), the one of the primary php.net servers > will be undergoing a critical preventative maintenance operation. > [snip] thanks for the heads up! :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] tempnam() not working as expected...
Can someone explain the following to me: /Users/tamara/Sites/gallery/lib/common/t/dirGuWOLW is a directory /private/var/folders/pI/pIx-p0mhH5eEQ64yAiDQmE+++TI/-Tmp-/fileC7Rnzg is a directory Why isn't the second tempnam using the directory path I pass to it? The strange thing I notice is that if I pass in a directory path to tempnam that was NOT created initially by tempnam, it works: miishka:t tamara$ mkdir a miishka:t tamara$ php -r 'echo tempnam("/Users/tamara/Sites/gallery/lib/common/t/a","file").PHP_EOL;' /Users/tamara/Sites/gallery/lib/common/t/a/filepSwRzF miishka:t tamara$ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] case-insensitive $_REQUEST,$_GET,$_POST keys?
On Fri, Apr 13, 2012 at 12:22 PM, David OBrien wrote: > On Fri, Apr 13, 2012 at 1:13 PM, tamouse mailing lists > wrote: >> >> Anyone have a quick-and-dirty way to check $_REQUEST keys that is >> case-insensitive? >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > this what you asking? > > foreach ( $_REQUEST as $key => $value ) { > if ( strtolower($key) in array('name','username','password')) $data[ > strtolower($key) ] = $value; > } That would do it! Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tempnam() not working as expected...
On Sat, Apr 14, 2012 at 12:05 AM, tamouse mailing lists wrote: > Can someone explain the following to me: > > > $d=tempnam(".","dir"); /* create a temp named file */ > unlink($d); /* unlink it because we're going to make it a > directory */ > mkdir($d,777,true); /* make the directory */ > echo "$d is ". (is_dir($d)?'':'NOT')." a directory\n"; > > > $f=tempnam($d,"file"); /* using the first directory, create a new > temp named file */ > unlink($f); /* unlink it as we're going to make it a > directory */ > mkdir($f,777,true); /* make the directory */ > echo "$f is ". (is_dir($f)?'':'NOT')." a directory\n"; > ?> > > /Users/tamara/Sites/gallery/lib/common/t/dirGuWOLW is a directory > /private/var/folders/pI/pIx-p0mhH5eEQ64yAiDQmE+++TI/-Tmp-/fileC7Rnzg > is a directory > > Why isn't the second tempnam using the directory path I pass to it? > > The strange thing I notice is that if I pass in a directory path to > tempnam that was NOT created initially by tempnam, it works: > > miishka:t tamara$ mkdir a > miishka:t tamara$ php -r 'echo > tempnam("/Users/tamara/Sites/gallery/lib/common/t/a","file").PHP_EOL;' > /Users/tamara/Sites/gallery/lib/common/t/a/filepSwRzF > miishka:t tamara$ > Can you check what the permissions of $d are? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php