Re: [PHP] a quick question about array keys

2010-08-31 Thread Richard Quadling
ue and is the same or 1 more. if (is_null($lastValue)) { $lastValue = $value; } // Is the value this or the next value from $lastValue else if($value == $lastValue || $value == 1 + $lastValue) {

Re: [PHP] a quick question about array keys

2010-08-31 Thread Richard Quadling
On 31 August 2010 17:39, Richard Quadling wrote: > On 31 August 2010 17:06, Tontonq Tontonq wrote: >> Array >> ( >> [300] => 300 >> [301] => 301 >> ... Not sure what happened there! 300, 301 => 301, 302 => 302, 303 =

Re: [PHP] a quick question about array keys

2010-08-31 Thread Richard Quadling
On 31 August 2010 17:49, Richard Quadling wrote: > On 31 August 2010 17:39, Richard Quadling wrote: >> On 31 August 2010 17:06, Tontonq Tontonq wrote: >>> Array >>> ( >>> [300] => 300 >>> [301] => 301 >>> ... If you add a ... sort($

Re: [PHP] Backtrace in fatal error?

2010-09-01 Thread Richard Quadling
line 24 In baz\foo Fatal error: Undefined constant 'SNAFU' in Z:\bad.php on line 30 We died a terrible death.array ( 0 => array ( 'function' => 'baz\\{closure}', 'args' => array ( ), ), ) So, it looks like extension or a core mod only. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Backtrace in fatal error?

2010-09-01 Thread Richard Quadling
On 1 September 2010 13:38, wrote: > Thanks! > I didn't notice the register_shutdown_function function. > But it executes always I want to run it only to track fatal error. Also I > can't get the backtrace properly:( I can't use 5.3 so I guess it works > different

Re: [PHP] Hi

2010-09-06 Thread Richard Quadling
example). As far as PHP goes, one of the values returned to you is the $_FILES['userfile']['type'] property. If this matches the zip file mime type (application/x-zip but also application/x-gzip and maybe multipart/x-gzip, multipart/x-zip), then you have a better chance of knowing i

Re: [PHP] Hi

2010-09-06 Thread Richard Quadling
> PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > How is the ['type'] arrived at within PHP. Is this supplied by the web server? Or does PHP have to work it out before passing it to userland code? Either way, is it n

Re: [PHP] Show text without converting to html

2010-09-09 Thread Richard Quadling
> id="">your@email� > 46;address > Which was created by the code, but I apparently can't seem to echo it and > get it to display like above.. It converts it to html no matter what I do. > Thanks! > Jack htmlentities() is your friend here. your@email.address'; ec

Re: [PHP] Zend framework

2010-09-10 Thread Richard Quadling
Being able to truly mix and match the classes I want is of great benefit to me. I can slowly learn the code I need to use rather than jumping in at the deep end and struggle trying to do everything. Regards, -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html :

[PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Richard Quadling
Hi. Can't seem to see a way to do this. Is there a way to do this? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Richard Quadling
On 11 September 2010 17:56, Jim Lucas wrote: > Richard Quadling wrote: >> >> Hi. >> >> Can't seem to see a way to do this. >> >> Is there a way to do this? >> > > Are you talking about a PHP extension or a file extension? > I sat there

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-12 Thread Richard Quadling
ation.file.per-user.php Thanks for that. FastCGI. Will do some more work on it now. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-13 Thread Richard Quadling
On 12 September 2010 09:19, David Robley wrote: > Richard Quadling wrote: > >> On 11 September 2010 20:24, Jim Lucas wrote: >>> As I thought, looking through the docs, it looks like the only way to set >>> the options that are only settable via the php.ini file

Re: [PHP] 1984 (Big Brother)

2010-09-13 Thread Richard Quadling
logged in? An odd number for the day = he's in, even = he's out, missed clocking = screwed/guess. Ideally you want to "hook" into his normal activity if you can. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: 1984 (Big Brother)

2010-09-14 Thread Richard Quadling
iling List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Hmm. I think there is a really easy, cost free, way to deal with this. You get all the employees in a room, with the boss. And then you tell them that when the boss isn't in, they don't h

Re: [PHP] Interacting With Shell

2010-09-17 Thread Richard Quadling
// disable echoing system('stty -echo'); @flock(STDIN, LOCK_EX); $passwd = fgets(STDIN); @flock(STDIN, LOCK_UN); system('stty echo'); } return trim($passwd); } Essentially fgets(STDIN) is the key.

Re: [PHP] Auto-generating HTML

2010-09-21 Thread Richard Quadling
''; foreach($a_Users as $a_User) { $s_Users .= include '../templates/users.tmpl'; } Now, $s_Users contains the rows to display the users and you could do something to it if you wanted to. Of course, rolling your own system is fine, but there are other templating systems availab

Re: [PHP] Php Newsletter script

2010-09-28 Thread Richard Quadling
> 5. Produce Xhtml compliant code and integrate well with a site's existing css > 6. can optionally send that newsletter out as plain text or html > > Googling has not helped in this matter. > Thanks. > Dave. > > -- > PHP General Mailing List (http://www.php.net/) >

Re: [PHP] Php Newsletter script

2010-09-28 Thread Richard Quadling
On 28 September 2010 11:29, a...@ashleysheridan.co.uk wrote: > Still hit and miss though, outlook is just one if many email clients out > there. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > - Reply message - > From: "Richard Quadling" >

[PHP] file_get_contents() failing on CentOS.

2010-09-30 Thread Richard Quadling
e got the output of php -i and of the debug data from wget. So. Any pointers, suggestions, things to read/try/etc. Regards, Richard. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Which PHP 5.3 documentation generators have you found?

2010-09-30 Thread Richard Quadling
-template). There are a few issues (http://code.google.com/p/zym/issues/list). I've resolved some and supplied patches. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file_get_contents() failing on CentOS.

2010-09-30 Thread Richard Quadling
On 30 September 2010 20:27, Adam Richardson wrote: > On Thu, Sep 30, 2010 at 5:02 AM, Richard Quadling > wrote: >> >> Hi. >> >> I'm trying to help a friend with a CentOS setup. >> >> He's installed PHP and SOAP using yum install php-soap a

Re: [PHP] Little Parsing help...

2010-10-01 Thread Richard Quadling
php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > For each key I would guess you'd need the chord order, so if you change key, you change chords accordingly. I don't know if that is accurate. If it is, then a song is recorded in a particular key. The song will

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread Richard Quadling
On 1 October 2010 16:19, kranthi wrote: > probably not the issue, but is the php engine behind a proxy server ? > wget uses the environment variable, but PHP does not > > Kranthi. > http://goo.gl/e6t3 > Hopefully getting a reply today on this. What env_var is used by wget? --

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
> > G# > G#sus7 > Bsus add9 > C#maj7 > Fm7 > G > Cdim no3 > > I am working on a function, but still not producing the proper results. > Hopefully this break down is more clear and someone will bail me out ;-) > > Thanks again for the feedback. > > Don &

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 4 October 2010 11:26, Richard Quadling wrote: > On 1 October 2010 16:20, Don Wieland wrote: >> The logic I need is pretty straight forward, but I am having a hard time >> replicating it using PHP functions. I will try to break it down to it's >> simplest form: >

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread Richard Quadling
On 4 October 2010 11:24, Richard Quadling wrote: > On 4 October 2010 10:48, kranthi wrote: >> http_proxy or HTTP_PROXY i m not sure >> > > Thanks. Passing it on (and learning a bit). http://docs.php.net/manual/en/function.stream-context-get-default.php#72086 Could help to

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-04 Thread Richard Quadling
On 4 October 2010 10:48, kranthi wrote: > http_proxy or HTTP_PROXY i m not sure > Thanks. Passing it on (and learning a bit). -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 4 October 2010 16:10, Adam Richardson wrote: > On Mon, Oct 4, 2010 at 6:29 AM, Richard Quadling wrote: > >> >> http://pastebin.com/rsV35czb >> >> Code with tests and output. >> >> > Nice code, Richard. > > Adam Thank you. -- Richard Quadlin

Re: [PHP] file_get_contents() failing on CentOS.

2010-10-05 Thread Richard Quadling
The issue _WAS_ the firewall. All sorted. Thank you. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Filesystem path creation function

2010-10-05 Thread Richard Quadling
; > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Yep. function createPathString($d, $f){return $d. DIRECTORY_SEPARATOR . $f;} -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Filesystem path creation function

2010-10-05 Thread Richard Quadling
r' (*n*x). > > And > $d = 'foo/'; // note the trailing slash > $f = 'bar'; > $path = createPathString($d, $f); > ?> > > on *n*x would also result in 'foo/bar' (i.e. the path would only contain > one "/"). > > > --

Re: [PHP] php5 - website development - what next

2010-10-08 Thread Richard Quadling
But it is working and is replacing a bunch of console apps written in .BAT with some .EXEs. The SysOps are happier as it is just a normal windows services (so they can stop/start/pause it). Shutdown/bootup server - all OK. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814

Re: [PHP] What other languages do you use?

2010-10-08 Thread Richard Quadling
language (other > than work/day-job/client requires it) > > (2) about to jump in to another language > > Best, > > Nathan 私の名前はリチャードであり、私は日本語を学んでいる。 -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http

Re: [PHP] What other languages do you use?

2010-10-10 Thread Richard Quadling
ures/UDFs/etc. C - Amending the PECL/Win32Service extension (waiting for karma ... ) -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Creating a WebService-Provider using an existing WSDL via SOAP

2010-10-11 Thread Richard Quadling
tes to SoapServer (eventually) which could route to a class with methods of the same name. The way I've described this is how my soap services look. Sure, you could get fancy with more routing but it works for me. Regards, Richard. [1] http://www.urdalen.no/wsdl2php/ [2] http://pastebin.c

Re: [PHP] Scripts running twice

2010-10-11 Thread Richard Quadling
is > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Take a look in C:\windows\tasks. Do you have a load of "Copy of " versions? If you see multiple versions, just delete them. You may need to do this via a comma

Re: [PHP] Scripts running twice

2010-10-11 Thread Richard Quadling
On 11 October 2010 21:20, Alexis wrote: > Thanks for the quick response...checked and no duplicates Richard > > On 11/10/10 14:14, Richard Quadling wrote: >> >> On 11 October 2010 21:10, Alexis  wrote: >>> >>> Hi, >>> >>> A very vague

Re: [PHP] Scripts running twice

2010-10-12 Thread Richard Quadling
> then they still run the twice.sorry about missing that bit out... > > On 11/10/10 14:27, Richard Quadling wrote: >> >> On 11 October 2010 21:20, Alexis  wrote: >>> >>> Thanks for the quick response...checked and no duplicates Richard >>> >>&g

Re: [PHP] Problem with DATE 2010-10-31

2010-10-12 Thread Richard Quadling
ologize for the wishy washy explanation). So, if you were to include the DST, the output would look right. date+0h: 2010-10-31 00:00:00 BST date+1h: 2010-10-31 01:00:00 BST date+2h: 2010-10-31 02:00:00 BST<<< date+3h: 2010-10-31 02:00:00 GMT<<< date+4h: 2010-10-31 03:00:00 GMT

Re: [PHP] Scripts running twice

2010-10-12 Thread Richard Quadling
On 12 October 2010 17:16, Alexis wrote: > If you mean how am I triggering the script, then I am simply opening it up > in my web browser... > > On 12/10/10 04:21, Richard Quadling wrote: >> >> On 11 October 2010 21:37, Alexis  wrote: >>> >>> Thanks for p

Re: [PHP] Zend studio location Cross-Domain Scripting Vulnerability

2010-10-13 Thread Richard Quadling
On 13 October 2010 05:25, Thijs Lensselink wrote: >  On 10/13/2010 12:19 AM, Daevid Vincent wrote: >> >> http://80vul.com/Zend%20studio/Zend%20studio%20location%20Cross.htm >> >> Interesting. A co-worker and I were JUST noticing how our PHPDoc comments >> were being parsed pretty much verbatim inc

Re: [PHP] Re: Buffering output to allow headers late in code?

2010-10-14 Thread Richard Quadling
't like mixing things up. A mechanism I employ that helped me when I started working with PHP is to only have 1 echo statement in the entire page. That way, headers, cookies, etc. can all take place as they need to but only at the end of the script is the content released to the client. In effect, I was doing my own output buffering. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Buffering output to allow headers late in code?

2010-10-14 Thread Richard Quadling
On 14 October 2010 15:09, Richard Quadling wrote: > then that is _PROBABLY_ of for a small one of script or a very very "... _PROBABLY_ ok ..." -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www

Re: [PHP] RegExp question: how to add a number?

2010-10-14 Thread Richard Quadling
On 14 October 2010 21:42, Andre Polykanine wrote: > Hi everyone, > I hope you're doing well (haven't written here for a long time :-)). > The question is as follows: I have a regexp that would do the > following. If the string begins with "Re:", it will change the > beginning to "Re[2]:"; if it do

Re: [PHP] Help with sending credentials?

2010-10-15 Thread Richard Quadling
se_header[0]); > $response_code = $http_response[1];     <<<=== This is evaluating to '401' > > > Thanks. Are they using Basic authentication? Does ... https://myUsername:mypassw...@http://servername.com/script work? Is this a SOAP based web service? Are they ex

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Richard Quadling
his looks like a job for the "e" modifier (see > http://php.net/manual/en/reference.pcre.pattern.modifiers.php, and example #4 > at http://php.net/preg_replace). Something like: > >  $subject = preg_replace("/^re\[(\d+)\:](.+?)$/eusi", > "'re['.(\\1+1).']:\\2'", $f['Subject']); > > Cheers! > > Mike Watch out for the missing '[1]'. This needs to become '[2]' and not '[1]'. The callback seems to be the only way I could get the regex to work. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with sending credentials?

2010-10-15 Thread Richard Quadling
On 15 October 2010 10:51, Tommy Pham wrote: >> -Original Message- >> From: Richard Quadling [mailto:rquadl...@gmail.com] >> Sent: Friday, October 15, 2010 1:47 AM >> To: Brian Dunning >> Cc: PHP-General List >> Subject: Re: [PHP] Help with sending cred

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Richard Quadling
On 15 October 2010 15:45, Andrew Ballard wrote: > On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling wrote: >> On 15 October 2010 10:16, Ford, Mike wrote: >>>> -Original Message- >>>> From: Andre Polykanine [mailto:an...@oire.org] >>>> Sent

Re: [PHP] Re: strtotime

2010-10-18 Thread Richard Quadling
On 17 October 2010 20:34, John Taylor-Johnston wrote: > Yaay, I'm 45 now :). Happy Birthday. ;-) -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Firs Day Of Week UNIX

2010-10-20 Thread Richard Quadling
ntment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro 9 or > higher > http://www.appointment10.com > > For a quick overview - > http://www.appointment10.com/Appt10_Promo/Overview.html > > Take 1 week off the next day that they want. If today is the start of the week, then tod

Re: [PHP] "My truth comes out" [1]

2010-10-21 Thread Richard Quadling
27;s ugly"[1] > > Footnotes: > [1]  "Mask", Henry Rollins [1] "Ugh! Ugly Houses", Chumbawamba. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] "My truth comes out" [1]

2010-10-21 Thread Richard Quadling
;s ugly"[1] What is the response when the string is NOT "TRUE" or "FALSE"? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] "My truth comes out" [1]

2010-10-21 Thread Richard Quadling
On 21 October 2010 12:42, Richard Quadling wrote: > On 21 October 2010 10:39, Gary wrote: >> Is there any nice way to convert a string containing either "TRUE" or >> "FALSE" to a bool with the appropriate value? I know I can just "if >> (strcmp...

Re: [PHP] A mysql question...

2010-10-21 Thread Richard Quadling
edID FROM B WHERE B.BlockedByID = x ) The Subselect finds all the user ids blocked by x. The main select finds all users who are NOT in the subselects list. I'm pretty sure a subselect isn't as eff

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Richard Quadling
On 21 October 2010 15:53, Bastien Koert wrote: > Parenting ruins everything ;-) Ideally, yes. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reminder On Mailing List Rules

