php-general Digest 6 Jul 2013 06:58:22 -0000 Issue 8286

2013-07-06 Thread php-general-digest-help

php-general Digest 6 Jul 2013 06:58:22 - Issue 8286

Topics (messages 321545 through 321558):

Re: strlen ?
321545 by: John Meyer
321546 by: shiplu
321547 by: Jim Giner
321548 by: Matijn Woudt
321549 by: Matijn Woudt
321550 by: Jim Giner
321551 by: Stephen
321552 by: Jim Giner
321554 by: John Meyer
321557 by: Ashley Sheridan
321558 by: Lester Caine

Guaranteed Way to Get Error Message Wanted
321553 by: Brian Smither
321556 by: Ken Robinson

Find a list of function that clashes?
321555 by: Daniel

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---

Jim Giner wrote:
Trying to manage line breaks in some output I'm generating and using 
strlen to measure the lengths of the strings I'm printing. Discovered 
something strange (to me!) in that strlen is returning +1 more than it 
should.


The strings are from a query of my database - simple name fields. But 
everyone of them is coming back with a length that is one more than I 
see.


Ex.

Mike Hall  comes back as 10, not 9
F.B. comes back as 5, not 4.

I've looked at my data and counted the chars - there is no extra space 
at the beginning or end in my table.


Anyone have an explanation?


Does strlen count the line feed?
---End Message---
---BeginMessage---
On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.comwrote:

 Mike Hall  comes back as 10, not 9
 F.B. comes back as 5, not 4.


Doesn't work for me.

php  var_dump(Mike Hall, strlen(Mike Hall));
string(9) Mike Hall
int(9)

Try trimming it first and then apply strlen.


-- 
Shiplu.Mokadd.im
ImgSign.com | A dynamic signature machine
Innovation distinguishes between follower and leader
---End Message---
---BeginMessage---

On 7/5/2013 1:32 PM, shiplu wrote:

On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.comwrote:


Mike Hall  comes back as 10, not 9
F.B. comes back as 5, not 4.



Doesn't work for me.

php  var_dump(Mike Hall, strlen(Mike Hall));
string(9) Mike Hall
int(9)

Try trimming it first and then apply strlen.


Why would I need to trim something that I can already see doesn't have 
any trailing or leading characters?
---End Message---
---BeginMessage---
On Fri, Jul 5, 2013 at 8:33 PM, Jim Giner jim.gi...@albanyhandball.comwrote:

 On 7/5/2013 1:32 PM, shiplu wrote:

 On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.com
 **wrote:

  Mike Hall  comes back as 10, not 9
 F.B. comes back as 5, not 4.


 Doesn't work for me.

 php  var_dump(Mike Hall, strlen(Mike Hall));
 string(9) Mike Hall
 int(9)

 Try trimming it first and then apply strlen.


  Why would I need to trim something that I can already see doesn't have
 any trailing or leading characters?


Because there are characters you can't see?
---End Message---
---BeginMessage---
On Fri, Jul 5, 2013 at 8:39 PM, Jim Giner jim.gi...@albanyhandball.comwrote:

  I checked them in the db manually.  Clicked on the name, selected it, no
 extra space highlighted.  Cursored through the length of the value - no
 extra movements.


That does still not guarantee there are no extra characters. Some
characters are just not visible (NUL, CR, LF, ..)



 On 7/5/2013 2:36 PM, Matijn Woudt wrote:




 On Fri, Jul 5, 2013 at 8:33 PM, Jim Giner jim.gi...@albanyhandball.comwrote:

 On 7/5/2013 1:32 PM, shiplu wrote:

 On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.com
 wrote:

  Mike Hall  comes back as 10, not 9
 F.B. comes back as 5, not 4.


 Doesn't work for me.

 php  var_dump(Mike Hall, strlen(Mike Hall));
 string(9) Mike Hall
 int(9)

 Try trimming it first and then apply strlen.


  Why would I need to trim something that I can already see doesn't have
 any trailing or leading characters?


  Because there are characters you can't see?



---End Message---
---BeginMessage---

On 7/5/2013 2:42 PM, Matijn Woudt wrote:

On Fri, Jul 5, 2013 at 8:39 PM, Jim Giner jim.gi...@albanyhandball.comwrote:


  I checked them in the db manually.  Clicked on the name, selected it, no
extra space highlighted.  Cursored through the length of the value - no
extra movements.



That does still not guarantee there are no extra characters. Some
characters are just not visible (NUL, CR, LF, ..)




