php-general Digest 29 Sep 2006 08:44:45 -0000 Issue 4374

2006-09-29 Thread php-general-digest-help
php-general Digest 29 Sep 2006 08:44:45 - Issue 4374 Topics (messages 242378 through 242387): Re: Changing values in .htaccess 242378 by: Martin Marques 242379 by: Curt Zirzow 242381 by: Google Kreme 242382 by: Curt Zirzow Re: Custom Session Handler

php-general Digest 29 Sep 2006 21:22:24 -0000 Issue 4375

2006-09-29 Thread php-general-digest-help
php-general Digest 29 Sep 2006 21:22:24 - Issue 4375 Topics (messages 242388 through 242407): Re: Changing values in .htaccess 242388 by: Google Kreme 242392 by: Martin Marques 242396 by: tedd 242402 by: Richard Lynch 242406 by: Google Kreme class

Re: [PHP] How do i check if a variable is a reference or a copy?

2006-09-29 Thread Mathijs
Martin Alterisio wrote: 2006/9/28, Mathijs [EMAIL PROTECTED]: Hello there, Is there a way to check if a variable is passed by reference or if it is just a copy. With something like is_copy or is_reference? Thx in advance. Is this part of the I don't know if two vars reference the same

Re: [PHP] strange errors from command line vs. web

2006-09-29 Thread Ivo F.A.C. Fokkema
On Thu, 28 Sep 2006 14:29:13 -0400, blackwater dev wrote: Yep, I get called to undefined function so I need to somehow re-compile the cli version? How do I give support to just the cli version? I'm going to the docs now. Thanks! I guess it's dependent on your OS, but you might be able to

Re: [PHP] Re: mysql_real_escape_string() question

2006-09-29 Thread Ivo F.A.C. Fokkema
On Thu, 28 Sep 2006 11:33:06 -0400, Eric Butera wrote: On 9/28/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: Hi Tedd, According to http://nl3.php.net/mysql_real_escape_string The function requires a MySQL connection. If there is none, it will try and create one. That fails now.

[PHP] Re: Best open source project/framework to support a php training course?

2006-09-29 Thread Tony Marston
Pinocchio007 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks. Is any open source project using your framework? I couldn't find this information on your website. Not at present. It is being used on a closed source project for a commercial customer which may result in a

Re: [PHP] Changing values in .htaccess

2006-09-29 Thread Google Kreme
On 28 Sep 2006, at 22:23 , Curt Zirzow wrote: As i mentioned using .htaccess should be your last resort; there is a big performance hit big? You're joking. It's a miniscule hit in all but the most contrived of circumstances. Even the most complex websites are rarely more than 4 or 5

[PHP] class usage

2006-09-29 Thread benifactor
ok, about five minutes ago i decided to learn classes and delve into php's oop side. what i came up with was this... //start example code class newsletter { function send ($email,$subject,$message) { if ($email) { echo(the following message was sent to: $email br

[PHP] Re: class usage

2006-09-29 Thread M.Sokolewicz
Well, you could say that there is no difference really. Classes are mainly used as collections; They're a collection of functions (methods) sharing a common goal/dataset/whatever. One real world example is with database abstraction layers. Say you have a script like: ?php // [... crap ...]

Re: [PHP] class usage

2006-09-29 Thread Brad Bonkoski
benifactor wrote: ok, about five minutes ago i decided to learn classes and delve into php's oop side. what i came up with was this... //start example code class newsletter { function send ($email,$subject,$message) { if ($email) { echo(the following message was

Re: [PHP] Changing values in .htaccess

2006-09-29 Thread Martin Marques
On Thu, 28 Sep 2006, Curt Zirzow wrote: On 9/28/06, Google Kreme [EMAIL PROTECTED] wrote: On 28 Sep 2006, at 14:30 , Curt Zirzow wrote: If you can, set this on a per directory setting in your virtualhost setting within a Directory or Location, instead of turning on .htaccess. Er... why?

Re: [PHP] Re: mysql_real_escape_string() question

