Re: [PHP] Re: Best way to mass mail

2005-09-12 Thread Matthew Weier O'Phinney
* Manuel Lemos <[EMAIL PROTECTED]> : > on 09/12/2005 05:18 PM Matthew Weier O'Phinney said the following: > > > > > Mails are then queued to an MTA -- in our case, Postfix. > > > > This is the part I don't know how to do. Can you explain/show > >

Re: [PHP] Re: Best way to mass mail

2005-09-12 Thread Matthew Weier O'Phinney
* Manuel Lemos <[EMAIL PROTECTED]> : > Hello, > > on 09/12/2005 02:56 PM Chris W. Parker said the following: > > Matthew Weier O'Phinney <mailto:[EMAIL PROTECTED]> > > on Monday, September 12, 2005 6:55 AM said: > > > > > Mails are then qu

[PHP] Re: Best way to mass mail

2005-09-12 Thread Matthew Weier O'Phinney
ou click 'Send', it actually simply places the information in a database queue, and the cronjob does the actual sending. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Error Handling

2005-09-09 Thread Matthew Weier O'Phinney
\\\.php on line 7) > > // error handling test > > try{ > $test = 1; > echo $test1 You're missing a semicolon at the end of the above line. > } > catch (Exception $e) { > print "Exception caught\n"; > } > ?> -- Matthew Weier

[PHP] Re: php equivalent for cut

2005-09-06 Thread Matthew Weier O'Phinney
php4 and php5, it is not easy to > find the right stuff. explode() works the same in both PHP4 and PHP5. Additionally, the manual is very good at detailing in what versions of PHP a function is valid. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -

Re: [PHP] preg_match

2005-08-19 Thread Matthew Weier O'Phinney
scape, and could be interpreted differently. Probably the better way to do this would be: $pattern = '/Charges\s+' . $total . ' x ([^\s]*)/si'; preg_match_all($pattern, $single, $from_invoice); -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: is it worth using apache2 with php 4.3.4

2005-08-19 Thread Matthew Weier O'Phinney
* bala chandar <[EMAIL PROTECTED]>: > i am now using apache 1.3.x with php 4.3.4 > > is it worth upgrading to apache 2.x Currently, no: http://ilia.ws/archives/32-Apache-1-vs-Apache-2-Performance.html -- Matthew Weier O'Phinney Zend Certified Engineer http://weier

Re: [PHP] How to suppress HTTP headers?

2005-08-18 Thread Matthew Weier O'Phinney
is not a valid header, for starters. > > You MIGHT be able to "wipe out" the headers PHP sends by doing > something like: > > header("Content-type:"); //Wipe out Content-type: > > but I wouldn't cound on it. > > Sounds to me like the remote

Re: [PHP] Re: run remote shell script

2005-08-18 Thread Matthew Weier O'Phinney
n order to: * generate an SSH key * send the key to the remote server Then, on the remote server, add the SSH key to the appropriate user on that system. Good luck! > Quoting Matthew Weier O'Phinney <[EMAIL PROTECTED]> : > > > * Roger Thomas <[EMAIL PR

[PHP] Re: optional argument when creating a function

2005-08-17 Thread Matthew Weier O'Phinney
array_shift($args); // Get $link: $link = array_shift($args); } ... } -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: run remote shell script

2005-08-17 Thread Matthew Weier O'Phinney
l not be needed), and then in your script you would call: system('ssh svrB /path/to/scriptToRun'); -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Form Processor?

2005-08-16 Thread Matthew Weier O'Phinney
alidate and filter forms. Documentation is still pending, but much of the usage is documented in the class files themselves. http://solarphp.com/ patForms also looks good, and is a stable, robust product -- http://www.php-tools.net/site.php?file=/patForms/overview.xml -- Matthew Weier O&

[PHP] Re: which operating system?

2005-08-15 Thread Matthew Weier O'Phinney
mploy also allows seamless upgrades in most situations. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] 'God' has spoken... :-)