On 7/5/2013 2:36 PM, Matijn Woudt wrote:




On Fri, Jul 5, 2013 at 8:33 PM, Jim Giner jim.gi...@albanyhandball.comwrote:


On 7/5/2013 1:32 PM, shiplu wrote:


On Fri, Jul 5, 2013 at 11:10 PM, Jim Giner jim.gi...@albanyhandball.com

wrote:


  Mike Hall  comes back as 10, not 9

F.B. comes back as 5, not 4.



Doesn't work for me.

php  var_dump(Mike Hall, strlen(Mike Hall));
string(9) Mike Hall

php-general Digest 6 Jul 2013 19:14:09 -0000 Issue 8287

2013-07-06 Thread php-general-digest-help

php-general Digest 6 Jul 2013 19:14:09 - Issue 8287

Topics (messages 321559 through 321565):

Re: strlen ?
321559 by: Jim Giner
321560 by: Lester Caine

mongo usage
321561 by: Tim Dunphy
321563 by: Thomas Punt
321564 by: Jonathan Sundquist
321565 by: Tim Dunphy

Guaranteed Way to Get Error Message Wanted
321562 by: Brian Smither

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---

On 7/6/2013 2:59 AM, Lester Caine wrote:

Jim Giner wrote:

And the answer is - yes, there is a LF char at the end of my data in
my whole
table.

Now the question is - how the heck did I put that in there?  Certainly
not
intentionally.  The data is captured from a d/e screen I wrote and it
simply
grabs the post value and inserts a new record with that value along
with some
other values.  And I don't see anything concatenating a LF to my string.


The obvious question that comes to mind is 'What OS'? Having seen this
sort of niggle many times I tend to find it relates to something working
'cross-os' a bit like windows ignoring case in file name and linux then
complaining it can't find a file.

It's probably worth checking the sting length back through your code
just to confirm what added it?

The best I can figure is that I did a preload of many of the names from 
a csv file.  Apparently when I do that it stores the LF at the end of 
the csv line.  Have to remember that the next time.
---End Message---
---BeginMessage---

Jim Giner wrote:

It's probably worth checking the sting length back through your code
just to confirm what added it?


The best I can figure is that I did a preload of many of the names from a csv
file.  Apparently when I do that it stores the LF at the end of the csv line.
Have to remember that the next time.


AH - I use that to flag the end of line when I pulled the data apart - so it 
gets stripped ;)
Then I found fgetcsv() which replaced the manual code and gave just the data as 
an array.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
---End Message---
---BeginMessage---
Hey all,

 I'm trying to pick up some basic use of MongoDB using PHP.

 I seem to have hit an early obstacle that I'd like your opinion on. I try
to pass an array to the mongo insert function, but for some reason the
function does not recognize the array I'm passing. Even though I can
perform a var_dump() on the array and see the contents.

Here's the output I'm seeing (with error):

Mongo Test Page array(6) { [first_name]= string(5) Peter
[last_name]= string(6) Parker [address]= string(16) 175 Fifth
Avenue [city]= string(8) New York [state]= string(2) NY
[zip]= string(5) 10010 }

*Notice*: Undefined variable: addresses in */var/www/mongomaven/index.php* on
line *36*

*Fatal error*: Call to a member function insert() on a non-object in *
/var/www/mongomaven/index.php* on line *36*
*
*
And here's the code:

html
 head
  titleMongo Test/title
 /head
 body

 Mongo Test Page
 ?php



$connection = new Mongo();


$db = $connection-jfdb;

$collection = $db-addresses;

//$adresses = $connection-jfdb-adresses;

$address = array(
 'first_name' = 'Peter',
'last_name' = 'Parker',
'address' = '175 Fifth Avenue',
'city' = 'New York',
'state' = 'NY',
'zip' = '10010',);

var_dump($address);

echo 'br /';

   $addresses-insert($address);

 ?
 /body
/html


I'd appreciate any advice you might have.