2010-10-21 Thread Richard Quadling
On 21 October 2010 21:01, Jay Blanchard wrote: > [snip] > Orwellian! > [/snip] > > "Nazi's did it!" !Godwin! -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Reminder On Mailing List Rules

2010-10-22 Thread Richard Quadling
On 22 October 2010 13:59, Andy McKenzie wrote: > There are > already a few people on the list whose posts I just glance at to see > if there's code, and skip if there's not. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY --

Re: [PHP] Reminder On Mailing List Rules

2010-10-22 Thread Richard Quadling
I read some place that the first one to mention Nazi's lose the argument. http://en.wikipedia.org/wiki/Godwin's_Law -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Entity 'reg' not defined

2010-10-22 Thread Richard Quadling
t;> > > Ash > > Its not my XML (® isn't a www standard anyway) but its the xml provided > by the source I have to deal with and I can't change them so I guess I'll > just read the xml and then run defensing string replacements. > > Thanks for everyone'

Re: [PHP] Entity 'reg' not defined

2010-10-23 Thread Richard Quadling
On 22 October 2010 19:32, Bastien Koert wrote: > On Fri, Oct 22, 2010 at 2:28 PM, Richard Quadling wrote: >> On 22 October 2010 19:01, TR Shaw wrote: >>> >>> On Oct 22, 2010, at 1:56 PM, Ashley Sheridan wrote: >>> >>>> On Fri, 2010-10-22 at 12:03

Re: [PHP] a loop constructing the URLs and make PHP to fetch up to 10 thousand pages

2010-10-23 Thread Richard Quadling
www.php.net/unsub.php > > You can go down that route. If the site has an API allowing you to gather the data another way (i.e. in 1 large file), then use that instead. I'd also make sure you are allowed to gather all that data. You may find some issues with that - just check to be

Re: [PHP] Array problem

2010-10-28 Thread Richard Quadling
piled with the right extensions and that the >> browser isn't doing something unpredictably bizarre when submitting >> the form. > > Just checked the card file, today's cause is: Sunspots. > > KDK > I always believed that cosmic radiation was the cause. -- Richar

[PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Richard Quadling
le at all times). Using __call() can be documented using @method, but pretty much only a single line of description. What would you all do? Regards, Richard Quadling. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List

Re: [PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Richard Quadling
On 1 November 2010 16:27, Nathan Nobbe wrote: > On Mon, Nov 1, 2010 at 9:13 AM, Richard Quadling > wrote: >> >> Hi. >> >> I have an abstract base class (call it genericServiceHandler). >> >> I have concrete classes (FaxService, EmailService). >&

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
ay(2) { [0]=> int(0) [1]=> int(2) } array(2) { [0]=> string(1) "4" [1]=> string(8) "0004" } array(2) { [0]=> int(4) [1]=> int(4) } intval() operates as standard on base 10, so no need to worry about leading zeros' being thought

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
On 4 November 2010 10:33, Richard Quadling wrote: > // Create test file. > $s_TabbedFilename = './test.tab'; > file_put_contents($s_TabbedFilename, "0\t0002" . PHP_EOL . > "4\t0004" . PHP_EOL); > > // Open test file. > $fp_TabbedFile

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Richard Quadling
in your PHP code, which you are going to be executing a lot, even if you are using prepared statements, you can go one further by creating a stored procedure. Now the SQL server will only ever need to compile the statement once. No matter how many times it is used. You only need to supply the data which will be type appropriate. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-04 Thread Richard Quadling
On 4 November 2010 10:42, Richard Quadling wrote: > On 4 November 2010 08:19, Shreyas Agasthya wrote: >> Tamara, >> >> In one of the earlier threads, it was mentioned mysqli APIs are more secure, >> faster, and actually maintained. >> >> Also, if you use so

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
ults = array(); > preg_match_all("/\t/u", $str, $results); > var_dump($results[0]); > On Thu, Nov 4, 2010 at 6:33 AM, Richard Quadling > wrote: >> >> On 3 November 2010 21:42, Alexander Holodny >> wrote: >> > To exclude unexcepted behavior in case of

Re: [PHP] Problems converting strings with 0 to integer

2010-11-04 Thread Richard Quadling
ile, In your opinion what would be the safest way to read and explode > (using \t) a text file encoded in UTF-8? > > On Thu, Nov 4, 2010 at 11:22 AM, Richard Quadling > wrote: >> >> On 4 November 2010 15:11, robert mena wrote: >> > Hi, >> > The core of the

Re: [PHP] php-general-digest-unsubscr...@lists.php.net not working?

2010-11-04 Thread Richard Quadling
" in the subject line and body. I keep getting the emails > though. > That will unsubscribe you from the digest. Are you getting digest messages or individual messages? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General M

Re: [PHP] Pros/Cons of using mysqli prepared statments

2010-11-05 Thread Richard Quadling
all the SQL injection protection yourself (or use a Poka-Yoke - STRONGLY recommend). If you can do all the DB related work on the DB, your client code is simpler. The DB work exists in 1 place. Everyone will know where it is. Using the right tool for the job, AND getting the balance right is what b

Re: [PHP] read smb drive

2010-11-05 Thread Richard Quadling
are. If the share is available, then you can access using UNC ... \\server\share\directory\file.ext is fine. Or \\xxx.xxx.xxx.xxx\share\directory\file.ext But watch out ... in PHP, you'll need to either use / or \\ for each \ in the UNC path ... server\\share\\directory\\file.ext is fine. Or //xxx.xxx.xxx.xxx/share/directory/file.ext If you do really need to map it, then net use x: \\server\share and net use x: /d to drop the mapping. But you don't need to mount the share if the server with Is this not the same on unix? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] read smb drive

2010-11-05 Thread Richard Quadling
On 5 November 2010 16:43, Richard Quadling wrote: > On 5 November 2010 16:30, Nathan Nobbe wrote: >> On Fri, Nov 5, 2010 at 10:18 AM, Steve Staples wrote: >> >>> On Fri, 2010-11-05 at 10:06 -0600, Nathan Nobbe wrote: >>> > On Fri, Nov 5, 2010 at 9:48 AM, Ste

Re: [PHP] php running as module or cgi?

2010-11-11 Thread Richard Quadling
me ago. Everything is a LOT faster and now I use IIS+FastCGI+PHP and I no longer use DB connection persistence as there were issues when accessing multiple databases using the dbselect style functions. I don't know if Apache supports fast cgi (I'd be surprised if it didn't). But in a

Re: [PHP] php running as module or cgi?

2010-11-11 Thread Richard Quadling
king pretty hard to see the difference between module/isapi and fast-cgi. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Retrieving function values

2010-11-15 Thread Richard Quadling
string_to_display, &$continue_parsing) { } Now you can use ... string_parse_tool($string_source, $string_to_parse, $string_to_display, $continue_parsing); Depending upon your code, you could drop the first parameter completely, but that would always overwrite the supplied value with the return value

