RE: [PHP] Detect and Redirect Mobile Users

2013-06-14 Thread Ford, Mike
teful. Just use x. And why use an if test on a Boolean value to see if it's TRUE or FALSE, just so you can assign TRUE or FALSE?? Since the thing you're testing has the value you want in the first place, just flipping assign it! $isMobile = isset($browser['ismobiledevice']) &am

RE: [PHP] target question

2013-03-25 Thread Ford, Mike
precated. None of this really addresses the OP's problem, however, about which I have very little clue. Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Portland PD507, City Campus, Leeds Metropolitan University, Portland Way, LEEDS,  L

RE: [PHP] Re: UNLESS Statement Equivalent

2013-03-12 Thread Ford, Mike
> -Original Message- > From: Arno Kuhl [mailto:a...@dotcontent.net] > Sent: 12 March 2013 13:04 > > Mike, I presume you're saying the precedence of the Boolean keyword > operators is lower than the Boolean symbol operators, but if so then > wouldn't there b

RE: [PHP] Re: UNLESS Statement Equivalent

2013-03-12 Thread Ford, Mike
sions, you can leave all the internal parentheses out to give: if ($current_page != $saved_page || $current_ip != $saved_ip || $current_dt >= $saved_dt + 3600) Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Portland PD507, City Campus, Leeds

RE: [PHP] Re: Stupid question

2013-02-27 Thread Ford, Mike
ome old kind of syntax you have no reason to be aware of :). Curly braces as an alternative to square brackets have been deprecated for, oooh, probably several years now...! Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Portland PD507, City Cam

Re: [PHP] Random 404 screens

2013-02-09 Thread Mike Mackintosh
On Saturday, February 9, 2013 at 11:51 AM, Geoff Shang wrote: > On Sat, 9 Feb 2013, Jim Giner wrote: > > > Lately, my web pages are giving me some problems. Once a day or so one or > > more of my pages/scripts will give me a 404 error page saying my web page > > has > > timed out. Problem is

RE: [PHP] how to calculate how much data does each ip address use ?

2013-02-01 Thread Mike Mackintosh
Original message From: Sean Greenslade Date: To: Bulent Malik Cc: php-general@lists.php.net Subject: RE: [PHP] how to calculate how much data does each ip address use ? On Feb 1, 2013 10:25 AM, "Bulent Malik" wrote: > > > > >This task is not really suited for php. I w

Re: [PHP] PDO mysql Connection issue

2012-11-28 Thread Mike Mackintosh
he host parameter is not setting or is it setting and > something else is wrong? > > Have you tried running FLUSH HOSTS on the MySQL server? Also, i would try to disable DNS within MYSQL by starting with --skip-name-resolve (http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_skip-name-resolve); -- Mike Mackintosh PHP 5.3 ZCE

RE: [PHP] select function

2012-10-25 Thread Ford, Mike
> -Original Message- > From: Stuart Dallas [mailto:stu...@3ft9.com] > Sent: 25 October 2012 22:48 Aw, nuts! Stuart, you just beat me to it! I was half way through writing an almost identical post when yours popped into my Inbox Cheers! Mike -- Mike Ford, Electronic In

RE: [PHP] Array help.

2012-10-24 Thread Ford, Mike
g you at array_key_exists() (and, why on earth have you got $ocTest[2] in quotes?), but then I realised if I were writing this I'd probably just use isset(), thus: $ocTest = explode(".", $ip); if (isset($groupMappings[$ocTest[2]])): // success else: // fail endif;

RE: [PHP] Wrong time being displayed by PHP!

2012-10-18 Thread Ford, Mike
is was? Because that URL is currently showing the following for me: 02:09:27 am America/Los_Angeles America/Los_Angeles Thu, 18 Oct 2012 02:09:27 -0700 Thu, 18 Oct 2012 09:09:27 + 1350551367 (-25200) Thu Oct 18 02:09:27 PDT 2012 Cheers! Mike -- Mike Ford, Electronic Information Developer

RE: [PHP] How do I do count the occurrence of each word?

2012-08-20 Thread Ford, Mike
$freq[$word]++; > > } > > Please an existence check to avoid incrementing not set array keys > > foreach ($words as $word) { > if (array_key_exists($word, $freq)) { > $freq[$word] = 1; > } else { > $freq[$word]++; > } > } Erm... $freq =

