[PHP] Accessibility problem with delegates

2008-10-20 Thread Dave Kok
Hi Everyone, I have a class with some callback functions and a class that should call them. The class with the callback functions initializes the array with the callbacks and hands it down to the other class that should call them. PHP however forces the callback functions to be public, so the

Re: [PHP] php "make test" failures

2008-10-20 Thread Michael McCallister
Thanks Jochem - much appreciated Jochem Maas wrote the following on 10/20/2008 6:12 PM: Michael McCallister schreef: Greetings PHP List, I have run php4 for many years and am finally rolling over to php5. When I compiled php 5.2.6 and ran "make test", I get the following: ===

Re: [PHP] Remote Developer Wanted

2008-10-20 Thread Shawn McKenzie
Jochem Maas wrote: > Andy Dyble schreef: >> Hi >> >> I am looking for a remote developer for small add hoc jobs. Usually >> only a few hours at a time. Basic stuff, listing data from SQL and text >> files. Mainly work on existing systems. > > personally I'd run in the other direction based on tha

RE: [PHP] 2 successive commands in one shell_exec?

2008-10-20 Thread bruce
hello... why can't you simply specify the dir/cmd when you run the exec function ie foo = exec("var\cmd.sh") or use the backtick approach instead of the exec/shell_exec cmd... make sure you have given the cmd "x" privs... and that your process you're running the php app has the privs to run the

[PHP] 2 successive commands in one shell_exec?

2008-10-20 Thread Govinda
How do we use string shell_exec ( string $cmd ) to hit another cgi script from within a PHP page? I mean I need to do that, and so with my very newbie level of understanding I think I need to have that shell_exec essentially do 2 things at once: -goto the right dir, and then -fire the scri

RE: [PHP] How to Execute Exe File from PHP

2008-10-20 Thread Alice Wei
Hi, Thanks for helping me out on this one. It turned out that after removing the @ sign, I found some errors I have during my exe compilation. Now the file is working. Thanks.for the heads up, everyone. Alice Alice Wei, MIS Programmer/Computer Application Developer ProCure Treatment

Re: [PHP] Remote Developer Wanted

2008-10-20 Thread Jochem Maas
Andy Dyble schreef: > Hi > > I am looking for a remote developer for small add hoc jobs. Usually > only a few hours at a time. Basic stuff, listing data from SQL and text > files. Mainly work on existing systems. personally I'd run in the other direction based on that description, I mean who dec

Re: [PHP] php "make test" failures

2008-10-20 Thread Daniel Brown
Forwarded to Installs and QA. On Mon, Oct 20, 2008 at 8:40 PM, Michael McCallister <[EMAIL PROTECTED]> wrote: > Greetings PHP List, > > I have run php4 for many years and am finally rolling over to php5. > When I compiled php 5.2.6 and ran "make test", I get the following: > >

Re: [PHP] Singletons

2008-10-20 Thread Jochem Maas
Christoph Boget schreef: >> Create your singleton class without extending the class you need to extend. >> Create an instance of that class in your object. Implement the __call magic >> method to proxy function calls through to that instance throwing an >> exception (or error) if the method request

Re: [PHP] php "make test" failures

2008-10-20 Thread Jochem Maas
Michael McCallister schreef: > Greetings PHP List, > > I have run php4 for many years and am finally rolling over to php5. > When I compiled php 5.2.6 and ran "make test", I get the following: > > = > FAILED TEST SUMMARY > -

Re: [PHP] Mass email

2008-10-20 Thread Robert Cummings
On Tue, 2008-10-21 at 08:39 +1100, Chris wrote: > tedd wrote: > > Hi gang: > > > > I have a client who wants to send out mass emails to 37,000+ opt-in > > members (i.e., not spam). > > > > Any suggestions as to the best way to do this? > > It's been on the list a few times but personally I'd ch

[PHP] php "make test" failures

2008-10-20 Thread Michael McCallister
Greetings PHP List, I have run php4 for many years and am finally rolling over to php5. When I compiled php 5.2.6 and ran "make test", I get the following: = FAILED TEST SUMMARY --

Re: [PHP] what's the difference in the following code?