2006-09-29 Thread Eric Butera
On 9/29/06, Ivo F.A.C. Fokkema [EMAIL PROTECTED] wrote: On Thu, 28 Sep 2006 11:33:06 -0400, Eric Butera wrote: He's not actually *putting* it in a database, so isn't it useless to use a mysql_ function for this...? Maybe I misunderstand Tedd and he does use a database, as I don't see why he

Re: [PHP] Re: mysql_real_escape_string() question

2006-09-29 Thread tedd
At 9:52 AM -0400 9/29/06, Eric Butera wrote: Tedd, Not to make a big deal out of this but are you aware of the differences on filtering input and escaping output? mysql_real_escape_string is for escaping something for the database. It doesn't filter or clean anything. Just like htmlentities

Re: [PHP] class usage

2006-09-29 Thread Ray Hauge
On Friday 29 September 2006 4:35 am, benifactor wrote: the real question is what are some real life examples of class usage and why is it used as opposed to regular non oop? thank you for any input into the subject that you may have. I think people have pretty much hit the nail on the head

Re: [PHP] Changing values in .htaccess

2006-09-29 Thread tedd
At 2:53 AM -0600 9/29/06, Google Kreme wrote: I also prefer to put custom php directives into htaccess, but that's probably just my personal preference. I agree, I just found several uses for .htaccess that I can not live without -- it's great. What references would you recommend? Thanks.

Re: [PHP] class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, benifactor [EMAIL PROTECTED]: ok, about five minutes ago i decided to learn classes and delve into php's oop side. what i came up with was this... //start example code class newsletter { function send ($email,$subject,$message) { if ($email) { echo(the

Re: [PHP] Re: class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, M.Sokolewicz [EMAIL PROTECTED]: Well, you could say that there is no difference really. Classes are mainly used as collections; They're a collection of functions (methods) sharing a common goal/dataset/whatever. That's a module, my friend, not a class:

Re: [PHP] class usage

2006-09-29 Thread Martin Alterisio
2006/9/29, Ray Hauge [EMAIL PROTECTED]: I think people have pretty much hit the nail on the head with OOP. One thing that I would like to point out is that OOP isn't necessarily needed in every case. Actually there's never a need to use OOP. As I said before OOP doesn't provide anything in

Re: [PHP] class usage

2006-09-29 Thread Richard Lynch
On Fri, September 29, 2006 4:35 am, benifactor wrote: ..and this seems to work fine, i could easily add the mail function and insert real variables into send() but what i don't understand is i could also easily do this without a class... so i guess the real question is what are some real life

Re: [PHP] Custom Session Handler

2006-09-29 Thread Richard Lynch
On Thu, September 28, 2006 8:37 pm, Glenn Richmond wrote: As for open sourcing it, that call's up to my employer, but it may actually be a requirement (not that familiar with the license on php source). Unless I'm very mistaken, there is no requirement for them to OpenSource it! Anyway,

Re: [PHP] Changing values in .htaccess

2006-09-29 Thread Richard Lynch
On Thu, September 28, 2006 3:15 pm, Martin Marques wrote: I'm trying helplessly to get session.use_trans_sid to true in one directory that needs it. So I put this in an .htaccess file: php_value session.use_trans_sid 1 If both Cookies and trans_sid are on and if your browser accepts cookies,

Re: [PHP] mysql_real_escape_string() question

2006-09-29 Thread Richard Lynch
On Thu, September 28, 2006 2:06 pm, tedd wrote: I realize that you are not asking for an answer, but for a guide -- however -- isn't the real problem here simply one of injection? Just stop the user from injecting stuff in the subject and that would fix it right? Or, am I underestimating the

Re: [PHP] problem with email characters

