php-general Digest 15 Oct 2010 21:02:12 -0000 Issue 6989

2010-10-15 Thread php-general-digest-help

php-general Digest 15 Oct 2010 21:02:12 - Issue 6989

Topics (messages 308730 through 308741):

Re: floored by floor()
308730 by: Glen Fuller

An invitation to Multiply.com
308731 by: Farianto Kurniawan (via Multiply)

Re: Help with sending credentials?
308732 by: Richard Quadling
308735 by: Tommy Pham
308737 by: Richard Quadling

Re: RegExp question: how to add a number?
308733 by: Ford, Mike
308736 by: Richard Quadling
308738 by: Andrew Ballard
308739 by: Richard Quadling
308740 by: Andrew Ballard

Re: searching for application like Google Doc
308734 by: Tommy Pham

Error message not understood
308741 by: sueandant

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 10/14/2010 7:49 AM, chris h wrote:

floor(32703) is different then floor(327.03 * 100).  The former is an int,
while the later is a float.  Read those links that were sent :)


Chris.


On Thu, Oct 14, 2010 at 2:14 AM, Glen Fullerglenmful...@shaw.ca  wrote:


On 10/13/2010 10:48 PM, Mattias Thorslund wrote:


Hi List,

I'm having a problem with the behavior of the floor() function:

echo floor(327.03 * 100).\n; //prints 32702 and not 32703!!

Sanity check:
var_dump(327.03 * 100); //prints float(32703) as expected

Any ideas why this happens, and how to work around it?

Thanks,

Mattias




Wouldn't that be equivalent to floor(32703), and since 32703 is the nearest
integer to 32703 it returns it?

Glen Fuller



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







I, see - makes sense now, thank you!

---End Message---
---BeginMessage---
Your Friend Farianto wants you to be his contact on Multiply. Check it out:
http://multiply.com/si/aCD2q,fg,4cQ+pf+4etZKQ




If you never want to be contacted by Multiply again, go to 
http://multiply.com/bl/aCD2q,fg,4cQ+pf+4etZKQ

Report abuse: http://multiply.com/info/inquiry
Privacy policy: http://multiply.com/info/privacy

We haven't added your email address to any lists, nor will we share it with 
anyone at any time.
Multiply, 6001 Park of Commerce Blvd,
Boca Raton, FL