2008-10-20 Thread Lamp Lists
- Original Message From: tedd <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Monday, October 20, 2008 4:15:02 PM Subject: Re: [PHP] what's the difference in the following code? At 10:12 AM -0400 10/20/08, Daniel Brown wrote: >On Mon, Oct 20, 2008 at 10:02 AM, tedd <[EMAIL PROTE

Re: [PHP] Catchable fatal error

2008-10-20 Thread Chris
Richard Kurth wrote: I figured it out .. and the magic answer is ? Useful even if just for the archives so others can search for the error/problem and find a solution quickly. I am getting *Catchable fatal error*: Object of class stdClass could not be converted to string in *C:\web\easycon

Re: [PHP] Catchable fatal error

2008-10-20 Thread Richard Kurth
I figured it out I am getting *Catchable fatal error*: Object of class stdClass could not be converted to string in *C:\web\easycontactpro\openchecker.php* on line *49 line 49 is * $mail_head = imap_headerinfo($conn, $i); what could be casing this. The next line works fine if I delete line 49

Re: [PHP] Mass email

2008-10-20 Thread Chris
tedd wrote: Hi gang: I have a client who wants to send out mass emails to 37,000+ opt-in members (i.e., not spam). Any suggestions as to the best way to do this? It's been on the list a few times but personally I'd check out commercial software first, then look at doing your own. The comme

Re: [PHP] Mass email

2008-10-20 Thread Stut
On 20 Oct 2008, at 22:24, tedd wrote: I have a client who wants to send out mass emails to 37,000+ opt-in members (i.e., not spam). Any suggestions as to the best way to do this? In my experience it's easiest to outsource this once you get past a few thousand subscribers otherwise you'll q

Re: [PHP] Mass email

2008-10-20 Thread Daniel Brown
On Mon, Oct 20, 2008 at 5:24 PM, tedd <[EMAIL PROTECTED]> wrote: > Hi gang: > > I have a client who wants to send out mass emails to 37,000+ opt-in members > (i.e., not spam). > > Any suggestions as to the best way to do this? Letting a third party such as AWeber[1] handle it may be your best

[PHP] Mass email

2008-10-20 Thread tedd
Hi gang: I have a client who wants to send out mass emails to 37,000+ opt-in members (i.e., not spam). Any suggestions as to the best way to do this? Thanks, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.n

Re: [PHP] what's the difference in the following code?

2008-10-20 Thread tedd
At 10:12 AM -0400 10/20/08, Daniel Brown wrote: On Mon, Oct 20, 2008 at 10:02 AM, tedd <[EMAIL PROTECTED]> wrote: I hate it when people take things out of context and misquote others. Chris did not say that one way was better, or different, than the other. But rather he used two sets of code

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
> Create your singleton class without extending the class you need to extend. > Create an instance of that class in your object. Implement the __call magic > method to proxy function calls through to that instance throwing an > exception (or error) if the method requested doesn't exist. Not particu

Re: [PHP] How to Execute Exe File from PHP

2008-10-20 Thread Daniel Brown
On Mon, Oct 20, 2008 at 4:51 PM, Stut <[EMAIL PROTECTED]> wrote: > > 4) There is no 4! This is how the HTTP error code came about in the first place. Someone heard someone else calling for your missing number. "Four?!? Oh, four?!?" -- http://www.parasane.net/ [New Look] [EMAIL PROTECT

Re: [PHP] How to Execute Exe File from PHP

2008-10-20 Thread Stut
On 20 Oct 2008, at 21:47, Alice Wei wrote: Has anyone tried to execute an .exe file from PHP? I am currently stuck in a situation where I cannot execute the script, and all I am getting is a blank screen. This is my code snippet used to execute the file: //execute program $a = @shell_exec("C:

Re: [PHP] How to Execute Exe File from PHP

2008-10-20 Thread Dan Joseph
On Mon, Oct 20, 2008 at 4:47 PM, Alice Wei <[EMAIL PROTECTED]> wrote: > > > > Hi, > > Has anyone tried to execute an .exe file from PHP? I am > currently stuck in a situation where I cannot execute the script, and > all I am getting is a blank screen. > > This is my code snippet used to execute t

[PHP] How to Execute Exe File from PHP