Thanks,
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
---End Message---
---BeginMessage---
Could the comma after the last element in your array be causing the problem?

 Date: Sat, 6 Jul 2013 14:42:07 -0400
 From: bluethu...@gmail.com
 To: php-gene...@lists.php.net
 Subject: [PHP] mongo usage
 
 Hey all,
 
  I'm trying to pick up some basic use of MongoDB using PHP.
 
  I seem to have hit an early obstacle that I'd like your opinion on. I try
 to pass an array to the mongo insert function, but for some reason the
 function does not recognize the array I'm passing. Even though I can
 perform a var_dump() on the array and see the contents.
 
 Here's the output I'm seeing (with error):
 
 Mongo Test Page array(6) { [first_name]= string(5) Peter
 [last_name]= string(6) Parker [address]= string(16) 175 Fifth
 Avenue [city]= string(8) New York [state]= string(2) NY
 [zip]= string(5) 10010 }
 
 *Notice*: Undefined variable: addresses in */var/www/mongomaven/index.php* 

Re: [PHP] strlen ?

2013-07-06 Thread Lester Caine

Jim Giner wrote:

And the answer is - yes, there is a LF char at the end of my data in my whole
table.

Now the question is - how the heck did I put that in there?  Certainly not
intentionally.  The data is captured from a d/e screen I wrote and it simply
grabs the post value and inserts a new record with that value along with some
other values.  And I don't see anything concatenating a LF to my string.


The obvious question that comes to mind is 'What OS'? Having seen this sort of 
niggle many times I tend to find it relates to something working 'cross-os' a 
bit like windows ignoring case in file name and linux then complaining it can't 
find a file.


It's probably worth checking the sting length back through your code just to 
confirm what added it?


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strlen ?

2013-07-06 Thread Jim Giner

On 7/6/2013 2:59 AM, Lester Caine wrote:

Jim Giner wrote:

And the answer is - yes, there is a LF char at the end of my data in
my whole
table.

Now the question is - how the heck did I put that in there?  Certainly
not
intentionally.  The data is captured from a d/e screen I wrote and it
simply
grabs the post value and inserts a new record with that value along
with some
other values.  And I don't see anything concatenating a LF to my string.


The obvious question that comes to mind is 'What OS'? Having seen this
sort of niggle many times I tend to find it relates to something working
'cross-os' a bit like windows ignoring case in file name and linux then
complaining it can't find a file.

It's probably worth checking the sting length back through your code
just to confirm what added it?

The best I can figure is that I did a preload of many of the names from 
a csv file.  Apparently when I do that it stores the LF at the end of 
the csv line.  Have to remember that the next time.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strlen ?

2013-07-06 Thread Lester Caine

Jim Giner wrote:

It's probably worth checking the sting length back through your code
just to confirm what added it?


The best I can figure is that I did a preload of many of the names from a csv
file.  Apparently when I do that it stores the LF at the end of the csv line.
Have to remember that the next time.


AH - I use that to flag the end of line when I pulled the data apart - so it 
gets stripped ;)
Then I found fgetcsv() which replaced the manual code and gave just the data as 
an array.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] mongo usage

2013-07-06 Thread Tim Dunphy
Hey all,

 I'm trying to pick up some basic use of MongoDB using PHP.

 I seem to have hit an early obstacle that I'd like your opinion on. I try
to pass an array to the mongo insert function, but for some reason the
function does not recognize the array I'm passing. Even though I can
perform a var_dump() on the array and see the contents.

Here's the output I'm seeing (with error):

Mongo Test Page array(6) { [first_name]= string(5) Peter
[last_name]= string(6) Parker [address]= string(16) 175 Fifth
Avenue [city]= string(8) New York [state]= string(2) NY
[zip]= string(5) 10010 }

*Notice*: Undefined variable: addresses in */var/www/mongomaven/index.php* on
line *36*

*Fatal error*: Call to a member function insert() on a non-object in *
/var/www/mongomaven/index.php* on line *36*
*
*
And here's the code:

html
 head
  titleMongo Test/title
 /head
 body

 Mongo Test Page
 ?php



$connection = new Mongo();


$db = $connection-jfdb;

$collection = $db-addresses;

//$adresses = $connection-jfdb-adresses;

$address = array(
 'first_name' = 'Peter',
'last_name' = 'Parker',
'address' = '175 Fifth Avenue',
'city' = 'New York',
'state' = 'NY',
'zip' = '10010',);

var_dump($address);

echo 'br /';

   $addresses-insert($address);

 ?
 /body
/html


I'd appreciate any advice you might have.

Thanks,
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


[PHP] Guaranteed Way to Get Error Message Wanted

2013-07-06 Thread Brian Smither
It looks like you are running the thread-safe version with
FastCGI, which I understand to be counter to the recommendations.

Thank you for the comment.

I switched to PHP5.4.17-NTS-VC9, but the application still crashes. And still 
no clue as to why.