Re: [PHP] Is it possible to install PHP on IIS?

2010-11-16 Thread Richard Quadling
ons. http://docs.php.net/manual/en/install.windows.manual.php : General instructions for installing PHP manually. http://docs.php.net/manual/en/install.windows.commandline.php : Additional instructions for better integration of PHP into the commandline. -- Richard Quadling Twitter : EE : Zend @RQua

Re: [PHP] Is it possible to install PHP on IIS?

2010-11-16 Thread Richard Quadling
On 16 November 2010 13:21, Jay Blanchard wrote: > [snip] >>> Hi Folks, is it possible to install PHP on IIS? If yes, can someone > please guide me on how to go about doing it? Thanks > [/snip] > > http://www.wampserver.com/en/ > Jay, if that had been wimpserver ... -

Re: FW: [PHP] Why the PEAR hate?

2010-11-16 Thread Richard Quadling
ed the same issues myself over the years quite >> > frustrating, but sure enough, it was my fault most times. >> > >> > Oops...I just replied to Daniel. > > Is PEAR supposed to be the CPAN for PHP, or is there another  repository of > PHP modules that is used

Re: [PHP] I am trying to install PHP on a Windows box, but the PHPINFO page does not load up. Where could I be going wrong?

2010-11-18 Thread Richard Quadling
and then PHP (I'd also add WinCache and RewriteURL). Richard. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is it possible to install PHP on IIS?

2010-11-18 Thread Richard Quadling
is a bit different to just editing a plain text config file, but IIS does use an XML file for its config, so, once you know the xsd, you can do that by hand also. Full docs on the xsd are available online, so really, I'd guess in terms of ability, IIS and Apache are on-par. Richard. -- Ric

Re: [PHP] Problem with functions and arrays...

2010-11-22 Thread Richard Quadling
://www.php.net/unsub.php > > It is extremely counter-intuitive to have parameters named after superglobal variables. Rather than doing nothing, any parameter passed to it will be assigned to the super global $_POST array. There is no "pass be reference" &$_POST which w

Re: [PHP] Procedural Autoloader?

2010-11-22 Thread Richard Quadling
avid > Would it be overboard to use a namespace? Aren't namespaces handled by the autoloader? If not autoload(), how about spl_autoloading? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Suppressing error from displaying

2010-11-25 Thread Richard Quadling
ffset: 1 in ... So, you are actually generating 2 errors by not checking for the @ first. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can't find existing file

2010-11-25 Thread Richard Quadling
ubject: Re: [PHP] Can't find existing file >> > >> so how are we to know?); (h) some other PEBKAC issue; > > > It's been almost a decade since I've seen 'PEBKAC' used  :) I prefer PICNIC. So you can now have a Senior Picnic or a Kiddies Picnic and i

Re: [PHP] Fw: Spoofing user_agent

2010-11-25 Thread Richard Quadling
> Ron >> >> >> >> The Verse of the Day >> >> “Encouragement from God’s Word” >> >> http://www.TheVerseOfTheDay.info >> >> >> >> >> > >> > >> > -- >> > Regards, >> > Shreyas Agasthya >

Re: [PHP] Fw: Spoofing user_agent

2010-11-26 Thread Richard Quadling
Please don't top post. On 25 November 2010 15:38, Ron Piggott wrote: > > Is "User Agent" suppose to have a hyphen  "-"  ?   Ron > > > > The Verse of the Day > “Encouragement from God’s Word” > http://www.TheVerseOfTheDay.info > -Original

Re: [PHP] Fw: Spoofing user_agent

2010-11-26 Thread Richard Quadling
f.org/html/rfc1945#section-10.15 User-Agent = "User-Agent" ":" 1*( product | comment ) Example: User-Agent: CERN-LineMode/2.15 libwww/2.17b3 -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Maili

Re: [PHP] Possible issue in mail() function?

2010-11-26 Thread Richard Quadling
Headers: > ==8<== > > Is this some debug output that someone forgot to remove? > > When relevant, the sendmail_path used is "/usr/sbin/sendmail -t -i", > which is a regular Postfix sendmail. > > [1] http://stackoverflow.com/questions/1906403 > > -- > Ki

Re: [PHP] preg_match fails to resolve variable as a subject

2010-11-26 Thread Richard Quadling
On 26 November 2010 00:07, Da Rock wrote: > preg_match("/(\d{1,3})(\.)$/", exec($mixer . ' ' . $command), &$matches) Can you ... var_dump(exec($mixer . ' ' . $command)); I wonder if the output includes a new line which you are not accounting for in the rege

Re: [PHP] Possible issue in mail() function?

2010-11-26 Thread Richard Quadling
On 26 November 2010 15:12, Tom Hendrikx wrote: > On 26/11/10 15:54, Richard Quadling wrote: >> On 25 November 2010 21:30, Tom Hendrikx wrote: >>> Hi, >>> >>> I noticed that the mail() function in php 5.3.3 on gentoo linux triggers >>> a warning when

Re: [PHP] preg_match fails to resolve variable as a subject

2010-11-28 Thread Richard Quadling
On 27 November 2010 04:45, Da Rock wrote: > On 11/27/10 13:51, Tamara Temple wrote: >> >> On Nov 26, 2010, at 7:28 PM, Da Rock wrote: >> >>> On 11/27/10 00:57, Richard Quadling wrote: >>>> >>>> On 26 November 2010 00:07, Da Rock >>>

Re: [PHP] Problem with RegEx for BBCode

2010-11-28 Thread Richard Quadling
se Regex as a parser is no good. At best, regex can be used as a tokenizer. It has limited ability to handle the nesting. The input you gave has no closing [/i], so the regex can't match the string, so nothing is returned. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] EE1 plugin code/htmlentities() question

2010-11-30 Thread Richard Quadling
> Micky I'm guessing that   is only valid in HTML. Not sure why / would be encoded as it isn't anything too special outside of the closing tag. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST issues

2010-12-01 Thread Richard Quadling
ontaining just the var_dump() will never output anything for $_POST as the URL wasn't the result of a POST'd form. You can also use cURL or stream_contexts to construct the data for POST-ing and your script would receive these correctly. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST issues

2010-12-01 Thread Richard Quadling
b.php > > If a script is ran via a url like ... http://www.site.com/script.php?var1=val1&var2=val2 then $_GET will contain the result. The same $_GET would hold the values from a $_POST is for POST-d data (either via or cURL/Streams). -- Richard Quadling Twitter : EE : Zend @RQuadling : e-

Re: [PHP] $_POST issues

2010-12-01 Thread Richard Quadling
ry string -> which means that $_POST > was never empty. So why var_dump($_POST) is returning just array(0) { } ??? > > nadim attari > alienworkers.com > I'd start reading http://docs.php.net/manual/en/reserved.variables.php -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preg_match fails to resolve variable as a subject

2010-12-03 Thread Richard Quadling
On 3 December 2010 11:13, Da Rock wrote: > On 12/03/10 16:33, Tamara Temple wrote: >> >> On Dec 2, 2010, at 11:33 PM, Da Rock wrote: >> >>> On 11/29/10 09:10, Richard Quadling wrote: >>>> >>>> On 27 November 2010 04:45, Da Rock >>

<    1   2   3   4   5   6   7   8   >