2005-08-14 Thread Matthew Weier O'Phinney
* Robert Cummings <[EMAIL PROTECTED]> : > On Sat, 2005-08-13 at 23:51, Matthew Weier O'Phinney wrote: > > * Sebastian <[EMAIL PROTECTED]> : > > > Jochem Maas wrote: > > > > if you haven't seen it yet and are interested in the future > > >

[PHP] Re: 'God' has spoken... :-)

2005-08-14 Thread Matthew Weier O'Phinney
3.0/Woody Backup and all is working fine Actually, this is likely an issue with running Apache2 with *any* version of PHP. Try switching to Apache1 again with PHP5, and see if you get similar results. You shouldn't. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] 'God' has spoken... :-)

2005-08-14 Thread Matthew Weier O'Phinney
* Sebastian <[EMAIL PROTECTED]> : > Matthew Weier O'Phinney wrote: > > * Sebastian <[EMAIL PROTECTED]> : > > > why php6 and not php5? look how long it took to get to php4 (with php5 > > > just starting to rolling out) and people are already talking

Re: [PHP] 'God' has spoken... :-)

2005-08-13 Thread Matthew Weier O'Phinney
al, and those people who choose to use the features of PHP5 are not going to lose performance or functionality -- actually, quite the opposite. > i just hope php doesn't end up being bloat-filled with the not-so-useful > thing just taking up resources. I think one of the things I

[PHP] Re: wrapping text

2005-08-13 Thread Matthew Weier O'Phinney
ject), stripslashes($message), > "Return-Path: <[EMAIL PROTECTED]>\r\nFrom: \"[foo] foo\" <[EMAIL > PROTECTED]>\r\nbcc: > $bcc \r\nReply-To: [EMAIL PROTECTED] \r\n"."X-Mailer: PHP/" . phpversion()); Make "stripslashes($message)" into "wo

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Matthew Weier O'Phinney
ak the rest of the site or not? If you want to dynamically determine what to disallow based on the UserAgent string, simply tell Apache, via an .htaccess file, to pass robots.txt to PHP for handling. Then have that script do the processing and return output compatible with the robots.txt specification

[PHP] Re: PHP & smarty - nested queries and arrays

2005-08-11 Thread Matthew Weier O'Phinney
have a 'welcome' directory in your templates directory, and an Object.tpl file within -- and that they have permissions such that the web server can open them. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: dynamic object instances

2005-08-10 Thread Matthew Weier O'Phinney
ss from the args list // Do this if using a standard-named static instantiator method // across classes; in this case 'init': return call_user_func_array(array($class, 'init'), $args); // Or use a function named after the class name as the instantiator // met

Re: [PHP] php output to string

2005-08-10 Thread Matthew Weier O'Phinney
* Jesús Fernández <[EMAIL PROTECTED]>: > thanks, it works, but that returns the php code. > what i actually need is the output of that php code evaluated. So eval() the string... -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP Gen

Re: [PHP] Re: need help finding parsing error please

2005-08-05 Thread Matthew Weier O'Phinney
* Jochem Maas <[EMAIL PROTECTED]> : > Matthew Weier O'Phinney wrote: > > * Bruce Gilbert <[EMAIL PROTECTED]> : > > > > > > I am getting this on the following code, and I am not sure what is > > > causing the error and need some pros

[PHP] Re: need help finding parsing error please

2005-08-05 Thread Matthew Weier O'Phinney
the end to this elseif? You follow it immediately with the following lines, which simply won't work (can't define functions inside if() blocks). > //Function saves time and space by eliminating unneccesary code > function check($fieldname) > { -- Matthew Weier O'Phinney

[PHP] Re: WAMP Performance Tuning

2005-08-04 Thread Matthew Weier O'Phinney
heavy hitting boxes in order to get good performance. They don't hurt, but they're not necessary. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Class constants