So, still looking for that magic method to get PHP to report what's happening 
on a 500 Internal Server Error when it's (presumably? not sure...) not the 
server's fault.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] mongo usage

2013-07-06 Thread Thomas Punt
Could the comma after the last element in your array be causing the problem?

 Date: Sat, 6 Jul 2013 14:42:07 -0400
 From: bluethu...@gmail.com
 To: php-general@lists.php.net
 Subject: [PHP] mongo usage
 
 Hey all,
 
  I'm trying to pick up some basic use of MongoDB using PHP.
 
  I seem to have hit an early obstacle that I'd like your opinion on. I try
 to pass an array to the mongo insert function, but for some reason the
 function does not recognize the array I'm passing. Even though I can
 perform a var_dump() on the array and see the contents.
 
 Here's the output I'm seeing (with error):
 
 Mongo Test Page array(6) { [first_name]= string(5) Peter
 [last_name]= string(6) Parker [address]= string(16) 175 Fifth
 Avenue [city]= string(8) New York [state]= string(2) NY
 [zip]= string(5) 10010 }
 
 *Notice*: Undefined variable: addresses in */var/www/mongomaven/index.php* on
 line *36*
 
 *Fatal error*: Call to a member function insert() on a non-object in *
 /var/www/mongomaven/index.php* on line *36*
 *
 *
 And here's the code:
 
 html
  head
   titleMongo Test/title
  /head
  body
 
  Mongo Test Page
  ?php
 
 
 
 $connection = new Mongo();
 
 
 $db = $connection-jfdb;
 
 $collection = $db-addresses;
 
 //$adresses = $connection-jfdb-adresses;
 
 $address = array(
  'first_name' = 'Peter',
 'last_name' = 'Parker',
 'address' = '175 Fifth Avenue',
 'city' = 'New York',
 'state' = 'NY',
 'zip' = '10010',);
 
 var_dump($address);
 
 echo 'br /';
 
$addresses-insert($address);
 
  ?
  /body
 /html
 
 
 I'd appreciate any advice you might have.
 
 Thanks,
 Tim
 
 -- 
 GPG me!!
 
 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
  

Re: [PHP] mongo usage

2013-07-06 Thread Jonathan Sundquist
You commented out the setting of yhe addresses variable
On Jul 6, 2013 1:42 PM, Tim Dunphy bluethu...@gmail.com wrote:

 Hey all,

  I'm trying to pick up some basic use of MongoDB using PHP.

  I seem to have hit an early obstacle that I'd like your opinion on. I try
 to pass an array to the mongo insert function, but for some reason the
 function does not recognize the array I'm passing. Even though I can
 perform a var_dump() on the array and see the contents.

 Here's the output I'm seeing (with error):

 Mongo Test Page array(6) { [first_name]= string(5) Peter
 [last_name]= string(6) Parker [address]= string(16) 175 Fifth
 Avenue [city]= string(8) New York [state]= string(2) NY
 [zip]= string(5) 10010 }

 *Notice*: Undefined variable: addresses in */var/www/mongomaven/index.php*
 on
 line *36*

 *Fatal error*: Call to a member function insert() on a non-object in *
 /var/www/mongomaven/index.php* on line *36*
 *
 *
 And here's the code:

 html
  head
   titleMongo Test/title
  /head
  body

  Mongo Test Page
  ?php



 $connection = new Mongo();


 $db = $connection-jfdb;

 $collection = $db-addresses;

 //$adresses = $connection-jfdb-adresses;

 $address = array(
  'first_name' = 'Peter',
 'last_name' = 'Parker',
 'address' = '175 Fifth Avenue',
 'city' = 'New York',
 'state' = 'NY',
 'zip' = '10010',);

 var_dump($address);

 echo 'br /';

$addresses-insert($address);

  ?
  /body
 /html


 I'd appreciate any advice you might have.

 Thanks,
 Tim

 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B



Re: [PHP] mongo usage

2013-07-06 Thread Tim Dunphy
| Could the comma after the last element in your array be causing the
problem?

I tried removing it, but there was no change. Thanks for the suggestion!


