RE: [PHP] Recursion to sanitize user input

2004-10-08 Thread Yoed Anis
Simple your code should look like this: ... if ( is_array($userInput) ) { foreach ( $userInput as $key = $value ) { return sanitize( $value ); // needed to return it or else its not recurssive } } else { ... . Should work, not

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Curt Zirzow
* Thus wrote Yoed Anis: Simple your code should look like this: ... if ( is_array($userInput) ) { foreach ( $userInput as $key = $value ) { return sanitize( $value ); // needed to return it or else its not recurssive This is wrong, only the

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Robet Carson
it should be this i think: foreach ( $userInput as $key = $value ) { $newvalue[] = sanitize( $value ); } return $newvalue // returns an array - since this is the only way to get all veriables from the function } else I could be wrong but the only way it

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Robet Carson
this would probably be even better: foreach ( $userInput as $key = $value ) { $newvalue[$key] = sanitize( $value ); // reassign key with sanatized value } return $newvalue // return array with sanatized $key = $value pairs } else My 2 cents: -- PHP General Mailing

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread Comex
foreach ( $userInput as $key = $value ) { $newvalue[$key] = sanitize( $value ); } return $newvalue; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Recursion to sanitize user input

2004-10-08 Thread zooming
Hi Comex Thanks! That worked! Robet you almost had it but missing the $key in $newvalue[$key]. - Original Message - From: Comex [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 08, 2004 8:05 PM Subject: Re: [PHP] Recursion to sanitize user input foreach ( $userInput as

[PHP] MYSQL_VERSION_ID?

2004-10-08 Thread Minuk Choi
I've a Redhat9 and installed MySQL 4.0 from source and Apache 1.3 from source. I also downloaded the PHP5.0.2 source and attempted to compile it. Apache and MySQL are installed successfully, as they all work without any noticeable errors. This is how I configured PHP5 ./configure

Re: [PHP] Securing Servers

2004-10-08 Thread raditha dissanayake
Hi, This is some what off topic. Stephen Craton wrote: Hello, I'm in the process of hooking up my own personal web server for use by certain clients to view the progress on work I'm doing for them. However, I'm on a shared network that is behind a firewall and some computers on the network need to

[PHP] Safe mode imagecreatefromjpeg

2004-10-08 Thread Paulo JF Silva
Hi, I have PHP 4.3.5 and safe mode on. When I create a new image with imagecreatefromjpeg(), the image owner is 'httpd' and not my ftp user. [this is in a shared host]. I would like to know if there is any way to create the image with my user... I can workaround mkdir stuff with ftp access

Re: [PHP] Securing Servers

2004-10-08 Thread M Saleh EG
Hi there, I'd agree with Radhita saying how about getting a low cost shared hosting solution instead? but plz Radhita, don't bring your biased opinions about MS vs Opensource or Linux vs Windows over here. It's so subjective and plus gets an off-topic topic more off ! We all benefit from this

RE: [PHP] Securing Servers

2004-10-08 Thread Stephen Craton
I agree on the whole MS opinions bit. I also agree about it being off topic, and meant to open it by saying that, but I erased it in fear PHP would consider it OT and become all mad and whatnot. The only problem with the shared hosting idea is that I would have to take time to upload and setup

Re: [PHP] Securing Servers

2004-10-08 Thread John Nichel
Stephen Craton wrote: I agree on the whole MS opinions bit. I also agree about it being off topic, and meant to open it by saying that, but I erased it in fear PHP would consider it OT and become all mad and whatnot. The only problem with the shared hosting idea is that I would have to take time

RE: [PHP] Securing Servers

2004-10-08 Thread Stephen Craton
Thanks for the reply, and forgive me if I top post, just a bad habit. I think my original intention has been misunderstood. :) I don't plan on starting my own hosting business at all, I just want to allow access to my own personal Apache server to show the clients I am working for the work I've

Re: [PHP] Securing Servers

2004-10-08 Thread John Nichel
Stephen Craton wrote: Thanks for the reply, and forgive me if I top post, just a bad habit. I think my original intention has been misunderstood. :) I don't plan on starting my own hosting business at all, I just want to allow access to my own personal Apache server to show the clients I am

RE: [PHP] Securing Servers

2004-10-08 Thread Stephen Craton
Ah yes, thank you for the links, just what I was looking for. Now to use some sort of uber cool part of my brain to translate unix command line and paths to Windows command line commands and paths. Stephen Craton [EMAIL PROTECTED] IM: [EMAIL PROTECTED]

[PHP] Re: Callback functions inside classes - how to?

2004-10-08 Thread Aidan Lister
http://php.net/language.types.html#language.pseudo-types Thomas Hochstetter [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi again, I have always been wondering how this is done properly: Here is an example: [snip] class A { function name( $a, $b, $c) { $tmp =

Re: [PHP] Securing Servers

2004-10-08 Thread Curt Zirzow
* Thus wrote M Saleh EG: but plz Radhita, don't bring your biased opinions about MS vs Opensource or Linux vs Windows over here. It's so subjective and plus gets an off-topic topic more off ! I can install BSD apache/php/mysql w/firewall and totally locked down in 15 minutes and know its

Re: [PHP] Securing Servers

2004-10-08 Thread Curt Zirzow
* Thus wrote Stephen Craton: Hello, I'm in the process of hooking up my own personal web server for use by certain clients to view the progress on work I'm doing for them. However, I'm on a shared network that is behind a firewall and some computers on the network need to stay secure as

<    1   2