2005-08-04 Thread Matthew Weier O'Phinney
hing = BAR; private $thing = $_SERVER['SCRIPT_NAME']; // etc. So, in other words, the issues you're seeing are consistent with the documentation. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: overwrite private class members in php5?

2005-08-04 Thread Matthew Weier O'Phinney
;printVar(); // prints 2 I got 1 when running this -- just as I would expect. Are you sure it printed 2? Basically, if a property is undeclared, it is assumed public, so you can set undefined properties without issue. If defined private or protected, the calling script will not be able to

[PHP] Re: Performace and segfault errors with Php5 + Apache 1.3.x + linux-2.6.x

2005-08-04 Thread Matthew Weier O'Phinney
an infinite loop and causing segfaults. Once I tracked that down and fixed it, everything worked fine. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to determine if a script instance is already running?

2005-08-04 Thread Matthew Weier O'Phinney
; > process with that PID is still running, but that tends to be less > > > reliable. > > > > > > If the process does decide to continue in spite of the PID file existing > > > it should issue a a shell kill command to kill that PID in case it's > > > hung or a zombie. > > > > > > -Stut > > > > Excelent point! -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: syntax highlighting your php code on a web page

2005-08-04 Thread Matthew Weier O'Phinney
anual/page/function.ldap-add.html > > Please note this is just an example page which highlights what I am after... There's a few ways. highlight_file() and highlight_string() will do it. Another way is to symlink to the .php file as extension .phps -- and provide a link to the .phps file

[PHP] Re: shell_exec("zip.. ?

2005-08-04 Thread Matthew Weier O'Phinney
;t work. Try: shell_exec("zip -r ddd.zip ddd"); -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: can I use Apache v 2 with PHP?

2005-07-27 Thread Matthew Weier O'Phinney
e a late version of PHP 5.1, if not even another minor version (5.2, 5.3) before it's complete. By the way -- I'm hoping you meant Apache 1.3.33, and not Apache 1.3.3... ;-) -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing

[PHP] Re: <<< performance.

2005-07-26 Thread Matthew Weier O'Phinney
g heredoc syntax *does* take longer). I personally prefer heredocs when using long, multiline strings to using double quotes -- they're easier to maintain. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with a home-grown function

2005-07-26 Thread Matthew Weier O'Phinney
ith both statements. Echoing and breaking out of PHP are typically both undesirable in large applications where you may wish to change headers. Capture your output into a variable and send it to output once all processing is done. This may be done using output buffering or other techniques. --

[PHP] Re: quick question about using capital letters coding w/ PHP

2005-07-24 Thread Matthew Weier O'Phinney
manual, specifically the variables section: http://php.net/variables Cheers! -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PEAR DB issue

2005-07-23 Thread Matthew Weier O'Phinney
no response there, or if no solutions are forthcoming, file a bug report with PEAR::DB. PEAR::DB *is* under active maintainership, from what I can tell, and some of the more recent changes had to do with MS-SQL report, if memory serves. Good luck! -- Matthew Weier O'Phinney Zend Certified Eng

Re: [PHP] Content Header

2005-07-22 Thread Matthew Weier O'Phinney
g Content-Type. They were also sending Content-Disposition in order to indicate the suggested filename -- and wanted to alternately either send the filename *or* have the content echoed to the screen. The 'solution' was to use different URLs, and set Content-Disposition to either 

Re: [PHP] db insert question

