Re: [PHP] A little confused

2013-04-23 Thread Marco Behnke
Am 23.04.13 12:07, schrieb Chris Knipe: > Hi All, > > $_SESSION['ExpiryDate'] = "2013-04-23"; > echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); > > Required Result: Mon, the 23rd of Apr 2013 > > I get however: PHP Warning: date_format() expects parameter 1 to be > DateTime, in

Re: [PHP] mysql_connect noob question

2013-04-23 Thread Jim Giner
On 4/23/2013 10:39 AM, Glob Design Info wrote: Well all, it turns out the *correct* answer to my question, which no one answered, and which only degenerated into a kindergarten-like argument is: "You need to add the port # to the *end* of the mysql_connect() call". i.e.: $link = mysqli_connect

Re: [PHP] mysql_connect noob question

2013-04-23 Thread Glob Design Info
Well all, it turns out the *correct* answer to my question, which no one answered, and which only degenerated into a kindergarten-like argument is: "You need to add the port # to the *end* of the mysql_connect() call". i.e.: $link = mysqli_connect( $host, &user, pass, $database, $port ); Glad

Re: [PHP] Load testing an app

2013-04-23 Thread Andrew Ballard
On Tue, Apr 23, 2013 at 2:29 AM, Adam Richardson wrote: > > On Mon, Apr 22, 2013 at 10:41 PM, Andrew Ballard wrote: >> >> The other developer in our office spent some time profiling the site with >> xdebug and found that an exec() call to netsh used on a couple pages seems >> to take 2-4 seconds

Re: [PHP] mysql_connect noob question

2013-04-23 Thread Tedd Sperling
On Apr 21, 2013, at 3:33 PM, Glob Design Info wrote: > What question did I not answer? That proves that you're not listening -- you are total waste of time for anyone trying to help. Welcome to my ignore file. tedd _ tedd.sperl...@gmail.com http://sperling.com -- PHP G

Re: [PHP] A little confused

2013-04-23 Thread Chris Knipe
Thanks for the replies guys - figured it out! Using date() directly with strtotime() and the appropriate formating works :) date("D, \\t\h\e jS \o\\f M Y", strtotime($_SESSION['ExpiryTime'])) On Tue, Apr 23, 2013 at 12:16 PM, shiplu wrote: > > On Tue, Apr 23, 2013 at 4:07 PM, Chris Knipe w

Re: [PHP] A little confused

2013-04-23 Thread shiplu
On Tue, Apr 23, 2013 at 4:07 PM, Chris Knipe wrote: > echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); > Why not construct DateTime object echo date_format(new DateTime($_SESSION['ExpiryDate']), "D, \t\h\e jS \o\f M Y"); Or $dt = new DateTime($_SESSION['ExpiryDate']); echo

Re: [PHP] A little confused

2013-04-23 Thread Stuart Dallas
On 23 Apr 2013, at 11:13, Chris Knipe wrote: > Yes, > > strtotime() does convert the $_SESSION value to a unix epoc, as expected. > However, date_format still complains that the argument is a Integer value, > instead of a DateTime. Sorry, I didn't read your email properly and didn't realise

Re: [PHP] A little confused

2013-04-23 Thread Chris Knipe
Yes, strtotime() does convert the $_SESSION value to a unix epoc, as expected. However, date_format still complains that the argument is a Integer value, instead of a DateTime. On Tue, Apr 23, 2013 at 12:09 PM, Stuart Dallas wrote: > On 23 Apr 2013, at 11:07, "Chris Knipe" wrote: > > > $_SE

Re: [PHP] A little confused

2013-04-23 Thread Stuart Dallas
On 23 Apr 2013, at 11:07, "Chris Knipe" wrote: > $_SESSION['ExpiryDate'] = "2013-04-23"; > echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); > > Required Result: Mon, the 23rd of Apr 2013 > > I get however: PHP Warning: date_format() expects parameter 1 to be > DateTime, int

[PHP] A little confused

2013-04-23 Thread Chris Knipe
Hi All, $_SESSION['ExpiryDate'] = "2013-04-23"; echo date_format($_SESSION['ExpiryDate'], "D, \t\h\e jS \o\f M Y"); Required Result: Mon, the 23rd of Apr 2013 I get however: PHP Warning: date_format() expects parameter 1 to be DateTime, integer given in I've had a look at the date/time functi