Re: [PHP] Class returning more than one value

2006-10-14 Thread Sumeet
Paul Scott wrote: On Sat, 2006-10-14 at 11:06 +0100, Deckard wrote: How can i code a class with a function that returns more than one value ? 1. return array(); 2. return stdClass; --Paul another option.. can be avoid, is to use global variables or references...and modify them in the fun

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread Larry Garfield
On Saturday 14 October 2006 19:09, AR wrote: > Hello, > > I've rewritten my class as you told me: > > -- > class returnConfigParams > > { > > private static $instance = NULL; > > var $a; > var $b; > var $c; > var $d; > > private

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread AR
Hello, I've rewritten my class as you told me: -- class returnConfigParams { private static $instance = NULL; var $a; var $b; var $c; var $d; private function __construct() { } // function that get the database pa

[PHP] Interchange.

2006-10-14 Thread Jo�o C�ndido de Souza Neto
Hello everyone. Firstly my apology for the off topic. I'm a PHP professional since 2000's. In a quite near future i'm interested in have a professional interchange in a foreign country and i'm here to ask you for any information about it. Thanks a lot. -- PHP General Mailing List (http://ww

Re: [PHP] Regular expressions

2006-10-14 Thread Penthexquadium
On Sat, 14 Oct 2006 23:19:13 +0200, "Morten Twellmann" <[EMAIL PROTECTED]> wrote: > I'm trying to understand these regular expressions, but I can't make them > work... > > All I want to do, is to find the first occurrence of some text inside the > HTML tags and . > > Example string: "October 14

Re: [PHP] A no brainer...

2006-10-14 Thread Ed Lazor
On Oct 14, 2006, at 10:00 AM, Tony Di Croce wrote: I think that the cost of de-serializing a session stored in files should be significantly LESS than the cost of doing so through a database, for the following reasons: 1) The db will need to parse querys. Not an issue for files. 2) The ses

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread Kevin Waterson
This one time, at band camp, Roman Neuhauser wrote: BTW, here is my class: class returnConfigParams { var $a; var $b; var $c; var $d; function getMySQLParams() { include($_SERVER['DOCUMENT_ROOT']."/properties.php"); $values = array(0 => $a, 1 => $b, 2 => $c, 3 =

Re: [PHP] A no brainer...

2006-10-14 Thread Larry Garfield
On Saturday 14 October 2006 11:02, Ed Lazor wrote: > > Of course, the cost of serialization and deserialization is non- > > trivial for > > any data structure that is of interesting size, and you have to > > keep in mind > > that if you aren't syncing to the database periodically then you > > will

[PHP] Regular expressions

2006-10-14 Thread Morten Twellmann
I'm trying to understand these regular expressions, but I can't make them work... All I want to do, is to find the first occurrence of some text inside the HTML tags and . Example string: "October 14, 2006Welcome to my homepageWe're happy to announce..." must return: "Welcome to my homepage"

Re: [PHP] Crossing over to the Darkside?

2006-10-14 Thread Ed Lazor
I agree with Roman and Rory's comments, but I figure I might be able to add something, so here goes... On Oct 14, 2006, at 5:52 AM, Ross wrote: I am very suprised how easy things like user auhtentication and form validation is. Literally in minutes. Even though I have written a similar sc

Re: [PHP] PHP Denial of service

2006-10-14 Thread Ed Lazor
On Oct 14, 2006, at 4:05 AM, Ryan Barclay wrote: It hasn't actually been attempted. However, if a couple of a users were to hold the refresh, the page generation times would go up ridiculously and clients would be waiting over 20sec for pages. As mentioned, it's a very heavy php-mysql sc

Re: [PHP] Crossing over to the Darkside?

2006-10-14 Thread Rory Browne
On 10/14/06, Ross <[EMAIL PROTECTED]> wrote: Hello, Having used php for a while now and am fairly competent I was persuaded by a collegue to look into asp.net. I decided to download the free trial of VS2005 and start with a few tutorials. I am very suprised how easy things like user auhtenti

Re: [PHP] Windows ENV['_'] equivalent

2006-10-14 Thread Ed Lazor
On Oct 14, 2006, at 2:09 AM, Stut wrote: Unfortunately there's no guarantee that a) the working directory will be where the PHP binary is, or b) that the binary is called php.exe. Richard: AFAIK there is no way to know this under windows without writing an extension to tell you. -Stut

Re: [PHP] A no brainer...

2006-10-14 Thread Ed Lazor
Of course, the cost of serialization and deserialization is non- trivial for any data structure that is of interesting size, and you have to keep in mind that if you aren't syncing to the database periodically then you will end up with stale data objects. (An issue in any case, but the long

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-14 16:42:37 +0100: > > Just like you'd access members of any other array. > > > > $whatever = $params_file->getMySQLParams(); > > print($whatever[0]); > > > > This is a matter of basic rules of the language. Did you know > > most of the grammer is

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread AR
Hello, > Just like you'd access members of any other array. > > $whatever = $params_file->getMySQLParams(); > print($whatever[0]); > > This is a matter of basic rules of the language. Did you know > most of the grammer is described in the manual? Sure, i already tried that, b

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-14 16:28:57 +0100: > Hello, > > >> I have this class named "returnConfigParams" that returns an array > >> called "$values" through a function called "getMySQLParams()". > >> > >> My question is how to retrieve the values of the array from the file > >> that calls the

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread AR
Hello, >> I have this class named "returnConfigParams" that returns an array >> called "$values" through a function called "getMySQLParams()". >> >> My question is how to retrieve the values of the array from the file >> that calls the class. >> >> I have: >> >> $params_file = New returnConfigPara

Re: [PHP] Retrieving values from array on a class

2006-10-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-14 15:55:57 +0100: > Hello, > > Sorry for the newbie question :( > > I have this class named "returnConfigParams" that returns an array > called "$values" through a function called "getMySQLParams()". > > My question is how to retrieve the values of the array from t

[PHP] Retrieving values from array on a class

2006-10-14 Thread AR
Hello, Sorry for the newbie question :( I have this class named "returnConfigParams" that returns an array called "$values" through a function called "getMySQLParams()". My question is how to retrieve the values of the array from the file that calls the class. I have: $params_file = New return

Re: [PHP] Crossing over to the Darkside?

2006-10-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-14 16:53:34 +: > # [EMAIL PROTECTED] / 2006-10-14 13:52:50 +0100: > > -What influences your decision when using either ASP, .NET, or PHP > > License. Scratch that, TCO is it. License is a mere contributor to TCO. -- How many Vietnam vets does it take to

Re: [PHP] Crossing over to the Darkside?

2006-10-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-14 13:52:50 +0100: > Having used php for a while now and am fairly competent I was persuaded by a > collegue to look into asp.net. I decided to download the free trial of > VS2005 and start with a few tutorials. > > I am very suprised how easy things like user auh

[PHP] Crossing over to the Darkside?

2006-10-14 Thread Ross
Hello, Having used php for a while now and am fairly competent I was persuaded by a collegue to look into asp.net. I decided to download the free trial of VS2005 and start with a few tutorials. I am very suprised how easy things like user auhtentication and form validation is. Literally in m

Re: [PHP] PHP Denial of service

2006-10-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-13 22:16:18 +0100: > A simple question I imagine, but I am wondering how I would combat DoS > attacks by users holding the REFRESH key on their browsers? > > I have reproduced this error on a PHP-MYSQL website and when I hold the > REFRESH key on for a while, page g

Re: [PHP] PHP Denial of service

2006-10-14 Thread Ryan Barclay
It hasn't actually been attempted. However, if a couple of a users were to hold the refresh, the page generation times would go up ridiculously and clients would be waiting over 20sec for pages. As mentioned, it's a very heavy php-mysql script with lots of queries. Ryan -- Ryan Barclay RBF

Re: [PHP] PHP Denial of service

2006-10-14 Thread Ryan Barclay
Jon, Thanks for the reply. Yes, ignore_abort is defaulting to off, as stated in my other post. We have a Firebox III 1000 firewall on our external, however this does not have any features like this. I will look into iptables. Thanks, Ryan -- Ryan Barclay RBFTP Networks Ltd. DDI: +44 (

Re: [PHP] PHP Denial of service

2006-10-14 Thread Ryan Barclay
I have just run a phpinfo and ignore_user_abort is indeed defaulting to off. It's a pretty heavy php-MySQL script. I noticed on scripts without the MySQL interaction, the server can keep up much better with the forced refreshes. Are there any other liming settings I can change? All the bes

Re: [PHP] Class returning more than one value

2006-10-14 Thread Paul Scott
On Sat, 2006-10-14 at 11:06 +0100, Deckard wrote: > How can i code a class with a function that returns more than one value ? > 1. return array(); 2. return stdClass; --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/ind

[PHP] Class returning more than one value

2006-10-14 Thread Deckard
Hi, How can i code a class with a function that returns more than one value ? Any help would be appreciated. Warm Regards, Deckard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Windows ENV['_'] equivalent

2006-10-14 Thread Stut
Ed Lazor wrote: On Oct 13, 2006, at 11:53 AM, Richard Lynch wrote: In windows... There ain't nothing in phpinfo() that matches the php.exe which I'm running... How do you handle this? Not a solution, but an idea... the dos chdir comand. Maybe you can run it from within your script. It tel

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
"Ed Lazor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On Oct 13, 2006, at 1:54 AM, Stut wrote: >> Youch!! Your implementation seems to be focused on development >> efficiency rather than runtime efficience. In all but rare research >> projects this is backwards for a web-ba

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
"Ed Lazor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On Oct 13, 2006, at 1:35 AM, Tony Marston wrote: >> What a coincidence! That's exactly my approach, but I've taken it one >> step >> further. I always start with a properly normalised database which I can >> then >> im

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
"Stut" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ed Lazor wrote: >> On Oct 12, 2006, at 4:36 PM, Stut wrote: >>> If I then go on to create an admin interface for the users, I would >>> create another completely separate class called UserCollection to handle >>> more than one

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
"Stut" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Tony Marston wrote: >> "Stut" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> My general approach to designing a system is data-centric. I tend to >>> start by defining the database schema since getting t