2006-09-29 Thread Richard Lynch
On Thu, September 28, 2006 12:27 pm, Ross wrote: Is there a function that sorts out all the dodgy characters in an email... Maybe. Sometimes those dodgy characters are UTF-8, Unicode, or some sort of codepage in some language other than the one your server is configured to use (which is

Re: [PHP] class usage

2006-09-29 Thread Robert Cummings
On Fri, 2006-09-29 at 11:07 -0500, Richard Lynch wrote: On Fri, September 29, 2006 4:35 am, benifactor wrote: ..and this seems to work fine, i could easily add the mail function and insert real variables into send() but what i don't understand is i could also easily do this without a

Re: [PHP] Changing values in .htaccess

2006-09-29 Thread Google Kreme
On 29 Sep 2006, at 08:24 , tedd wrote: At 2:53 AM -0600 9/29/06, Google Kreme wrote: I also prefer to put custom php directives into htaccess, but that's probably just my personal preference. I agree, I just found several uses for .htaccess that I can not live without -- it's great. What

[PHP] phing + phpunit relative path.

2006-09-29 Thread Wesley Acheson
Hi, I'm not really sure if this question belongs on these lists - please forgive if it isn't. I've got a project running locally. I've got a phing build.xml in the root directory and a document structure based like this. webroot/incudes/package/fileToBeTested.inc

[PHP] Automagically using Pecl Filter for user input

2006-09-29 Thread Graham Anderson
How can I use PECL Filter to 'automagically' filter user input ? I DO understand calling the PECL filter directly in a PHP script like so: ?php $clean = array(); $clean['name'] = input_get(INPUT_POST, 'name', FL_REGEXP, array ('regexp' = '^[\w ]+$')); $clean['age'] =

Re: [PHP] class usage

2006-09-29 Thread benifactor
thank you all for your input, and thank you richard for breaking that down nice and slow for me :) uhh, that was just me trying to see how a class works, and is by no means a real program and will never be. just as i was coding my first class i confused myself thinking that i could do the same

Re: [PHP] mysql_real_escape_string() question

2006-09-29 Thread tedd
At 11:41 AM -0500 9/29/06, Richard Lynch wrote: On Thu, September 28, 2006 2:06 pm, tedd wrote: I realize that you are not asking for an answer, but for a guide -- however -- isn't the real problem here simply one of injection? Just stop the user from injecting stuff in the subject and that

Re: [PHP] Filter MS Word Garbage

2006-09-29 Thread Chris Shiflett
Kevin Murphy wrote: I keep getting garbage characters in there, usually associated with Smart Quotes. This might be helpful: http://shiflett.org/archive/165 Chris -- Chris Shiflett http://shiflett.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] mysql_real_escape_string() question

2006-09-29 Thread Chris Shiflett
Richard Lynch wrote: Though I confess, I'm sometimes at a loss how to properly escape certain data for certain situations... Here's an example: Take the Subject of an email. Sure, I've sanitized it to be sure there are no newlines for header injection. But now how do I properly escape

[PHP] How to effectuate translations

2006-09-29 Thread AR
Hi, I'm coding this software that has several files for several languages, so that users can chose the one that suits him. My question is what is the best way to integrate this in the PHP code, i. e., to make it work. Any help would be appreciated. Warm regards, Augusto Reis -- PHP General

Re: [PHP] How to effectuate translations

2006-09-29 Thread Rafael Mora
Hi!, well u can write ur messages in differents files, and like a make a class where u can put a method like getMessage($_type), this class could contains the language already selected, and just load the messages for that language in a array(or another easy to use PHP data structure). What do

[PHP] Rapid application development

2006-09-29 Thread Ahmad Al-Twaijiry
Hi Everyone, I need your feedback in this What is the best RAD (Rapid application development) do you use for PHP to develop an *advance* application in few days or weeks ? I like programming but one this that I hate is the first stage of programming when you start creating the basic code (db

RE: [PHP] Rapid application development

2006-09-29 Thread Peter Lauri
Why don't you reuse the basic code from your old projects? Then you don't need to worry about this :) (OOP) -Original Message- From: Ahmad Al-Twaijiry [mailto:[EMAIL PROTECTED] Sent: Saturday, September 30, 2006 12:45 PM To: PHP Subject: [PHP] Rapid application development Hi Everyone,