Re: [nyphp-talk] Determining if cmd line script is running as root?

2007-07-29 Thread Michael B Allen
On 7/26/07, Jon Baer <[EMAIL PROTECTED]> wrote: > One possible way ... > > > > $php whoami.php > jonbaer > $sudo php whoami.php > root Hi Guys, Actually what I settled on was: function is_root() { if (is_writable('/')) return TRUE; if (extension_loaded('posix') && posix_getuid()

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread Jon Baer
http://pear.php.net/manual/en/package.php.php-compat.components.php require_once 'PHP/Compat/Function/scandir.php'; - Jon On Jul 29, 2007, at 2:39 PM, Ben Sgro ((ProjectSkyLine)) wrote: Hello, According to php.net: http://us2.php.net/manual/en/function.scandir.php scandir (PHP 5) Is only ava

Re: [nyphp-talk] Oh... Interviewing

2007-07-29 Thread Daniel Convissor
Hey Y'all: I encourage everyone interviewing job candidates to look at portfolios, ask technical questions and have them code some stuff for you on the spot. I asked an interviewee to pseudo code a basic operation for me. The person wrote code with several unnecessary steps and didn't accompl

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread selyah
the glob($files.'/*') seems to work ...thanks you Dell Sala <[EMAIL PROTECTED]> wrote: On Jul 29, 2007, at 2:35 PM, selyah wrote: > $dir=$_SERVER['DOCUMENT_ROOT']."coles/admin/new_images/".$_FILES > ['image']['name']; > $files=scandir($dir); > > is there an alternate syntax to writing this func

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread Andy Dirnberger
As Ben stated, scandir is only available in PHP 5. As you stated, you are using PHP 4. The manual page to which Ben linked provides an alternative to the scandir function for users of PHP 4. Sent via BlackBerry by AT&T -Original Message- From: selyah <[EMAIL PROTECTED]> Date: Sun, 29

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread Ben Sgro \(ProjectSkyLine\)
"I am currently using PHP version 4.3.10 and need a bit of help". Ah, upgrade to php5 and try again. scandir( ) is only available in php5. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons Our company: www.projectskyline.com Our products: www.project-contact.com This e-mai

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread selyah
hello: i looked at that link before and i think that i was entering it that way, yet i am still getting that warning...should the function be declared somewhere before? "Ben Sgro (ProjectSkyLine)" <[EMAIL PROTECTED]> wrote: Hello, According to php.net: http://us2.php.net/manual/e

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread Dell Sala
On Jul 29, 2007, at 2:35 PM, selyah wrote: $dir=$_SERVER['DOCUMENT_ROOT']."coles/admin/new_images/".$_FILES ['image']['name']; $files=scandir($dir); is there an alternate syntax to writing this function call in version 4.3.10? and wher can i find a link to a manual for this version? Try

Re: [nyphp-talk] alternate to scandir()

2007-07-29 Thread Ben Sgro \(ProjectSkyLine\)
Hello, According to php.net: http://us2.php.net/manual/en/function.scandir.php scandir (PHP 5) Is only available in php5. - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons Our company: www.projectskyline.com Our products: www.project-contact.com This e-mail is confidentia

[nyphp-talk] alternate to scandir()

2007-07-29 Thread selyah
I am currently using PHP version 4.3.10 and need a bit of help. I created a script to display images in a directory. part of the script is shown here : $dir=$_SERVER['DOCUMENT_ROOT']."coles/admin/new_images/".$_FILES['image']['name']; $files=scandir($dir); this opens the directory and an retur

[nyphp-talk] Mashups, Pipes

2007-07-29 Thread Hans Zaunere
Someone pointed this out to me: http://pipes.yahoo.com Interesting user interface and mashup concept. And appears to be AMP based: http://blog.pipes.yahoo.com/pipes-is-hiring/ --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com _

Re: [nyphp-talk] TRUNCATING MySQL FIELDS

2007-07-29 Thread tedd
On July 28, 2007, PaulCheung wrote: When I set the table up I set the LICENCE to INT(8). When populating this field I was expecting any number larger than 8 digits to be truncated and any number less than 8 digits to be padded out with zeros, in both cases > this is not happening. Random

Re: [nyphp-talk] TRUNCATING MySQL FIELDS

2007-07-29 Thread PaulCheung
Hi Mike, Thank you for pointing me in the right direction. My problem was mis-understanding what INT(8) meant. Paul - Original Message - From: "Michael Sims" <[EMAIL PROTECTED]>; To: "NYPHP Talk" Sent: Saturday, July 28, 2007 7:36 PM Subject: Re: [nyphp-talk] TRUNCATING MySQL FIELD