2005-07-21 Thread Matthew Weier O'Phinney
> > takes ages, is their a way to loop over the array of form data then > > > maybe do the same to enter it into a database? > > > > > > Thanks for any help. > > > > A generic question begs a generic answer: > > > > foreach($formdata as $thi

[PHP] Re: Content Header

2005-07-20 Thread Matthew Weier O'Phinney
o different links, with an optional download flag in the query string. Then, in your script, generate the Content-Disposition header for 'download' requests, don't otherwise. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] getting file size before upload

2005-07-19 Thread Matthew Weier O'Phinney
; is to simply provide some warning text indicating that the file size should not exceed a certain threshold -- and give back a nice, big error message when it does so they know why the upload failed. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: change letter to all caps

2005-07-18 Thread Matthew Weier O'Phinney
ur friend, if you know what to look for. You're manipulating a string, so look in the 'Strings' section of the manual (http://php.net/strings). Then look for words like 'case' or 'upper', and you'll find: strtoupper - Make a string uppercase Enjoy! -- Ma

Re: [PHP] syntax error, unexpected T_STRING

2005-07-18 Thread Matthew Weier O'Phinney
from both C and perl (and a variety of other languages) -- both of which use this notation. Most languages I've used other than python use a delimiter to indicate the end of a statement (python does as well, technically -- the EOL character). -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: jpgs into database

2005-07-18 Thread Matthew Weier O'Phinney
is typically faster, and will reduce the number of DB calls. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP 5 Object Inheritance

2005-07-15 Thread Matthew Weier O'Phinney
k None of the > Subclasses inherit from the extended superclass. That should work. Have you checked your include_path to make sure a different, unmodified version of the parent class isn't getting loaded? -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.n

Re: [PHP] $PHP_SELF or echo $PHP_SELF

2005-07-14 Thread Matthew Weier O'Phinney
aves PHP_SELF vulnerable to cross-site scripting attacks. For some discussion on this, see: http://blog.phpdoc.info/archives/13-XSS-Woes.html If you're using Apache, the safer bet is to use $_SERVER['SCRIPT_NAME']; otherwise, use PHP_SELF, but filter it to exclude the path

[PHP] Re: Template Engine with Event Handlers

2005-07-10 Thread Matthew Weier O'Phinney
or google for Joshua Eichorn, who has many such resources listed on his blog). -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Help - need to quickly optimize a record count!

2005-07-06 Thread Matthew Weier O'Phinney
o run the count once, and then each time you add records, add the count of new records to that count. Again, storage could be in either a file or a DB. Either way, you're down to doing the count at most 12 times per hour, instead of every time your scripts are hit. -- Matthew Weier O'

[PHP] Re: pear channel

2005-07-06 Thread Matthew Weier O'Phinney
...of course > the channel name was different. Is there something special I need for > this? I have php 5.0.3 You need to compile PHP --with-mcrypt and --with-mhash, as the PEAR installer for >=1.4.0 is dependent on one or more libraries that require these. -- Matthew Weier O'Ph

[PHP] Re: x years old

2005-07-02 Thread Matthew Weier O'Phinney
here. (date() will actually call time() anyways) > $dif_s = ($day2-$day1); > $dif_d = ($dif_s/60/60/24); > $age = round(($dif_d/365.24)); And, as someone else mentioned, you want to do floor() here, as somebody is 16 until their 17th birthday. -- Matthew Weier O'Phinney Zend

Re: [PHP] Object Oriented PHP (5)

2005-06-30 Thread Matthew Weier O'Phinney
for the task. But that's another reason to learn other languages -- to determine when PHP is the right tool for the job, and when another language is. > Well, that got long and philosophical, didn't it? Yes, but well worth th read. Thanks, Richard! -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP] PHP vs. ColdFusion

2005-06-30 Thread Matthew Weier O'Phinney
eel PHP isn't enterprise ready, or why CF is more enterprise ready? Other than the java integration; others have pointed out that the Zend platform addresses that issue. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP vs. ColdFusion

2005-06-29 Thread Matthew Weier O'Phinney
have to pay for support, and there's a large community of developers upon whom to draw. Some of these may be true for ColdFusion as well. What the OP needs to do is determine what merits PHP or ColdFusion may have over the other, as well as what demerits might be present for each, and then evaluate those in the context of their work environment. -- Matthew Weier O'Phinney Zend Certified Engineer http://weierophinney.net/matthew/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Stop spreading PEAR FUD; WAS Re: [PHP] Re: PHP web archeticture