Copyright 2004-2010 Multiply, Inc., All Rights Reserved.
---End Message---
---BeginMessage---
On 14 October 2010 21:45, Brian Dunning br...@briandunning.com wrote:
 Gents -

 I'm trying to work with a major vendor's web service, but all my efforts are 
 met with a 401 authentication error response. I can log in manually to this 
 URL using these credentials through a browser, so I know the credentials are 
 good. Unfortunately the support guys at the vendor don't see any problem with 
 my code and have not been able to help.

 $url = https://servername.com/script;;
 $ctx = stream_context_create(array('https' = array(
        'timeout' = 10,
        'header'  = sprintf(Authorization: Basic %s\r\n, 
 base64_encode(myUsername:myPassword))
        )));
 $result = file_get_contents($url, 0, $ctx);
 $http_response = explode(' ', $http_response_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 expecting the SOAPHeader to contain the authentication?




-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
---End Message---
---BeginMessage---
 -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 credentials?
 
 On 14 October 2010 21:45, Brian Dunning br...@briandunning.com wrote:
  Gents -
 
  I'm trying to work with a major vendor's web service, but all my efforts are
 met with a 401 authentication error response. I can log in manually to this
 URL using these credentials through a browser, so I know the credentials are
 good. Unfortunately the support guys at the vendor don't see any problem
 with my code and have not been able to help.
 
  $url = https://servername.com/script;; $ctx =
  stream_context_create(array('https' = array(
 'timeout' = 10,
 'header'  = sprintf(Authorization: Basic %s\r\n,
  base64_encode(myUsername:myPassword))
 )));
  $result = file_get_contents($url, 0, $ctx); $http_response = explode('
  ', $http_response_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

Shouldn't that be 

Re: [PHP] Help with sending credentials?

2010-10-15 Thread Richard Quadling
On 14 October 2010 21:45, Brian Dunning br...@briandunning.com wrote:
 Gents -

 I'm trying to work with a major vendor's web service, but all my efforts are 
 met with a 401 authentication error response. I can log in manually to this 
 URL using these credentials through a browser, so I know the credentials are 
 good. Unfortunately the support guys at the vendor don't see any problem with 
 my code and have not been able to help.

 $url = https://servername.com/script;;
 $ctx = stream_context_create(array('https' = array(
        'timeout' = 10,
        'header'  = sprintf(Authorization: Basic %s\r\n, 
 base64_encode(myUsername:myPassword))
        )));
 $result = file_get_contents($url, 0, $ctx);
 $http_response = explode(' ', $http_response_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 expecting the SOAPHeader to contain the authentication?




-- 
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] RegExp question: how to add a number?

2010-10-15 Thread Ford, Mike
 -Original Message-
 From: Andre Polykanine [mailto:an...@oire.org]
 Sent: 14 October 2010 21:42
 
 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 doesn't, then it would add Re: at the
 beginning. But (attention, here it is!) if the string starts with
 something like Re[4]:, it should replace it by Re[5]:.
 Here's the code:
 
 $start=mb_strtolower(mb_substr($f['Subject'], 0, 3));
 if ($start==re:) {
 $subject=preg_replace(/^re:(.+?)$/usi, re[2]:$1, $f['Subject']);
 } elseif ($start==re[) {
 // Here $1+1 doesn't work, it returns Re[4+1]:!
 $subject=preg_replace(/^re\[(\d+)\]:(.+?)$/usi, re[$1+1]:$2,
 $f['Subject']);
 } else {
 $subject=Re: .$f['Subject'];
 }
 
 I know there 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_replace). Something like:

  $subject = preg_replace(/^re\[(\d+)\:](.+?)$/eusi, 're['.(\\1+1).']:\\2', 
$f['Subject']);

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: +44 113 812 4730





To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

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



RE: [PHP] searching for application like Google Doc

2010-10-15 Thread Tommy Pham
 -Original Message-
 From: Sharl.Jimh.Tsin [mailto:amoiz.sh...@gmail.com]
 Sent: Thursday, October 14, 2010 9:16 PM
 To: Bob McConnell
 Cc: ??; php-general@lists.php.net
 Subject: Re: [PHP] searching for application like Google Doc
 
 Are you looking for a open-source project likes it?
 
 searching it via Google with php、office doc、open source key words
 may help you.
 
 Best regards,
 Sharl.Jimh.Tsin (From China)
 
 
 
 2010/10/14 Bob McConnell r...@cbord.com:
  From: ??
 
  Is there any application like Google Doc(here I mean the spreadsheet).
 
  What is your conception of like?
 
  Have you looked at OpenOffice?
 
  Bob McConnell
 
  --

I think he/she is asking if there is anything out there on net that is a 
spreadsheet and based purely html  javascript on the front end UI and the back 
end is either xml or db - similar to what google doc is.

Regards,
Tommy



--
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 Tommy Pham
 -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 credentials?
 
 On 14 October 2010 21:45, Brian Dunning br...@briandunning.com wrote:
  Gents -
 
  I'm trying to work with a major vendor's web service, but all my efforts are
 met with a 401 authentication error response. I can log in manually to this
 URL using these credentials through a browser, so I know the credentials are
 good. Unfortunately the support guys at the vendor don't see any problem
 with my code and have not been able to help.
 
  $url = https://servername.com/script;; $ctx =
  stream_context_create(array('https' = array(
 'timeout' = 10,
 'header'  = sprintf(Authorization: Basic %s\r\n,
  base64_encode(myUsername:myPassword))
 )));
  $result = file_get_contents($url, 0, $ctx); $http_response = explode('
  ', $http_response_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

Shouldn't that be https://myUsername:mypassw...@servername.com/script ?

 
 work?
 
 Is this a SOAP based web service?
 
 Are they expecting the SOAPHeader to contain the authentication?
 
 
 
 
 --
 Richard Quadling
 Twitter : EE : Zend
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
 

Regards,
Tommy


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



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

2010-10-15 Thread Richard Quadling
On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote:
 -Original Message-
 From: Andre Polykanine [mailto:an...@oire.org]
 Sent: 14 October 2010 21:42

 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 doesn't, then it would add Re: at the
 beginning. But (attention, here it is!) if the string starts with
 something like Re[4]:, it should replace it by Re[5]:.
 Here's the code:

 $start=mb_strtolower(mb_substr($f['Subject'], 0, 3));
 if ($start==re:) {
 $subject=preg_replace(/^re:(.+?)$/usi, re[2]:$1, $f['Subject']);
 } elseif ($start==re[) {
 // Here $1+1 doesn't work, it returns Re[4+1]:!
 $subject=preg_replace(/^re\[(\d+)\]:(.+?)$/usi, re[$1+1]:$2,
 $f['Subject']);
 } else {
 $subject=Re: .$f['Subject'];
 }

 I know there 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_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 tommy...@gmail.com 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 credentials?

 On 14 October 2010 21:45, Brian Dunning br...@briandunning.com wrote:
  Gents -
 
  I'm trying to work with a major vendor's web service, but all my efforts 
  are
 met with a 401 authentication error response. I can log in manually to this
 URL using these credentials through a browser, so I know the credentials are
 good. Unfortunately the support guys at the vendor don't see any problem
 with my code and have not been able to help.
 
  $url = https://servername.com/script;; $ctx =
  stream_context_create(array('https' = array(
         'timeout' = 10,
         'header'  = sprintf(Authorization: Basic %s\r\n,
  base64_encode(myUsername:myPassword))
         )));
  $result = file_get_contents($url, 0, $ctx); $http_response = explode('
  ', $http_response_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

 Shouldn't that be https://myUsername:mypassw...@servername.com/script ?


 work?

 Is this a SOAP based web service?

 Are they expecting the SOAPHeader to contain the authentication?




 --
 Richard Quadling
 Twitter : EE : Zend
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY


 Regards,
 Tommy



Yeah. CNP error. Thanks.



-- 
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] RegExp question: how to add a number?

2010-10-15 Thread Andrew Ballard
On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling rquadl...@gmail.com wrote:
 On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote:
 -Original Message-
 From: Andre Polykanine [mailto:an...@oire.org]
 Sent: 14 October 2010 21:42

 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 doesn't, then it would add Re: at the
 beginning. But (attention, here it is!) if the string starts with
 something like Re[4]:, it should replace it by Re[5]:.
 Here's the code:

 $start=mb_strtolower(mb_substr($f['Subject'], 0, 3));
 if ($start==re:) {
 $subject=preg_replace(/^re:(.+?)$/usi, re[2]:$1, $f['Subject']);
 } elseif ($start==re[) {
 // Here $1+1 doesn't work, it returns Re[4+1]:!
 $subject=preg_replace(/^re\[(\d+)\]:(.+?)$/usi, re[$1+1]:$2,
 $f['Subject']);
 } else {
 $subject=Re: .$f['Subject'];
 }

 I know there 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_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.


How about preg_replace_callback()?

Andrew

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



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

2010-10-15 Thread Richard Quadling
On 15 October 2010 15:45, Andrew Ballard aball...@gmail.com wrote:
 On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling rquadl...@gmail.com wrote:
 On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote:
 -Original Message-
 From: Andre Polykanine [mailto:an...@oire.org]
 Sent: 14 October 2010 21:42

 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 doesn't, then it would add Re: at the
 beginning. But (attention, here it is!) if the string starts with
 something like Re[4]:, it should replace it by Re[5]:.
 Here's the code:

 $start=mb_strtolower(mb_substr($f['Subject'], 0, 3));
 if ($start==re:) {
 $subject=preg_replace(/^re:(.+?)$/usi, re[2]:$1, $f['Subject']);
 } elseif ($start==re[) {
 // Here $1+1 doesn't work, it returns Re[4+1]:!
 $subject=preg_replace(/^re\[(\d+)\]:(.+?)$/usi, re[$1+1]:$2,
 $f['Subject']);
 } else {
 $subject=Re: .$f['Subject'];
 }

 I know there 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_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.


 How about preg_replace_callback()?

 Andrew


Already provided an example using that : http://news.php.net/php.general/308728

It was the 'e' modifier I couldn't get to work, though I suppose, as
the code is eval'd, I should have been able to do it.

The callback just seems a LOT easier.

-- 
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] RegExp question: how to add a number?

2010-10-15 Thread Andrew Ballard
On Fri, Oct 15, 2010 at 11:07 AM, Richard Quadling rquadl...@gmail.com wrote:
 On 15 October 2010 15:45, Andrew Ballard aball...@gmail.com wrote:
 On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling rquadl...@gmail.com 
 wrote:
 On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote:
 -Original Message-
 From: Andre Polykanine [mailto:an...@oire.org]
 Sent: 14 October 2010 21:42

 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 doesn't, then it would add Re: at the
 beginning. But (attention, here it is!) if the string starts with
 something like Re[4]:, it should replace it by Re[5]:.
 Here's the code:

 $start=mb_strtolower(mb_substr($f['Subject'], 0, 3));
 if ($start==re:) {
 $subject=preg_replace(/^re:(.+?)$/usi, re[2]:$1, $f['Subject']);
 } elseif ($start==re[) {
 // Here $1+1 doesn't work, it returns Re[4+1]:!
 $subject=preg_replace(/^re\[(\d+)\]:(.+?)$/usi, re[$1+1]:$2,
 $f['Subject']);
 } else {
 $subject=Re: .$f['Subject'];
 }

 I know there 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_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.


 How about preg_replace_callback()?

 Andrew


 Already provided an example using that : 
 http://news.php.net/php.general/308728

 It was the 'e' modifier I couldn't get to work, though I suppose, as
 the code is eval'd, I should have been able to do it.

 The callback just seems a LOT easier.


Sorry - I missed the callback function in there. The loop threw me off
because I thought that was part of the solution rather than a test
container.

Andrew

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



[PHP] Error message not understood

2010-10-15 Thread sueandant
Can anyone help me with this error message and explain how to correct the 
mismatch?

PHP Warning:  mysqli_connect() [a 
href='function.mysqli-connect'function.mysqli-connect/a]: Headers and client 
library minor version mismatch. Headers:50051 Library:50151 

tholland

RE: [PHP] Error message not understood

2010-10-15 Thread Tommy Pham
 -Original Message-
 From: sueandant [mailto:hollandsath...@tiscali.co.uk]
 Sent: Friday, October 15, 2010 2:02 PM
 To: PHP
 Subject: [PHP] Error message not understood
 
 Can anyone help me with this error message and explain how to correct the
 mismatch?
 
 PHP Warning:  mysqli_connect() [a href='function.mysqli-
 connect'function.mysqli-connect/a]: Headers and client library minor
 version mismatch. Headers:50051 Library:50151
 
 tholland

It would help if you provide the platform and platform version: 
Windows, Linux, Mac, FreeBSD, or other variants.

And also the PHP version you're using.  Did you compile PHP yourself or use
a distribution?

Regards,
Tommy


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



RE: [PHP] Error message not understood

2010-10-15 Thread Tommy Pham
 -Original Message-
 From: Tommy Pham [mailto:tommy...@gmail.com]
 Sent: Friday, October 15, 2010 2:16 PM
 To: 'sueandant'; 'PHP'
 Subject: RE: [PHP] Error message not understood
 
  -Original Message-
  From: sueandant [mailto:hollandsath...@tiscali.co.uk]
  Sent: Friday, October 15, 2010 2:02 PM
  To: PHP
  Subject: [PHP] Error message not understood
 
  Can anyone help me with this error message and explain how to correct
  the mismatch?
 
  PHP Warning:  mysqli_connect() [a href='function.mysqli-
  connect'function.mysqli-connect/a]: Headers and client library
  minor version mismatch. Headers:50051 Library:50151
 
  tholland
 
 It would help if you provide the platform and platform version:
 Windows, Linux, Mac, FreeBSD, or other variants.
 
 And also the PHP version you're using.  Did you compile PHP yourself or
use
 a distribution?
 
 Regards,
 Tommy

Forgot to mention this earlier... too hasty on the send button ... lol.

Since it's only a warning and you are able to connect, run [1]  [2] to see
what do you get.

[1] http://us2.php.net/manual/en/mysqli.get-client-info.php
[2] http://us2.php.net/manual/en/mysqli.info.php



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



Re: [PHP] Error message not understood

2010-10-15 Thread Luigi Pressello
Probably a PHP compilation problem.
The message seems refer to the headers (libmysql.h) used in the ../configure 
phase of the building process.

It seems like your PHP version was compiled using a MySQL 5.0.11 version 
header, while your connecting to a server running MySQL 5.1.51, Have you 
upgraded your MySQL recently? are you using the MySQL server on the same 
machine that runs Apache/IIS/etc.. and PHP?

Sorry for the Italianese english :)

Luigi.

Il giorno 15/ott/2010, alle ore 23.19, Tommy Pham ha scritto:

 -Original Message-
 From: Tommy Pham [mailto:tommy...@gmail.com]
 Sent: Friday, October 15, 2010 2:16 PM
 To: 'sueandant'; 'PHP'
 Subject: RE: [PHP] Error message not understood
 
 -Original Message-
 From: sueandant [mailto:hollandsath...@tiscali.co.uk]
 Sent: Friday, October 15, 2010 2:02 PM
 To: PHP
 Subject: [PHP] Error message not understood
 
 Can anyone help me with this error message and explain how to correct
 the mismatch?
 
 PHP Warning:  mysqli_connect() [a href='function.mysqli-
 connect'function.mysqli-connect/a]: Headers and client library
 minor version mismatch. Headers:50051 Library:50151
 
 tholland
 
 It would help if you provide the platform and platform version:
 Windows, Linux, Mac, FreeBSD, or other variants.
 
 And also the PHP version you're using.  Did you compile PHP yourself or
 use
 a distribution?
 
 Regards,
 Tommy
 
 Forgot to mention this earlier... too hasty on the send button ... lol.
 
 Since it's only a warning and you are able to connect, run [1]  [2] to see
 what do you get.
 
 [1] http://us2.php.net/manual/en/mysqli.get-client-info.php
 [2] http://us2.php.net/manual/en/mysqli.info.php
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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



[PHP] Fatal error: Allowed memory size of XXXXX bytes exhausted

2010-10-15 Thread Julien Jabouin
Hello,

I have an issu with a script launched by cron.

In fact, although i setup php memory_limit to high value (1G or 2Go),
i have the same issue.

By example  with 2G :

Output from command /usr/bin/php5 -d memory_limit=2G -f
/home/test/www/cron.php ..

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried
to allocate 266257 bytes) in
/home/test/www/app/code/local/Ess/M2e/Model/M2eConnector.php on line
423


And with 1G :

Output from command /usr/bin/php5 -d memory_limit=1G -f
/home/test/www/cron.php ..

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried
to allocate 267717 bytes) in
/home/test/www/app/code/local/Ess/M2e/Model/M2eConnector.php on line
423


Result is the same...
Do you know why ?


This is my php version :
/usr/bin/php5 -v
PHP 5.2.6-1+lenny4 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 22
2009 01:50:58)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by
ionCube Ltd., and
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies


On a Debian Lenny, 64 bits version.

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