2008-10-20 Thread Alice Wei
Hi, Has anyone tried to execute an .exe file from PHP? I am currently stuck in a situation where I cannot execute the script, and all I am getting is a blank screen. This is my code snippet used to execute the file: //execute program $a = @shell_exec("C:\Inetpub\wwwroot\test/test.exe"

Re: [PHP] Singletons

2008-10-20 Thread Stut
On 20 Oct 2008, at 21:06, Christoph Boget wrote: Why can't it be a separate class, In general, it can. In my case, it can't. Not unless I want to completely duplicate an already existing class. Create your singleton class without extending the class you need to extend. Create an instance

[PHP] Catchable fatal error

2008-10-20 Thread Richard Kurth
I am getting *Catchable fatal error*: Object of class stdClass could not be converted to string in *C:\web\easycontactpro\openchecker.php* on line *49 line 49 is * $mail_head = imap_headerinfo($conn, $i); what could be casing this. The next line works fine if I delete line 49 $conn = @ima

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
> There is absolutely nothing in PHP which prevents you from implementing the > singleton pattern. It does if the constructor must be public. > but your attempt is doomed to failure. What makes you think that a singleton > class has to inherit from another class? Nothing at all. Except that in

Re: [PHP] Singletons

2008-10-20 Thread Tony Marston
""Christoph Boget"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > >> Singletons are not rocket science, but as with all patterns you really >> need >> to understand the theory before trying to implement and use it. > > Agreed. But apparently implementing them in PHP leaves th

Re: [PHP] PHP Dev Facts

2008-10-20 Thread Brendon Van Heyzen
a- (more out of interest) any problems with tasktop? I've found it a bit buggy/pain to install in ganymede (although mylyn works a dream) Haven't had any issues with tasktop but I'm very impressed with it so far. Install was just like any other extension, I'm using zend studio 6.1 which is

Re: [PHP] Singletons

2008-10-20 Thread Stut
On 20 Oct 2008, at 20:24, Christoph Boget wrote: public function __construct() A singleton would usually have a private constructor to prevent non-singleton instances. The problem being if the class in question derives from another class that has a public constructor... If you are in that pa

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
>> public function __construct() > A singleton would usually have a private constructor to prevent > non-singleton instances. The problem being if the class in question derives from another class that has a public constructor... If you are in that particular situation (which I am), you're basic

Re: [PHP] Singletons

2008-10-20 Thread Stut
On 20 Oct 2008, at 18:07, Christoph Boget wrote: Ok, so why isn't this working as (I, at the very least) expected? Hmm, where to start... class singleTon { private static $thisObj = NULL; private $thisProp = NULL; public function __construct() A singleton would usually have a pr

Re: [PHP] Singletons