2005-06-25 Thread Matthew Weier O'Phinney
;PEAR sucks' or 'PEAR is bloated' without the authors of said statements offering any reasons why they think so. I wanted to address these reasons, instead of just letting the comment slide on by this time. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Special

[PHP] Module testing; WAS Re: [PHP] Stop spreading PEAR FUD; WAS Re: [PHP] Re: PHP web archeticture

2005-06-25 Thread Matthew Weier O'Phinney
* Chris Shiflett <[EMAIL PROTECTED]> : > Matthew Weier O'Phinney wrote: > > The perl culture is one that includes testing and documentation as > > the norm > > You might be interested to know that there is a PHP equivalent for > Test::More, the CPAN library th

Re: [PHP] Stop spreading PEAR FUD; WAS Re: [PHP] Re: PHP web archeticture

2005-06-25 Thread Matthew Weier O'Phinney
* Paul Waring <[EMAIL PROTECTED]> : > On Sat, Jun 25, 2005 at 10:32:41AM -0400, Matthew Weier O'Phinney wrote: > > If somebody could offer some *constructive* criticism of PEAR -- PEAR as > > it is TODAY, not "3 years ago, when I last tried it" -- these commen

Re: [PHP] Stop spreading PEAR FUD; WAS Re: [PHP] Re: PHP web archeticture