Re: [PHP] File moving hell on Windows

2012-07-31 Thread Mike Mackintosh
On Tuesday, July 31, 2012 at 9:35 PM, tamouse mailing lists wrote: > On Jul 31, 2012 12:12 PM, "Brian Dunning" (mailto:br...@briandunning.com)> wrote: > > > > Regular Windows networking. > > > > On Jul 30, 2012, at 2:29 PM, Mike Mackin

Re: [PHP] File moving hell on Windows

2012-07-30 Thread Mike Mackintosh
-move examples that include the use of > network credentials with each read and write. Thanks... :-( > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > What protocol are you targeting? FTP, SFTP, SSH, SMB, etc? -- Mike Mackintosh PHP 5.3 ZCE

RE: [PHP] Re: php form action breaks script

2012-07-02 Thread Ford, Mike
t the email subject.'; } } else { echo 'You forgot the email body text.'; } } That said, there are lots of personal preferences involved here, and I'm sure others would offer different possibilities. (Me personally, I also prefer the alt

RE: [PHP] Can I do this in a single match/replace?

2012-06-28 Thread Ford, Mike
n this be done or do I need to say loop through matches (there can > be none or many) and do a str_replace. $new_string = preg_replace($pattern, 'http://$1";>$1' , $string); should do it -- don't *think* you need any pesky \ escapes in the replacement, but could be wr

Re: [PHP] why is (intval('444-44444') == '444-44444') EQUAL??!

2012-06-21 Thread Mike Mackintosh
Using == will compare the two values after type juggling is performed. === will compare based on value and type (identical). PHP Will type juggle the string to an integer. Your if/else is just like saying: php> if (444 == "444") echo 'equal'; else echo 'not equal&

RE: [PHP] Exception Handling

2012-06-01 Thread Mackintosh, Mike
-Original Message- From: James Colannino [mailto:crankycycl...@gmail.com] Sent: Friday, June 01, 2012 11:14 AM To: PHP-General List Subject: Re: [PHP] Exception Handling Hey Mike, Thanks for the reply! I saw this comment in the documentation (http://www.php.net/manual/en

RE: [PHP] Exception Handling

2012-06-01 Thread Mackintosh, Mike
-Original Message- From: James Colannino [mailto:crankycycl...@gmail.com] Sent: Friday, June 01, 2012 10:25 AM To: PHP-General List Subject: [PHP] Exception Handling Hey guys, Haven't posted in a long time... Happy Memorial Day! I have an issue with exception handling. I'm using a fra

RE: [PHP] [foreach] - is it proper to...

2012-05-31 Thread Mackintosh, Mike
a string. As a result, I'd suggest to stay away from it. The second scenario, $ entries remains an array, and $entry a string. Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] passing /n into query ERROR

2012-05-31 Thread Mackintosh, Mike
-Original Message- From: Don Wieland [mailto:d...@pointmade.net] Sent: Thursday, May 31, 2012 12:46 PM To: php-general@lists.php.net Subject: [PHP] passing /n into query ERROR I have a query below. When I try to run it with PHP it errors: DATABASE_ERROR: You have an error in your SQL syn

[PHP] Dynamically Populating Multi-Dimensional Arrays

2012-05-31 Thread Mackintosh, Mike
of values passed to the index array. When attempting to do the same with Variable Variables, the addition of brackets caused the PHP Parser to die. Does anyone have any suggestions or alternatives to achieving the same results? Thanks, Mike Array: $array = array( a

Re: [PHP] alias address in REMOTE_ADDR

2012-05-12 Thread Mike Mackintosh
>> REMOTE_ADDR. >> >> Regards, >> Csaba >> > > What IP address is your Apache bound to? You eth0 or one of the alias IPs? > > Jim > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

Re: [PHP] Performance / AB issue?

2012-05-11 Thread Mike Mackintosh
How is PHP running, fast-cgi, sapi, etc..? Is there anything in the error_log for apache? Could be an issue with prefork/worker. Thanks, Mike Mackintosh PHP, the drug of choice - www.highonphp.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Calculating driving distance between UK postcodes

2012-05-04 Thread Mike Mackintosh
stance-between-2-post-codes-uk > > > > > -- > *Terry Ally* > Twitter.com/terryally > Facebook.com/terryally > ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ > To print or not to print this email is the environmentally-searching > question! > Which has the highest ecological cost? A sheet of paper or constantly > switching on your computer and connecting to the Internet to read your > email? > > You should look into curl. Make a post request with the form data as post payload. -- Mike Mackintosh www.HighOnPHP.com

Re: [PHP] sms class

2012-04-17 Thread Mike Mackintosh
Aggregator. Once you subscribe to their service, they usually offer an API. -- Mike Mackintosh www.HighOnPHP.com On Tuesday, April 17, 2012 at 15:50, Lester Caine wrote: > DZvonko Nikolov wrote: > > I need a class that sends sms messages to list of numbers. > > I'm quite new

Re: [PHP] securing a script that exec()s

2012-03-30 Thread Mike Mackintosh
d be to secure the exec call. >> >> How would I best secure the exec call? What would the form input look like? Mike Mackintosh PHP, the drug of choice - www.highonphp.com

Re: [PHP] Graphing

2012-03-18 Thread Mike Mackintosh
Take a look at pChart2. It's the simplest and quickest way to generate a lot of nice graphs. Only requires GD. Look at the source and you can follow their syntax. -- Mike Mackintosh www.HighOnPHP.com On Sunday, March 18, 2012 at 9:33, Ross Hansen wrote: > Hey all, > > I hav

Re: [PHP] Any SNMP Guru's?

2012-03-15 Thread Mike Mackintosh
preg replace function and match Mike Mackintosh PHP, the drug of choice - www.highonphp.com On Mar 15, 2012, at 4:12 PM, David OBrien wrote: > Using command line snmpget you can set an option to append leading 0's to > hex values -o0 > So instead of > > $macaddress = "0

RE: [PHP] Function mktime() documentation question

2012-03-09 Thread Ford, Mike
> -Original Message- > From: Tedd Sperling [mailto:tedd.sperl...@gmail.com] > Sent: 08 March 2012 23:15 > To: PHP-General List [previous discussion snipped] > Mike: > > Very well put. > > You say: > > > Huh? The 0th day of next month *is*

Re: [PHP] no traffic

2012-03-06 Thread Mike Mackintosh
enabled RCS Version $Id: ldap.c 321634 2012-01-01 13:15:04Z > felipe $ Total Links 0/unlimited API Version 3001 Vendor Name OpenLDAP Vendor > Version 20426 SASL Support Enabled How many interfaces are on your box? From the cli can you telnet 10.13.3.10 389 Also do a netstat -na | grep 389 What returns, any open outgoing sockets? Mike Mackintosh ZCE PHP5.3 www.highonphp.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] iphone & php

2012-03-05 Thread Mike Mackintosh
On Mar 5, 2012, at 12:52, "Jim Giner" wrote: > > "Jay Blanchard" wrote in message > news:4f54faf8.4030...@sigmaphinothing.org... >> [snip]In the last few mins I re-booted my phone and it is now doing >> something even worse! [/snip] >> >> Have you also cleared the cache and the cookies? >>

Re: [PHP] iphone & php

2012-03-05 Thread Mike Mackintosh
On Mar 5, 2012, at 12:30, "Jim Giner" wrote: Download dolphin browser, it's a free safari replacement using webkit. Try you app in there and post back the results. Mike Mackintosh ZCE PHP5.3 www.highonphp.com -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Do an LDAP Password Modify Extended Operation?

2012-02-17 Thread Mike Mackintosh
On Feb 17, 2012, at 3:34 PM, kirk.john...@zootweb.com wrote: > Mike Mackintosh wrote on 02/17/2012 > 12:36:06 PM: > >> On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote: >> >>> Is it possible to do an LDAP Password Modify Extended Operation, as >>&

Re: [PHP] Do an LDAP Password Modify Extended Operation?

2012-02-17 Thread Mike Mackintosh
On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote: > Is it possible to do an LDAP Password Modify Extended Operation, as > specified in RFC 3062? The password hashing scheme in the LDAP directory I > am working with may change periodically, so it is my understanding that I > can't has

RE: [PHP] Function links on error and warningmessages

2012-02-03 Thread Ford, Mike
non-existing file. Because you haven't set the docref_root configuration option? (See http://php.net/errorfunc.configuration.php#ini.docref-root). Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Portland PD507, City Campus, Leeds Metro

Re: [PHP] Looking for the string functions

2012-02-01 Thread Mike Mackintosh
On Feb 1, 2012, at 18:49, Matijn Woudt wrote: > On Thu, Feb 2, 2012 at 12:17 AM, Tim Streater wrote: >> I'm keen to look at the C source of such as substr_replace() and stripos(). >> I've downloaded the 5.3.9 PHP source, but am having difficulty locating the >> string functions. Could some

Re: [PHP] Looking for the string functions

2012-02-01 Thread Mike Mackintosh
btw, php dev = internals -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Looking for the string functions

2012-02-01 Thread Mike Mackintosh
If you don't get any replies, try the Dev Mailing list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] sessions and expirations and isolations

2012-01-18 Thread Ford, Mike
ffect on > how long the data will be retained on the server. And you are also possibly wrong that session information is kept in system memory, as the default is for it to be serialized and saved in a regular file on disk. There are other options (database, shared memory, ...), but disk

Re: [PHP] passing variables to php script

2012-01-10 Thread Mike Mackintosh
On Jan 10, 2012, at 15:12, Marco Behnke wrote: > Am 10.01.12 21:07, schrieb Donovan Brooke: >> David Savage wrote: >>> OK...I admit I'm new at thisI have this html file: >>> >>> >>> Generate pdf file of LD, Toll Free, and Directory Assistance >>> calls>> >>> >>> > > Stupid question ..

Re: [PHP] PHP-GTK dead?

2012-01-10 Thread Mike Mackintosh
On Jan 10, 2012, at 14:19, Yared Hufkens wrote: > It seems that PHP-GTK is completely dead. The latest version (2.0.1) was > released on May 2008, nobody answers on questions in the mailing list, > and the latest SVN commit is nearly one year ago. > > Am I wrong or is it senseless to write sti

Re: [PHP] Working on a Subsummary Report

2011-12-16 Thread Mike Mackintosh
On Dec 16, 2011, at 12:04, Dave wrote: > Hi all, > > I need to create a year to date report with individual Subsummary > Report (ala filemaker / others?) headings for each month. So, I’m > curious the best way to approach this for performance speed and > flexibility etc. > > - I can do 1 sq

Re: [PHP] socket_recv

2011-11-17 Thread Mike Mackintosh
On Nov 17, 2011, at 14:03, Tim Streater wrote: > I'm playing around with web sockets and have found a couple of simple servers > written in PHP. They both appear to perform the initial handshake with a > client but then just give up because socket_recv reports that there is no > data. I'm conf

Re: [PHP] problem with sending AT command in php

2011-11-15 Thread Mike Mackintosh
On Nov 15, 2011, at 8:25, Richard Quadling wrote: > On 15 November 2011 11:50, a dehqan wrote: >> \n is for Linux >> \r is for Windows >> >> On 11/14/11, Richard Quadling wrote: >>> On 12 November 2011 20:02, a dehqan wrote: dio_write($handle, 'AT') & dio_write($handle, "AT") make fire

[PHP] binary subtraction assistance

2011-10-20 Thread Mike Alaimo
ec1."\n"; echo $dec2; I get 4.2540766452641E+37 for both $dec1 and $dec2. What can I do to resolve the problem? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CGI PHP vs. FastCGI vs. mod_php vs. application server?

2011-10-12 Thread Mike Mackintosh
Nice write up Richard On Oct 12, 2011, at 7:06, Richard Quadling wrote: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Variable question

2011-10-03 Thread Ford, Mike
uot;}; But I totally agree with all the suggestions to use an array instead. Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Portland PD507, City Campus, Leeds Metropolitan University, Portland Way, LEEDS,  LS1 3HE,  United Kingdom E: m.f...@l

Re: [PHP] Variable question

2011-10-01 Thread Mike Mackintosh
On Oct 1, 2011, at 1:59 PM, Ron Piggott wrote: > > If $correct_answer has a value of 3 what is the correct syntax needed to use > echo to display the value of $trivia_answer_3? > > I know this is incorrect, but along the lines of what I am wanting to do: > > echo $trivia_answer_$correct_answe

Re: [PHP] php.ini setting

2011-10-01 Thread Mike Mackintosh
On Oct 1, 2011, at 2:04 PM, Ashley Sheridan wrote: > On Sat, 2011-10-01 at 12:55 -0400, Stephen wrote: > >> On 11-10-01 11:57 AM, Jim Giner wrote: >>> I'm trying to set magic quotes Off as my reading tells me that it's not good >>> to have it defaulted to On. >>> >>> >> http://php.net/manual/e

[PHP] New Service - Short URL Unshortener

2011-09-25 Thread Mike Mackintosh
n/off type of deal. Feedback would be appreciated. Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Any free online tests to test my PHP knowledge?

2011-09-22 Thread Mike Hansen
On 9/22/2011 1:11 PM, George Langley wrote: On 2011-09-22, at 11:53 AM, Mike Hansen wrote: Does anyone know of a site that has an online test of PHP skills? I'd like to review my PHP knowledge. I've already run across this site: http://vladalexa.com/scripts/php/test/test_php_

[PHP] Any free online tests to test my PHP knowledge?

2011-09-22 Thread Mike Hansen
Does anyone know of a site that has an online test of PHP skills? I'd like to review my PHP knowledge. I've already run across this site: http://vladalexa.com/scripts/php/test/test_php_skill.html Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] dev to production server

2011-09-07 Thread Mike Mackintosh
On Sep 7, 2011, at 0:24, Chris Stinemetz wrote: > Does anyone have a procedure or know of any tutorials that explain how > to take a mac/apache/php/mysql dev environment and converting it to > production environment? > > Basically I want to host my own web site on my local machine now that > I

Re: [PHP] Dealing with multiple form submissions

2011-08-25 Thread Mike Mackintosh
On Aug 25, 2011, at 5:01, John Black wrote: > On 24.08.2011 21:38, Mike Mackintosh wrote: >> On Aug 24, 2011, at 11:52, John Black wrote: >>> On 08/24/2011 03:04 AM, Jason Pruim wrote: >>>> Wondering what everyone does to prevent multiple form submissions? >>

Re: [PHP] Dealing with multiple form submissions

2011-08-24 Thread Mike Mackintosh
On Aug 24, 2011, at 11:52, John Black wrote: > On 08/24/2011 03:04 AM, Jason Pruim wrote: >> Wondering what everyone does to prevent multiple form submissions? >> My form is simply getting emailed to my email, and it redirects to a success >> page when submitted... >> Would it be as simple as

Re: [PHP] Dealing with multiple form submissions

2011-08-23 Thread Mike Mackintosh
pruimphotography.com > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Cookies are always a great start! On success, set a cookie, and if they access the form and cookie is set, redirect automaticall

RE: [PHP] form validation

2011-08-14 Thread Ford, Mike
ST['market']) || > is_null($_POST['market'])) { > // Wasn't set > } > > ?> The last part of that test is redundant, since if $_POST['market'] is NULL isset($_POST['market'] will be FALSE. Cheers! Mike -- Mike Ford, Electronic In

Re: [PHP] Best editor?

2011-08-03 Thread Mike Hansen
On 8/3/2011 7:22 AM, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a we

RE: Re: [PHP] pathinfo function

2011-07-27 Thread Ford, Mike
n the latter there is no ["extension"] element in the returned array. This does seem like the most logical way to make this distinction, but the manual could use a bit of work to document this and other edge cases more explicitly. Cheers! Mike -- Mike Ford, Electronic Information Deve

Re: [PHP] A Question On Web Graphics

2011-07-12 Thread Mike Mackintosh
On Jul 12, 2011, at 3:10 PM, Thomas Dineen wrote: > Gentle People: > >Sorry if this appears off topic but I am not sure where to post the > question. Please do not get mad, just recommend a better venue! > >Currently I am quite experienced with C and learning C++ but I have > never writ

RE: [PHP] Top Posting

2011-07-06 Thread Ford, Mike
any thanks for that link, Stuart -- I've been using Dominik Jain's Outlook QuoteFix for years, but hadn't noticed this development. Have just installed it (and this reply is its first product!). It works well enough, but needs some more development -- might have to look into that as

Re: [PHP] Re: Top Posting

2011-07-05 Thread Mike Mackintosh
On Jul 5, 2011, at 12:06, Stuart Dallas wrote: > On Tue, Jul 5, 2011 at 4:48 PM, Jim Giner wrote: > >> >> "Stuart Dallas" wrote in message >>> If you're looking for a sane reason why Microsoft software is popular in >>> the >>> business world you're not going to find one. > >> >> No - you mi

RE: [PHP] header function odd behavior

2011-06-28 Thread Ford, Mike
, but I'm as confused as you as to why this should be as there is no indication in the manual or the ChangeLog that the default behaviour has changed at any point. Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan Universit

RE: [PHP] Doctrine madness!

2011-06-20 Thread Ford, Mike
ircular references that the gc_collect_cycles() function is unable to recover. But, bottom line, I'd say you're right that it's probably a Doctrine-related issue as the underlying PHP functionality seems to work reasonably well. Cheers! Mike -- Mike Ford, Electronic Information Dev

Re: [PHP] iPhone sadness WOT

2011-05-31 Thread Mike Mackintosh
Thanks :P Sent from my iPhone On May 31, 2011, at 9:54, "Jay Blanchard" wrote: > [snip] >> I beg to differ - the sarcastic remarks have been here since day one. > > Yeah *SHSH* What was he thinking?! > > ;) > [/snip] > > I know huh? Whatevs. > > I added something to the subject so