2008-10-20 Thread n3or
Christoph Boget schrieb: Apart from making the constructor private, is there any way I can ensure that there is ever only one instance of an object? you could use the magic method __clone. For example: public function __clone() { trigger_error('The singleton pattern avoids cloning this in

Re: [PHP] Singletons

2008-10-20 Thread Christoph Boget
>> Apart from making the constructor >> private, is there any way I can ensure that there is ever only one >> instance of an object? > you could use the magic method __clone. > For example: > public function __clone() { trigger_error('The singleton pattern avoids > cloning this instance', E_USER_ER

[PHP] Remote Developer Wanted

2008-10-20 Thread Andy Dyble
Hi I am looking for a remote developer for small add hoc jobs. Usually only a few hours at a time. Basic stuff, listing data from SQL and text files. Mainly work on existing systems. $10-$15 per hour depending on location. Andy Midsoft UK -- PHP General Mailing List (http://www.php.net/

[PHP] Re: Singletons

2008-10-20 Thread Nathan Rixham
Christoph Boget wrote: Ok, so why isn't this working as (I, at the very least) expected? class singleTon { private static $thisObj = NULL; private $thisProp = NULL; public function __construct() { echo 'singleTon::__construct()'; if( !is_null( singleTon::$thisObj ))

Re: [PHP] Singletons

2008-10-20 Thread Eric Butera
On Mon, Oct 20, 2008 at 1:07 PM, Christoph Boget <[EMAIL PROTECTED]> wrote: > Ok, so why isn't this working as (I, at the very least) expected? > > class singleTon > { >private static $thisObj = NULL; >private $thisProp = NULL; > >public function __construct() >{ > echo 'singleTon

Re: [PHP] Singletons

2008-10-20 Thread n3or
Christoph Boget schrieb: Apart from making the constructor private, is there any way I can ensure that there is ever only one instance of an object? you could use the magic method __clone. For example: public function __clone() { trigger_error('The singleton pattern avoids cloning this instanc

[PHP] Singletons

2008-10-20 Thread Christoph Boget
Ok, so why isn't this working as (I, at the very least) expected? class singleTon { private static $thisObj = NULL; private $thisProp = NULL; public function __construct() { echo 'singleTon::__construct()'; if( !is_null( singleTon::$thisObj )) { echo '$thisObj alre

Re: [PHP] Re: searching by tags....

2008-10-20 Thread Andrew Ballard
On Sun, Oct 19, 2008 at 10:34 AM, Martin ZvarĂ­k <[EMAIL PROTECTED]> wrote: > Ryan S napsal(a): >> >> Hey, >> >> this the first time I am actually working with "tags" but it seems quite >> popular and am adding it on a clients requests. >> >> By tags I mean something like wordpress' implementation o

RE: [PHP] how to start using a version control system (subversion)?

2008-10-20 Thread Boyd, Todd M.
> -Original Message- > From: Rene Veerman [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 19, 2008 6:12 AM > To: php-general@lists.php.net > Subject: [PHP] how to start using a version control system > (subversion)? > > Apologies for posting a monthly/yearly recurring theme here.. > If s

[PHP] Re: PHP Dev Facts

2008-10-20 Thread Michelle Konzack
Am 2008-10-17 00:14:18, schrieb Nathan Rixham: > Evening All, > > I'd be /really/ interested to know who uses what! > > *Procedural or OOP?* OOP > *Dev OS* Debian GNU/Linux Etch/Testing/Unstable > *Dev PHP Version* 5.2.0-8+etch10 > *Live Server OS* Debian GNU/Linux Etch > *Live Server PHP

Re: [PHP] what's the difference in the following code?

2008-10-20 Thread Daniel Brown
On Mon, Oct 20, 2008 at 10:02 AM, tedd <[EMAIL PROTECTED]> wrote: > > I hate it when people take things out of context and misquote others. Chris > did not say that one way was better, or different, than the other. But > rather he used two sets of code to illustrate a point. Welcome back, Grum

Re: [PHP] what's the difference in the following code?

2008-10-20 Thread tedd
At 6:37 AM -0700 10/20/08, Lamp Lists wrote: - Original Message From: tedd <[EMAIL PROTECTED]> To: Lamp Lists <[EMAIL PROTECTED]>; php-general@lists.php.net Sent: Monday, October 20, 2008 8:25:50 AM Subject: Re: [PHP] what's the difference in the following code? At 10:58 AM -0700 10/17

Re: [PHP] what's the difference in the following code?

2008-10-20 Thread Lamp Lists
- Original Message From: tedd <[EMAIL PROTECTED]> To: Lamp Lists <[EMAIL PROTECTED]>; php-general@lists.php.net Sent: Monday, October 20, 2008 8:25:50 AM Subject: Re: [PHP] what's the difference in the following code? At 10:58 AM -0700 10/17/08, Lamp Lists wrote: >I'm reading "Essential

Re: [PHP] what's the difference in the following code?

2008-10-20 Thread tedd
At 10:58 AM -0700 10/17/08, Lamp Lists wrote: I'm reading "Essential PHP Security" by Chris Shiflett. on the very beginning, page 5 & 6, if I got it correct, he said this is not good: $search = isset($_GET['search']) ? $_GET['search'] : ''; and this is good: $search = ''; if (isset($_GET['s

Re: [PHP] Best way to recieve image from url?

2008-10-20 Thread Richard Heyes
> ... You could read it progressively using fopen(), fread() et al. Probably. This would mean only a small amount of data is read by yours erver at once. Eg: $rp = fopen('http:www.example.com/title.png', 'r'); $wp = fopen('mylocalfile', 'w'); while ($block = fread($rp, 8192)) { // 8k block size