2005-06-25 Thread Matthew Weier O'Phinney
* Robert Cummings <[EMAIL PROTECTED]> : > On Sat, 2005-06-25 at 11:06, Matthew Weier O'Phinney wrote: > > * Robert Cummings <[EMAIL PROTECTED]> : > > > On Sat, 2005-06-25 at 10:32, Matthew Weier O'Phinney wrote: > > > > * Catalin Trifu <[EMAI

Re: [PHP] Stop spreading PEAR FUD; WAS Re: [PHP] Re: PHP web archeticture

2005-06-25 Thread Matthew Weier O'Phinney
* Robert Cummings <[EMAIL PROTECTED]> : > On Sat, 2005-06-25 at 10:32, Matthew Weier O'Phinney wrote: > > * Catalin Trifu <[EMAIL PROTECTED]> : > > > I also tend to stay away from PEAR, which is kinda bloated for my > > > taste, except the Log package.

[PHP] Stop spreading PEAR FUD; WAS Re: [PHP] Re: PHP web archeticture

2005-06-25 Thread Matthew Weier O'Phinney
uctive* criticism of PEAR -- PEAR as it is TODAY, not "3 years ago, when I last tried it" -- these comments would have more weight. As it is, I feel they're just FUD based on ignorance. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist |

[PHP] Re: Can't even make a simple test RSS feed

2005-06-24 Thread Matthew Weier O'Phinney
'http://somelink'; > echo ''; > echo ''; > > ?> You need to add the following before echoing anything: header('Content-type: text/xml'); -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.gard

[PHP] Re: PHP web archeticture

2005-06-24 Thread Matthew Weier O'Phinney
hich get very high traffic. Additionally, I've used it on a client site for a Fortune 100 company. It's robust and tested. If you give it a whirl and have questions, feel free to email me directly. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist |

Re: [PHP] Re: Strange notation to create object

2005-06-24 Thread Matthew Weier O'Phinney
tantiated a new object -- which meant previous errors were still present in the object. So, I stand corrected; I've seen it now! Good discussion! -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Associat

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Jason Barnett <[EMAIL PROTECTED]> : > Matthew Weier O'Phinney wrote: > ... > > This doesn't demonstrate what the OP was talking about, which is initial > > assignment of an object using a reference operator. The results of this > > make perfect sense to me

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Robert Cummings <[EMAIL PROTECTED]> : > On Thu, 2005-06-23 at 15:28, Matthew Weier O'Phinney wrote: > > * Robert Cummings <[EMAIL PROTECTED]> : > > > On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote: > > > > * Robert Cummings <[EM

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Robert Cummings <[EMAIL PROTECTED]> : > On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote: > > * Robert Cummings <[EMAIL PROTECTED]> : > > > On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: > > > > The above notation i

Re: [PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
* Robert Cummings <[EMAIL PROTECTED]> : > On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote: > > * Michael Stepanov <[EMAIL PROTECTED]> : > > > Usually, I develop on Perl. But my current task pushes me to start use > > > PHP. Generally, it

[PHP] Re: Strange notation to create object

2005-06-23 Thread Matthew Weier O'Phinney
often necessary if you needed to, for instance, store an object in an array or another object (otherwise you got a copy of the object, which means state would then differ between the original and the copy). -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist |

Re: [PHP] Re: security question...??

2005-06-21 Thread Matthew Weier O'Phinney
* Rory Browne <[EMAIL PROTECTED]> : > On 6/21/05, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > > * "david forums" <[EMAIL PROTECTED]> : > > > Why don't you try to get interactivity with ID machin which is unique, or > > > wi

Re: [PHP] Re: security question...??

2005-06-21 Thread Matthew Weier O'Phinney
* "david forums" <[EMAIL PROTECTED]>: > Why don't you try to get interactivity with ID machin which is unique, or > with mac address. MAC address wouldn't work if the user is behind a proxy. -- Matthew Weier O'Phinney | WEBSITES: Web

Re: [PHP] Re: security question...??

2005-06-20 Thread Matthew Weier O'Phinney
ally valid! Here's a valid client: open up a command line and type # telnet php.net 80 My point? Anything that can communicate over TCP and talk using HTTP commands is a valid client. That's the way the web was designed, and that's the way it works. -- Matthew Weier O&#x

Re: [PHP] Re: security question...??

2005-06-20 Thread Matthew Weier O'Phinney
aking repeated requests to my systems (DDOS on port 80). I can use the tools of HTTP and PHP to track users across requests. I personally think these are plenty powerful -- and help me provide a service that can be agnostic of the device using it. I understand your concerns, but they come more f

[PHP] Re: security question...??

2005-06-20 Thread Matthew Weier O'Phinney
n issue, either. Browsers may render the page however they choose; HTML is meant to give hints as to how to perform layout, but in the end, it's just a huge string. Is there some specific issue you're thinking about? -- Matthew Weier O'Phinney | WEBSITES: Webmaster and I

[PHP] Re: Problems with header()

2005-06-17 Thread Matthew Weier O'Phinney
();' call right after it, and make sure there's no whitespace after your closing PHP tag (or simply don't include a closing PHP tag). -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening A

Re: [PHP] PHP autogenerating Website Templates

2005-06-17 Thread Matthew Weier O'Phinney
t; answers and didn't find > > them helpful at all. From 'skilled' friends, if they were there at the > > moment, I'll get an answer immediately. Here, sometimes I'm scared to > > ask because of RTFM > > Why be scared? Good thing this isn't Use

[PHP] Re: Question to example from manual

2005-06-16 Thread Matthew Weier O'Phinney
ons > > function Test() > { > static $count = 0; > > $count++; > echo $count; > if ($count < 10) { > Test (); > } > $count--; > } > ?> You need to call the function. Place the following line after or before the function d

[PHP] Re: Include and extending classes

2005-06-16 Thread Matthew Weier O'Phinney
$this->db cannot be used here > } > } Since you're using PHP5, you should use the magic method __construct() for your constructors. Then, within each child class' constructor, add the following: parent::__construct(); By doing so, eventually the core class' const

Re: [PHP] split()?

2005-06-14 Thread Matthew Weier O'Phinney
sj[ OUT1 ]ajdamsda;sjo;tkpdk[ OUT2 ]sdfmjs[ > > OUT3 ]dfjlsd"; > > > > $a = some function > > > > echo ' '; > > print_r($a); > > > > [0] => [ OUT1 ] > > [1] => [ OUT2 ] > > [2] => [ OUT3 ] -- Matthew Weie

[PHP] Re: Retrievable weather service info?

2005-06-14 Thread Matthew Weier O'Phinney
kers included a common path, followed by COUNTRYCODE/STATE_PROVINCE_CODE/City_Name.gif, and that when you choose what type of sticker you want, that determines the path and the image size. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden

[PHP] Re: split()?

2005-06-14 Thread Matthew Weier O'Phinney
for each (which will include the braces); $a[1] will be an array with just the portions captured (no braces): Array ( [0] => Array ( [0] => [ OUT1 ] [1] => [ OUT2 ] [2] => [ OUT3 ] ) [1] => Array ( [0] =

[PHP] Re: form inside an email

2005-06-14 Thread Matthew Weier O'Phinney
ernative to the HTML version that can link to an external page with the form. > If this can be done in php then great. If not any other suggestions are > welcome. The form handler can be done in any language you want... so, of course, use PHP! -- Matthew Weier O'Phinney |

[PHP] Re: Documenting Code Question

2005-06-13 Thread Matthew Weier O'Phinney
t is expected. If the class is in your documentation tree, then it will even link to that class' documentation; if not, it shows it statically. I tend to go with the class name, as it gives more information to the individual reading the documentation. -- Matthew Weier O'Phinney

[PHP] Re: include()

2005-06-13 Thread Matthew Weier O'Phinney
often, you would be wise to have a background process running that pulls this content and caches it for use in your scripts. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.

[PHP] Re: tidy question

2005-06-10 Thread Matthew Weier O'Phinney
to cache that repaired string so I don't have to call that repair > function on every page call, > > 2. I am using xhtml1.1 as DOCTYPE and tidy only gives me the 1.0 > transitional version. tidy_repair_string() OR tidy_parse_string() + tidy_clean_repair() -- Matthew Wei

Re: [PHP] Objects and Performance

2005-06-09 Thread Matthew Weier O'Phinney
me it will live can never justify > the 'maintainability' and 'readability' arguments I'm always hearing > preached. I've never seen any OO PHP code that was easier to read or > maintain for that matter. Again, your experience. I *have* seen OOP PHP that

[PHP] Re: output buffering / output compression

2005-06-09 Thread Matthew Weier O'Phinney
and usually you do this to tune interaction between PHP and Apache and/or the underlying OS. You want to set it to a value that matches Apache's buffer size and/or the OS's network buffer size. If you don't know these, using the defaults is probably the best bet. -- Matthew

Re: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread Matthew Weier O'Phinney
t; $clean['username'] = $_POST['username']; > > aan> } > > ?> > > > > > aan> why to set the $clean as array? what's wrong if I use: > > > > aan> > aan> if (ctype_alnum($_POST['username'])) >

Re: [PHP] linux php editor

2005-06-08 Thread Matthew Weier O'Phinney
for large changes as well? (I use vim as my primary editor :-) > > On 6/6/05, Clive Zagno <[EMAIL PROTECTED]> wrote: > > > what php GUI editors do you recommend. > > > any other recommendations, thanks -- Matthew Weier O'Phinney | WEBSITES: Webmaster a

Re: [PHP] Really simple regex

2005-06-08 Thread Matthew Weier O'Phinney
t I don't know > > on what keywords to search. I know that php uses perl-compatable > > regular expressions, but in no tutorial did I find this. I know that * > > matches any amount of occurances of a string, but formulating it to do > > it in the middle

Re: [PHP] Re: How to execute local applications on the client

2005-06-07 Thread Matthew Weier O'Phinney
* John Nichel <[EMAIL PROTECTED]> : > Matthew Weier O'Phinney wrote: > > * Mauricio Pellegrini <[EMAIL PROTECTED]> : > > > > > Some one has asked me to set a web page from within wich users could > > > launch local applications. Those applicat

Re: [PHP] Re: Unit testing ?

2005-06-07 Thread Matthew Weier O'Phinney
ideas remain the same, just the details differ. > If you have more info (like books, urls, examples) please send me. Unfortunately, no. Most of this is personal experience, a little of it was garnered from php|Tropics, and that portion wasn't an official part of Jason Sweat's presentati

[PHP] Re: How to execute local applications on the client

2005-06-07 Thread Matthew Weier O'Phinney
gt; application. system() -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:[EM

[PHP] Re: headers and session (question)

2005-06-06 Thread Matthew Weier O'Phinney
* "Alessandro Rosa" <[EMAIL PROTECTED]>: > Here's below the solution (the encryption will be shortly performed > into login.php). > > 1 2 session_start(); > > 3 $_SESSION['session_user'] = $_POST['txtIdUtente']; > 4 $_SESSION['session_password'] = $_POST['txtPassword']; > > 5 $PHPcmd = "login.php"

[PHP] Re: PHP bug within multi. dimensional arrays?

2005-06-06 Thread Matthew Weier O'Phinney
* Merlin <[EMAIL PROTECTED]> : > Matthew Weier O'Phinney wrote: > > * Merlin <[EMAIL PROTECTED]> : > > > I am outputting an multidim. array. That works fine, except one thing. > > > The first > > > letter of the value inside dimension 1 always

[PHP] Re: headers and session

2005-06-06 Thread Matthew Weier O'Phinney
gestionale_path_name']."test/2.php" ; > > header( "Location: ".$PHPcmd ); > > ?> > > After the call to header(...), the values of session variables are lost. Does config.inc.php have any whitespace following the closing ?> tag, or does it output any

[PHP] Re: PHP bug within multi. dimensional arrays?

2005-06-06 Thread Matthew Weier O'Phinney
$cat[$row->main_id]['subs'][$row->sub_id] = $row->sub_name; Then loop over that: foreach ($cat as $main_cat) { echo $maincat['name'] . ":\n"; foreach ($maincat['subs'] as $sub_id => $sub_name) { echo "$sub_name$br&qu

[PHP] Re: stripping html tags

2005-06-05 Thread Matthew Weier O'Phinney
column 39: > $text = preg_replace("/(.|\s)*?<\/head>/i" , "" , > $text); > ==^ > > It seems to be pointing to the 'e' is 'head'. Why? Thanks. Why are you using regexes instead of strip_

[PHP] Re: What is faster?

2005-06-05 Thread Matthew Weier O'Phinney
meend2 - $timestart2; echo "if-else took $time1 seconds\n"; echo "ternary took $time2 seconds\n"; (Note: the above works in PHP5; you need to do some additional contortions in PHP4 to get similar functionality with microtime.) >From my own benchmarks, it looks

[PHP] Re: Check class definition

2005-06-03 Thread Matthew Weier O'Phinney
* "Chris Boget" <[EMAIL PROTECTED]>: > You can use defined() to check to see if a constant has been > defined. You can use function_exists() to see if a function > has been defined. But what can you use to check to see if > a class has been defined? class_exists()

[PHP] Re: Best way to use other objects within classes?

2005-06-02 Thread Matthew Weier O'Phinney
-- something required by PHP4 if you want to share the same object amongst several classes. (In PHP5, objects are passed by reference by default, and the above code will actually generate some notices -- but since you're developing for PHP4, you can safely ignore them). -- Matthew Weier O&#

[PHP] Re: Unit testing ?

2005-06-02 Thread Matthew Weier O'Phinney
he code within the test might then look like this: That's kind of a long-winded answer to your question, but it's not something you see a lot of information on. I hope that it helps. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist

Re: [PHP] PHP 5 Question about OO

2005-06-01 Thread Matthew Weier O'Phinney
it will automatically call __autoload with $class_name set to > > 'Class2', which then requires the class file according to the pattern > > used in the function, in this case 'Class2.php'. Note that while PHP is > > not case sensitive to class nam

  1   2   3   >