On Sat, Jul 6, 2013 at 2:55 PM, Thomas Punt unassailable...@hotmail.comwrote:

 Could the comma after the last element in your array be causing the
 problem?

  Date: Sat, 6 Jul 2013 14:42:07 -0400
  From: bluethu...@gmail.com
  To: php-general@lists.php.net
  Subject: [PHP] mongo usage

 
  Hey all,
 
  I'm trying to pick up some basic use of MongoDB using PHP.
 
  I seem to have hit an early obstacle that I'd like your opinion on. I try
  to pass an array to the mongo insert function, but for some reason the
  function does not recognize the array I'm passing. Even though I can
  perform a var_dump() on the array and see the contents.
 
  Here's the output I'm seeing (with error):
 
  Mongo Test Page array(6) { [first_name]= string(5) Peter
  [last_name]= string(6) Parker [address]= string(16) 175 Fifth
  Avenue [city]= string(8) New York [state]= string(2) NY
  [zip]= string(5) 10010 }
 
  *Notice*: Undefined variable: addresses in
 */var/www/mongomaven/index.php* on
  line *36*
 
  *Fatal error*: Call to a member function insert() on a non-object in *
  /var/www/mongomaven/index.php* on line *36*
  *

  *
  And here's the code:
 
  html
  head
  titleMongo Test/title
  /head
  body
 
  Mongo Test Page
  ?php
 
 
 
  $connection = new Mongo();
 
 
  $db = $connection-jfdb;
 
  $collection = $db-addresses;
 
  //$adresses = $connection-jfdb-adresses;
 
  $address = array(
  'first_name' = 'Peter',
  'last_name' = 'Parker',
  'address' = '175 Fifth Avenue',
  'city' = 'New York',
  'state' = 'NY',
  'zip' = '10010', );
 
  var_dump($address);
 
  echo 'br /';
 
  $addresses-insert($address);
 
  ?
  /body
  /html
 
 
  I'd appreciate any advice you might have.
 
  Thanks,
  Tim
 
  --
  GPG me!!
 
  gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: [PHP] mongo usage

2013-07-06 Thread Tim Dunphy
| You commented out the setting of yhe addresses variable

Those were both equivalent ways of stating the same thing. I tried
substituting the other statement but there was no change:

$db = $connection-jfdb;

//$collection = $db-addresses;

$adresses = $connection-jfdb-adresses;

Thanks again!



On Sat, Jul 6, 2013 at 2:57 PM, Jonathan Sundquist jsundqu...@gmail.comwrote:

 You commented out the setting of yhe addresses variable
 On Jul 6, 2013 1:42 PM, Tim Dunphy bluethu...@gmail.com wrote:

 Hey all,

  I'm trying to pick up some basic use of MongoDB using PHP.

  I seem to have hit an early obstacle that I'd like your opinion on. I try
 to pass an array to the mongo insert function, but for some reason the
 function does not recognize the array I'm passing. Even though I can
 perform a var_dump() on the array and see the contents.

 Here's the output I'm seeing (with error):

 Mongo Test Page array(6) { [first_name]= string(5) Peter
 [last_name]= string(6) Parker [address]= string(16) 175 Fifth
 Avenue [city]= string(8) New York [state]= string(2) NY
 [zip]= string(5) 10010 }

 *Notice*: Undefined variable: addresses in
 */var/www/mongomaven/index.php* on
 line *36*

 *Fatal error*: Call to a member function insert() on a non-object in *
 /var/www/mongomaven/index.php* on line *36*
 *
 *
 And here's the code:

 html
  head
   titleMongo Test/title
  /head
  body

  Mongo Test Page
  ?php



 $connection = new Mongo();


 $db = $connection-jfdb;

 $collection = $db-addresses;

 //$adresses = $connection-jfdb-adresses;

 $address = array(
  'first_name' = 'Peter',
 'last_name' = 'Parker',
 'address' = '175 Fifth Avenue',
 'city' = 'New York',
 'state' = 'NY',
 'zip' = '10010',);

 var_dump($address);

 echo 'br /';

$addresses-insert($address);

  ?
  /body
 /html


 I'd appreciate any advice you might have.

 Thanks,
 Tim

 --
 GPG me!!

 gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


Re: [PHP] Guaranteed Way to Get Error Message Wanted

2013-07-06 Thread Richard Quadling
On 6 July 2013 19:50, Brian Smither bhsmit...@gmail.com wrote:

 It looks like you are running the thread-safe version with
 FastCGI, which I understand to be counter to the recommendations.

 Thank you for the comment.

 I switched to PHP5.4.17-NTS-VC9, but the application still crashes. And
 still no clue as to why.

 So, still looking for that magic method to get PHP to report what's
 happening on a 500 Internal Server Error when it's (presumably? not
 sure...) not the server's fault.