RE: [PHP] strcmp()?

2011-05-23 Thread Ford, Mike
rrows point. Yes, I remember you mentioning being dyslexic a few times on this list before, which is partly why it was only an "incidentally" at the end. We have a pretty hot "disability and dyslexia" unit here who don't shrink from telling me what's good and what&#

RE: [PHP] strcmp()?

2011-05-23 Thread Ford, Mike
> -Original Message- > From: Joshua Kehn [mailto:josh.k...@gmail.com] > Sent: 23 May 2011 13:04 > > On May 23, 2011, at 8:00 AM, tedd wrote: > > > At 8:13 AM + 5/23/11, Ford, Mike wrote: > >> echo strcmp('These are nearly equal', &#x

RE: [PHP] A Review Request

2011-05-23 Thread Ford, Mike
7;), "\n"; Result: 13 -17 1 The description of the function merely says that the result is <0, 0 or >0 -- it makes no promises about the actual value when it is non-zero. Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Lee

Re: [PHP] context when calling non static method of class in a static way

2011-05-22 Thread Mike Mackintosh
Simon, You may want to be careful with the way you declare your class methods. Example: public function bar() != static function bar(), even if you use pnysudsfksdljfasdjfsd (::) See the example below. class Foo{ static function barStatic() { echo get_class($this); }

RE: [PHP] Warning: session_start()

2011-05-19 Thread Ford, Mike
s renderable text. It is good practice, for this reason, NEVER to use any double-hyphen combinations within an HTML comment - single ones are fine, but any other kind of usage such as the above should be studiously avoided. (Speaking as one bitten on the bum multiple times by badly-formatted HTML

Re: [PHP] Friday Preview

2011-05-17 Thread Mike Mackintosh
Great Idea, and I cant wait! On May 17, 2011, at 8:28 PM, Daniel Brown wrote: >Hey, folks; > >To try to boost a bit of creative thinking and increase list > traffic a bit, let's reach back into the past this Friday and bring > back an oldie-but-goodie: > >PHP Brainteasers > >

Re: [PHP] Error Reporting/Display Errors Issues?

2011-05-10 Thread Mike Mackintosh
our disabling function is malformed. > > > > Richard L. Buskirk > > > > -Original Message- > From: Mike Mackintosh [mailto:mike.mackint...@angrystatic.com] > Sent: Monday, May 09, 2011 10:34 PM > To: php-general@lists.php.net > Subject: [PHP] Error Report

[PHP] Error Reporting/Display Errors Issues?

2011-05-09 Thread Mike Mackintosh
pcnt l' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/usr/local/php-5.3.3/etc' '--with-pdo-mysql=/u sr/local/mysql-5.1.49' '--with-openssl=/usr' I have also set the following: display_errors => Off => Off display_startup_errors => Off => Off error_append_string => no value => no value error_log => no value => no value error_prepend_string => no value => no value error_reporting => 0 => 0 But i continue to receive Strict/Notice and Warnings in code that i wish to be hidden. Any suggestions? Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Installing on a Mac: include_path issues

2011-05-05 Thread Mike Mackintosh
What are the permissions on the include directory? Sent from my iPhone On May 5, 2011, at 9:42, Ken Kixmoeller wrote: > On Thu, May 5, 2011 at 5:59 AM, Mike Mackintosh > wrote: >> Run phpinfo() or php -I and see if the PHP.ini file is being loaded. > >>>>>

Re: [PHP] Re: Installing on a Mac: include_path issues

2011-05-05 Thread Mike Mackintosh
Run phpinfo() or php -I and see if the PHP.ini file is being loaded. Sent from my iPhone On May 5, 2011, at 5:40, Richard Quadling wrote: > On 5 May 2011 05:51, David Robley wrote: >> Ken Kixmoeller wrote: >> >>> Hey, folks -- -- >>> >>> I am switching over my development (I hope) to a Mac.

Re: [PHP] sem_get invalid argument for existing semaphore

2011-05-04 Thread Mike Mackintosh
Are you using the whole hex key or removing the 0x prefix? Sent from my iPhone On May 4, 2011, at 8:13, "Jeremy Greene" wrote: > Hi, > > > > I am trying to do a sem_get on a semaphore that has already been created > by > > a c++ program. But I'm getting this warning: > > > > PHP Warning

RE: [PHP] Ranges for case statement and a WTF moment.

2011-04-07 Thread Ford, Mike
> php > echo (string) 10. > 10 > php > echo (string) .19 > 0.19 Oh, excellent deduction! I must admit, my first instinct was also that both numbers should absorb a dot if one of them did, but failed to realise that .19 would be coerced to "0.19". Just sh

RE: [PHP] Closing Session

2011-04-01 Thread Ford, Mike
formation (such as user id, say), the suggestion of using sub-arrays per application sounds good to me. Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan University, C507 City Campus, Woodhouse Lane, LEEDS,  LS1 3

RE: [PHP] Failure in bitwise operations moving from 5.2.x to 5.3.x

2011-03-15 Thread Ford, Mike
float value on a 32-bit system. It's actually a representation of 32-bit -1, so either write it like that or use something like ip2long('255.255.255.255') (or my_bindec('')!!!). Cheers! Mike -- Mike Ford, Electronic Information Developer

RE: [PHP] Issue with Quick Email validation

2011-03-10 Thread Ford, Mike
Apart form the obvious error already solved, in this situation I would not be forcing my users to type in an element that only has one option -- I would display the form box with the text "@company.com" immediately after it, and only expect the unique part to be entered. Che

RE: [PHP] String length output in php-generated response

2011-02-07 Thread Ford, Mike
client"}]},"error":null} > 0 That's nothing to do with PHP -- it's http chunked encoding, as indicated by the "Transfer-Encoding: chunked" header, and is handled by Apache and your browser. It's totally expected and totally harmless. Read about it

RE: [PHP] override built-in mail()

2011-02-04 Thread Hansen, Mike
> -Original Message- > From: Thijs Lensselink [mailto:d...@lenss.nl] > Sent: Friday, February 04, 2011 12:48 PM > To: php-general@lists.php.net > Subject: Re: [PHP] override built-in mail() > > On 02/04/2011 08:44 PM, Thijs Lensselink wrote: > > On 02/04/2011 08:38 PM, Steve Staples wr

RE: [PHP] Code formatter

2011-02-02 Thread Hansen, Mike
> -Original Message- > From: ken.gu...@gmail.com [mailto:ken.gu...@gmail.com] On > Behalf Of Ken Guest > Sent: Monday, January 31, 2011 3:26 PM > To: Hansen, Mike > Cc: php-general@lists.php.net > Subject: Re: [PHP] Code formatter > > > > On Mon

RE: [PHP] Re: Code formatter

2011-01-31 Thread Hansen, Mike
> -Original Message- > From: Jonesy [mailto:gm...@jonz.net] > Sent: Monday, January 31, 2011 2:25 PM > To: php-general@lists.php.net > Subject: [PHP] Re: Code formatter > > On Mon, 31 Jan 2011 13:27:42 -0700, Hansen, Mike wrote: > > > I've got an

[PHP] Code formatter

2011-01-31 Thread Hansen, Mike
I've got an application that I'm fixing up and I'd like to run it through a code formatter. Is there something like Perl Tidy for PHP? If so, what are you experiences with it. No prob running it on the command line. It'd be great if it followed the PEAR coding standards. Thx -- PHP General Mai

[PHP] Re: [PHP-DEV] Re: [PHP] [security] PHP has DoS vuln with large decimal points

2011-01-16 Thread Mike Robinson
ecurity-related things, send them to > secur...@php.net, not to the General list. Again, if it's of no > concern, it will simply be ignored as bogus or already known Is this not it? http://bugs.php.net/53632 Best Regards Mike Robinson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP Docs update

2011-01-06 Thread Ford, Mike
like it'll be pretty spiffy once all ironed out, though! Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan University, C507 City Campus, Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom Email: m.f...@leedsmet.ac.uk Tel: +4

Re: [PHP] Re: Flexible application plugin architecture, is this possible?

2011-01-04 Thread Mike
MyClass', 'arg1', 'arg2', 'arg3'); $main_class->doSomething( 'foo' ); On Tue, 04 Jan 2011 11:43:13 + Colin Guthrie wrote: > 'Twas brillig, and Mike at 03/01/11 23:37 did gyre and gimble: > > I'm trying to design a powerful pl

[PHP] Flexible application plugin architecture, is this possible?

2011-01-03 Thread Mike
ze PHP doesn't have this magical "__instantiate" function, but does it have any similar mechanism that would work to automatically load alternate classes, or have a class dynamically overload itself during runtime? -- Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

FW: [PHP] Why the PEAR hate?

2010-11-16 Thread Hansen, Mike
> -Original Message- > From: Hansen, Mike > Sent: Tuesday, November 16, 2010 10:24 AM > To: 'Daniel Brown' > Subject: RE: [PHP] Why the PEAR hate? > > > -Original Message- > > From: paras...@gmail.com [mailto:paras...@gmail.com] On > &g

[PHP] Why the PEAR hate?

2010-11-16 Thread Hansen, Mike
http://www.reddit.com/r/PHP/comments/e6zs1/how_many_of_you_use_pear_in_your_projects/ I'm still pretty new to PHP. Why the hate for PEAR? I've used a couple of PEAR modules without any issues. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

RE: [PHP] How do I convert the string "E_ALL & ~E_NOTICE" to the decimal equivalent 6135?

2010-11-12 Thread Ford, Mike
> -Original Message- > From: Daevid Vincent [mailto:dae...@daevid.com] > Sent: 11 November 2010 22:23 > To: php-general@lists.php.net > > > -Original Message- > > From: Ford, Mike [mailto:m.f...@leedsmet.ac.uk] > > Sent: Thursday, November 11,

RE: [PHP] How do I convert the string "E_ALL & ~E_NOTICE" to the decimal equivalent 6135?

2010-11-11 Thread Ford, Mike
_level = E_ALL & ~E_NOTICE > > But when I read it in from the file, it's a string (of course) That's odd -- parse_ini_file() should definitely translate those constants! It certainly works on my v5.2.5 installation. Cheers! Mike -- Mike Ford, Electronic Informa

[PHP] Template engines

2010-11-08 Thread Hansen, Mike
I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Possible foreach bug; seeking advice to isolate the problem

2010-10-22 Thread Ford, Mike
u can find the culprit for this or not -- the solution is simply to put an unset($obj) immediately before the foreach statement -- this will break the reference (without destroying anything but $obj!) and make the foreach behave exactly as you want. Cheers! Mike -- Mike Ford, Electronic Inf

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

2010-10-22 Thread Ford, Mike
> -Original Message- > From: Jason [mailto:networkad...@emarket2.com] > Sent: 21 October 2010 11:45 > > What about something simple and readable like: > > ($string=="true") ? true : false; ... and wasteful. The above gives exactly the same result as ($

RE: [PHP] Formatting an ECHO statement.

2010-10-18 Thread Ford, Mike
;; > > and I do: > > echo 'Other Comments:' .$other. ' > > works perfectly well and prints the value. What if I want to, now, > italicize > the value of $other with the above syntax? How do I achieve it? echo 'Other Comments:' .$other. ' C

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

2010-10-15 Thread Ford, Mike
e actually exists a way to do the numeral addition > ("Re[5]:", not "Re[4+1]:"). > How do I manage to do this? This 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_r

[PHP] Eclipse, Komodo, Netbeans, Zend Studio, PHP Storm, other?

2010-10-13 Thread Hansen, Mike
I'm about to do a lot of work on an existing code base and I think I'd like to try an IDE. I currently use VIM for most editing. What IDE are you using? What do you like about the one you are using? Which ones have you tried? Mike -- PHP General Mailing List (http://www.ph

  1   2   3   4   5   6   7   8   9   10   >