Have you got all your extensions updated? Enable display_startup_errors.
Try running the command line PHP ...

php -r echo 1;

With your config. Just to see if there is anything ultra obvious missing.

-- 
Richard Quadling
Twitter : @RQuadling


[PHP] Guaranteed Way to Get Error Message Wanted

2013-07-06 Thread Brian Smither
Have you got all your extensions updated?

I would think so. Just to state the required disclaimers:
phpinfo.php with ? phpinfo() ? works.
Liberally peppering a tracer routine throughout the application shows it is 
getting executed up until one spot. But there is nothing obviously wrong with 
the code. Nothing!

That's why I need the guaranteed message delivery on why PHP does not like the 
code.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Guaranteed Way to Get Error Message Wanted

2013-07-06 Thread Richard Quadling
On 6 July 2013 21:45, Brian Smither bhsmit...@gmail.com wrote:

 Have you got all your extensions updated?

 I would think so. Just to state the required disclaimers:
 phpinfo.php with ? phpinfo() ? works.
 Liberally peppering a tracer routine throughout the application shows it
 is getting executed up until one spot. But there is nothing obviously wrong
 with the code. Nothing!

 That's why I need the guaranteed message delivery on why PHP does not like
 the code.


Turn on all your error reporting/logging. Add a try/catch if appropriate.
Turn off any unhandled exception processing.

Load in XDebug and get a trace going, what is the code doing prior to
failure?


-- 
Richard Quadling
Twitter : @RQuadling


Re: [PHP] mongo usage

2013-07-06 Thread Matijn Woudt
On Sat, Jul 6, 2013 at 9:16 PM, Tim Dunphy bluethu...@gmail.com wrote:

 | You commented out the setting of yhe addresses variable

 Those were both equivalent ways of stating the same thing. I tried
 substituting the other statement but there was no change:

 $db = $connection-jfdb;

 //$collection = $db-addresses;

 $adresses = $connection-jfdb-adresses;

 Thanks again!


You seem to spell the variable differently (1 'd' vs. 2 'd's)?

- Matijn


Re: [PHP] mongo usage

2013-07-06 Thread Tim Dunphy
| You seem to spell the variable differently (1 'd' vs. 2 'd's)?

Thanks! Fixed the type-o. Still no change.

   $connection = new Mongo();


$db = $connection-jfdb;

//$collection = $db-addresses;

$adresses = $connection-jfdb-addresses;

Any other suggestions? Appreciated.

Tim


On Sat, Jul 6, 2013 at 5:39 PM, Matijn Woudt tijn...@gmail.com wrote:




 On Sat, Jul 6, 2013 at 9:16 PM, Tim Dunphy bluethu...@gmail.com wrote:

 | You commented out the setting of yhe addresses variable

 Those were both equivalent ways of stating the same thing. I tried
 substituting the other statement but there was no change:

 $db = $connection-jfdb;

 //$collection = $db-addresses;

 $adresses = $connection-jfdb-adresses;

 Thanks again!


 You seem to spell the variable differently (1 'd' vs. 2 'd's)?

 - Matijn




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


[PHP] Re: mongo usage

2013-07-06 Thread Tim Streater
On 06 Jul 2013 at 23:27, Tim Dunphy bluethu...@gmail.com wrote: 

 | You seem to spell the variable differently (1 'd' vs. 2 'd's)?

 Thanks! Fixed the type-o. Still no change.

   $connection = new Mongo();

$db = $connection-jfdb;

//$collection = $db-addresses;

$adresses = $connection-jfdb-addresses;

 ~


 Any other suggestions? Appreciated.

Fix the other typo.

--
Cheers  --  Tim

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: mongo usage

2013-07-06 Thread Tim Dunphy
Thanks. Sorry to bug you guys with this. That did it. sigh


On Sat, Jul 6, 2013 at 6:49 PM, Tim Streater t...@clothears.org.uk wrote:

 On 06 Jul 2013 at 23:27, Tim Dunphy bluethu...@gmail.com wrote:

  | You seem to spell the variable differently (1 'd' vs. 2 'd's)?
 
  Thanks! Fixed the type-o. Still no change.
 
$connection = new Mongo();
 
 $db = $connection-jfdb;
 
 //$collection = $db-addresses;
 
 $adresses = $connection-jfdb-addresses;

  ~

 
  Any other suggestions? Appreciated.

 Fix the other typo.

 --
 Cheers  --  Tim


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B