php-general Digest 1 Oct 2007 00:08:27 -0000 Issue 5047

2007-09-30 Thread php-general-digest-help

php-general Digest 1 Oct 2007 00:08:27 - Issue 5047

Topics (messages 262594 through 262602):

Re: counting with leading zeros
262594 by: Robert Cummings
262595 by: Jeffery Fernandez
262596 by: tedd

Re: Classes and access to outside variables
262597 by: Martin Alterisio

Re: Session problem
262598 by: Dušan Novaković
262599 by: Jim Lucas

PHP and daylight savings
262600 by: Bruce Cowin
262601 by: Bruce Cowin
262602 by: Bruce Cowin

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
---BeginMessage---
On Sat, 2007-09-29 at 23:47 -0400, brian wrote:

 It's not so much that i disrespect Rob. It's just that i felt i had to 
 call him out for being a dickhead by taking my statement out of context.

Ok, so I'm a dickhead. What does that make you? A vagina?

Name calling really is the lowest form of argumentation. It was fun when
I was 7. So were swear words.

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...
---End Message---
---BeginMessage---
gee you guys behave like kids. don't you all have other things to do than 
whinge, swear  and blame each other on the list? Take it elsewhere and sort 
it out. This is bad for the PHP community in general. It doesn't reflect what 
the community is about.

my 2c.

On Sunday 30 September 2007 13:47, brian wrote:
 tedd wrote:
  At 8:30 PM -0400 9/27/07, brian wrote:
  I wasn't bitching! And i *thought* that my numerous attempts at
  explaining such would have been enough. Obviously not, but wtf can you
  do with people who seem to want only to stir up shit?
 
  It sure sounded like you were bitching.

 Gee, thanks for pointing that out, Jeeves. I'd say it's pretty damned
 obvious now that Rob thought i was bitching about his response to my
 query. However, if you'd have bothered to note my replies since, you
 might have twigged to the fact that i'd been trying to set that
 straight. But you just *had* to send off your own dickish response.

  And, your off-list fuck you, too, asswipe to me certainly seems to
  support that -- don't you think?

 How so? Had it crossed your little mind that maybe--just maybe--i was
 becoming not a little frustrated with the fact that my reply had been
 taken the wrong way? That, instead of accepting that and moving on, this
 had become far too OT with bullshit comments such as yours? So, yeah,
 you might say that i'm bitching *now*.

 You and i have had our run-ins on this list on more than one occasion.
 Until now, i've chosen to take your crap in stride. If you have nothing
 constructive to add then STFU.

  Look, there's nothing you can say to me that hasn't been said before
  (some of it deserving), so my advice is for you to refrain from such
  conduct and at least try to look professional. That way you'll hide your
  ignorance a little longer -- it's always worked for me.

 This is me laughing. I'm sure you have no bloody idea how funny that
 statement looks from where i'm sitting. See the paragraph above.

  Dan Parry wrote:
  Can I please interject and say that I vastly respect Tedd(ddd) and
  Rob(bb?) and their opinions

 It's not so much that i disrespect Rob. It's just that i felt i had to
 call him out for being a dickhead by taking my statement out of context.

 Tedd ... not so very much at all.

 Robert Cummings wrote:
   On Fri, 2007-09-28 at 12:05 -0400, tedd wrote:
  At 10:39 PM -0400 9/26/07, brian wrote:
  
  fuck you, too, asswipe
  
   Seems to be, an extra, comma, in the phrase. It reads, like Captain
   Kirk, saying, it.

 Funny. Reminds of a Capt. Kirk quote:
 No more blah, blah, blah!

 brian

-- 
Powered by openSUSE 10.2 (i586) Kernel: 2.6.18.8-0.5-default
KDE: 3.5.5 release 45.4
 10:55pm  up 10 days  2:22,  3 users,  load average: 0.13, 0.18, 0.17
---End Message---
---BeginMessage---

At 11:47 PM -0400 9/29/07, brian wrote:
You and i have had our run-ins on this list on more than one 
occasion. Until now, i've chosen to take your crap in stride.


brian

I haven't noticed any run-ins. I don't care if you've been the 
biggest prick on the net -- if you ask a question and it's within my 
scope to answer, I'll try to answer -- that's what this list is 
about. I seldom remember who said what, nor do I keep score -- I 
haven't got time for that.


As for taking crap, that's your perception for I don't dish any 
out. If you take offense to anything I say, then say so and I'll 
explain myself -- I'm not here to insult anyone. I haven't got time 
for that either.



 If you have nothing constructive to add then STFU.


If I do shut up, or not, will be my 

[PHP] 500 Internal Server Error

2007-09-30 Thread Francisco Frost
I'm getting an error with my PHP, I'm running Apache 2.2.6 and every time I 
try to access a PHP page on the Apache server, it says HTTP 500 Internal 
Server Error, can anyone help? 


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



Re: [PHP] 500 Internal Server Error

2007-09-30 Thread Per Jessen
Francisco Frost wrote:

 I'm getting an error with my PHP, I'm running Apache 2.2.6 and every
 time I try to access a PHP page on the Apache server, it says HTTP 500
 Internal Server Error, can anyone help?

Check your apache error logs.  My guess is that PHP is making apache
segfault.  


/Per Jessen, Zürich

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



Re: [PHP] 500 Internal Server Error

2007-09-30 Thread Francisco Frost
No, it's not, but I found out by enabling the show errors in php.ini that 
for about 80 items it's saying PHP Startup: Unable to load dynamic library 
'C:\Program Files\PHP\ext\ then the DLL's file name, then The specified 
module was not found but all the files are there.


Per Jessen [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

Francisco Frost wrote:


I'm getting an error with my PHP, I'm running Apache 2.2.6 and every
time I try to access a PHP page on the Apache server, it says HTTP 500
Internal Server Error, can anyone help?


Check your apache error logs.  My guess is that PHP is making apache
segfault.


/Per Jessen, Zürich 


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



Re: [PHP] 500 Internal Server Error

2007-09-30 Thread Jürgen Wind

somewhere I read that php on win doesn't like spaces in the path ... (IIRC)

Francisco Frost wrote:
 
 No, it's not, but I found out by enabling the show errors in php.ini that 
 for about 80 items it's saying PHP Startup: Unable to load dynamic
 library 
 'C:\Program Files\PHP\ext\ then the DLL's file name, then The specified 
 module was not found but all the files are there.
 
 Per Jessen [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 Francisco Frost wrote:

 I'm getting an error with my PHP, I'm running Apache 2.2.6 and every
 time I try to access a PHP page on the Apache server, it says HTTP 500
 Internal Server Error, can anyone help?

 Check your apache error logs.  My guess is that PHP is making apache
 segfault.


 /Per Jessen, Zürich 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/500-Internal-Server-Error-tf4542753.html#a12964906
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] counting with leading zeros

2007-09-30 Thread Robert Cummings
On Sat, 2007-09-29 at 23:47 -0400, brian wrote:

 It's not so much that i disrespect Rob. It's just that i felt i had to 
 call him out for being a dickhead by taking my statement out of context.

Ok, so I'm a dickhead. What does that make you? A vagina?

Name calling really is the lowest form of argumentation. It was fun when
I was 7. So were swear words.

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

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



Re: [PHP] counting with leading zeros

2007-09-30 Thread Jeffery Fernandez
gee you guys behave like kids. don't you all have other things to do than 
whinge, swear  and blame each other on the list? Take it elsewhere and sort 
it out. This is bad for the PHP community in general. It doesn't reflect what 
the community is about.

my 2c.

On Sunday 30 September 2007 13:47, brian wrote:
 tedd wrote:
  At 8:30 PM -0400 9/27/07, brian wrote:
  I wasn't bitching! And i *thought* that my numerous attempts at
  explaining such would have been enough. Obviously not, but wtf can you
  do with people who seem to want only to stir up shit?
 
  It sure sounded like you were bitching.

 Gee, thanks for pointing that out, Jeeves. I'd say it's pretty damned
 obvious now that Rob thought i was bitching about his response to my
 query. However, if you'd have bothered to note my replies since, you
 might have twigged to the fact that i'd been trying to set that
 straight. But you just *had* to send off your own dickish response.

  And, your off-list fuck you, too, asswipe to me certainly seems to
  support that -- don't you think?

 How so? Had it crossed your little mind that maybe--just maybe--i was
 becoming not a little frustrated with the fact that my reply had been
 taken the wrong way? That, instead of accepting that and moving on, this
 had become far too OT with bullshit comments such as yours? So, yeah,
 you might say that i'm bitching *now*.

 You and i have had our run-ins on this list on more than one occasion.
 Until now, i've chosen to take your crap in stride. If you have nothing
 constructive to add then STFU.

  Look, there's nothing you can say to me that hasn't been said before
  (some of it deserving), so my advice is for you to refrain from such
  conduct and at least try to look professional. That way you'll hide your
  ignorance a little longer -- it's always worked for me.

 This is me laughing. I'm sure you have no bloody idea how funny that
 statement looks from where i'm sitting. See the paragraph above.

  Dan Parry wrote:
  Can I please interject and say that I vastly respect Tedd(ddd) and
  Rob(bb?) and their opinions

 It's not so much that i disrespect Rob. It's just that i felt i had to
 call him out for being a dickhead by taking my statement out of context.

 Tedd ... not so very much at all.

 Robert Cummings wrote:
   On Fri, 2007-09-28 at 12:05 -0400, tedd wrote:
  At 10:39 PM -0400 9/26/07, brian wrote:
  
  fuck you, too, asswipe
  
   Seems to be, an extra, comma, in the phrase. It reads, like Captain
   Kirk, saying, it.

 Funny. Reminds of a Capt. Kirk quote:
 No more blah, blah, blah!

 brian

-- 
Powered by openSUSE 10.2 (i586) Kernel: 2.6.18.8-0.5-default
KDE: 3.5.5 release 45.4
 10:55pm  up 10 days  2:22,  3 users,  load average: 0.13, 0.18, 0.17

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



Re: [PHP] counting with leading zeros

2007-09-30 Thread tedd

At 11:47 PM -0400 9/29/07, brian wrote:
You and i have had our run-ins on this list on more than one 
occasion. Until now, i've chosen to take your crap in stride.


brian

I haven't noticed any run-ins. I don't care if you've been the 
biggest prick on the net -- if you ask a question and it's within my 
scope to answer, I'll try to answer -- that's what this list is 
about. I seldom remember who said what, nor do I keep score -- I 
haven't got time for that.


As for taking crap, that's your perception for I don't dish any 
out. If you take offense to anything I say, then say so and I'll 
explain myself -- I'm not here to insult anyone. I haven't got time 
for that either.



 If you have nothing constructive to add then STFU.


If I do shut up, or not, will be my decision and not your's. You seem 
to have an attitude that the net is yours and our time is here for 
you to use and abuse at your will. Clearly, you have some unrealized 
issues -- but, that's your problem to work out.


However, when I see someone try to help another and see that it's not 
appreciated, then I can make comment if I want because it IS 
constructive to point out civility on the net. Telling someone to 
fuck-off or calling someone a dick-head is certainly not constructive 
and degrades the professionalism of the list. That should be obvious.


If you want to be treated fairly, then treat others that way. Don't 
always assume that you're right and everyone else is wrong and thus 
you have liberty to call people names because that doesn't promote an 
exchange of information, which is what this list is about. It's 
clear, at least to me, that you have problems with that as well.


So, why don't we let this thread drop -- you called everyone names 
and used whatever language you thought appropriate and I hope you 
feel better now. Hopefully next time, we can all be more civil to 
each other.


Cheers,

tedd



Look, there's nothing you can say to me that hasn't been said 
before (some of it deserving), so my advice is for you to refrain 
from such conduct and at least try to look professional. That way 
you'll hide your ignorance a little longer -- it's always worked 
for me.


This is me laughing. I'm sure you have no bloody idea how funny that 
statement looks from where i'm sitting. See the paragraph above.



Dan Parry wrote:

Can I please interject and say that I vastly respect Tedd(ddd) and Rob(bb?)
and their opinions



It's not so much that i disrespect Rob. It's just that i felt i had 
to call him out for being a dickhead by taking my statement out of 
context.


Tedd ... not so very much at all.

Robert Cummings wrote:

 On Fri, 2007-09-28 at 12:05 -0400, tedd wrote:


At 10:39 PM -0400 9/26/07, brian wrote:


fuck you, too, asswipe


 Seems to be, an extra, comma, in the phrase. It reads, like Captain
 Kirk, saying, it.



Funny. Reminds of a Capt. Kirk quote:
No more blah, blah, blah!

brian

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



--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Classes and access to outside variables

2007-09-30 Thread Martin Alterisio
That's incorrectly syntactically. Won't run.



Ok, let's write some code to show how this can be done:

class SearchHelper extends AjaxACApplication {
  private $dbh;
  public function __construct() {
$this-dbh = $GLOBALS['dbh'];
  }
}



Better yet, pass the database host in the construction:

class SearchHelper extends AjaxACApplication {
  private $dbh;
  public function __construct($dbh) {
$this-dbh = $dbh;
  }
}

$searchHelper = new SearchHelper($dbh);



Even better, DON'T use globals:

class DatabaseConnectionInfo {
  private var $host;
  ...
  public function getHost() {
return $this-host();
  }
  ...
  private static $defaultConnectionInfo;
  public static function getDefault() {
if (self::$defaultConnectionInfo === null) {
...build default connection...
}
return self::$defaultConnectionInfo;
  }
}

class SearchHelper extends AjaxACApplication {
  private $dbh;
  public function __construct(DatabaseConnectionInfo $connectionInfo = null)
{
if ($connectionInfo === null) {
  $connectionInfo = DatabaseConnectionInfo::getDefault();
}
$this-dbh = $connectionInfo-getHost();
  }
}

Yes, I know what you're thinking, too much more code for just a stupid
thing. Trust me, refactoring it's easier when the code was written right the
first time.

2007/9/30, 潘志彬 [EMAIL PROTECTED]:

 $dbh = 'test';

 class search_helper extends AjaxACApplication
 {
 /**
  * Database connection details
  */

// announce global variable before use it
global $dbh;

 $db_hostname = $dbh;


...

 Regards,
 Ryu



 2007/9/29, Merlin [EMAIL PROTECTED]:
 
  Hi there,
 
  I am new to PHP classes and I do want to access a variable outside the
  class, but somehow that does not work. global also does not have any
  effect.
 
  In the following example I would like to be able to access $dbh from
  inside the class like I did in that example. This does not work. Can
  somebody please give me a hint on the right syntax?
 
  $dbh = 'test';
 
  class search_helper extends AjaxACApplication
  {
  /**
   * Database connection details
   */
 
  var $db_hostname = $dbh;
 
  Thank you for any help,
 
  Merlin
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



Re: [PHP] Session problem

2007-09-30 Thread Dušan Novaković
Does no one have some solution or suggestion?

Dušan


On 9/29/07, Dušan Novaković [EMAIL PROTECTED] wrote:
 Hm..

 I don't know that. I have also another application on the same server,
 and I haven't encountered problems of the same kind. I don't know
 whether these problems don't happend at all on this other application,
 or I just haven't come across one. :-(

 Dušan


 On 9/28/07, Jim Lucas [EMAIL PROTECTED] wrote:
  Dušan Novaković wrote:
   Hi,
  
   I have two problems with sessions.
  
   Firstly, even though session limit is set on default value on server,
   which is about 5 hours, if I don't take any action for about 15 mins I
   am thrown out and I have to log in again. Are there any addition
   functions which I can use in order to explicitly specify session
   lifetime?
  
   Secondly, after a certain period of time, while I am logged in, page
   just freezes and it indicates that it is trying to load. Page stays
   frozen all the time. At that moment, the only solution is to clear
   private data in the browser. After that, I am logged out and I can
   regulary log in and procede to work normally. It doesn't happend evry
   time I log in, but once in while.
  
   I have only used functions such as session_start()  and session_destroy.
  
   Thanks for your help,
   Dušan
  
   - -
   made by Dusan
 
  sounds like a problem with the hosting provider.
 
  Is this a single server that you have your web site on, or is it a farm of 
  servers?
 
  --
  Jim Lucas
 
  Some men are born to greatness, some achieve greatness,
  and some have greatness thrust upon them.
 
  Twelfth Night, Act II, Scene V
   by William Shakespeare
 
 


 --
 made by Dusan



-- 
made by Dusan


Re: [PHP] Session problem

2007-09-30 Thread Jim Lucas

Dušan Novaković wrote:

Does no one have some solution or suggestion?

Dušan


On 9/29/07, Dušan Novaković [EMAIL PROTECTED] wrote:

Hm..

I don't know that. I have also another application on the same server,
and I haven't encountered problems of the same kind. I don't know
whether these problems don't happend at all on this other application,
or I just haven't come across one. :-(

Dušan


On 9/28/07, Jim Lucas [EMAIL PROTECTED] wrote:

Dušan Novaković wrote:

Hi,

I have two problems with sessions.

Firstly, even though session limit is set on default value on server,
which is about 5 hours, if I don't take any action for about 15 mins I
am thrown out and I have to log in again. Are there any addition
functions which I can use in order to explicitly specify session
lifetime?

Secondly, after a certain period of time, while I am logged in, page
just freezes and it indicates that it is trying to load. Page stays
frozen all the time. At that moment, the only solution is to clear
private data in the browser. After that, I am logged out and I can
regulary log in and procede to work normally. It doesn't happend evry
time I log in, but once in while.

I have only used functions such as session_start()  and session_destroy.

Thanks for your help,
Dušan

- -
made by Dusan

sounds like a problem with the hosting provider.

Is this a single server that you have your web site on, or is it a farm of 
servers?

--
Jim Lucas

Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
 by William Shakespeare




--
made by Dusan






I would have the host then double check the config.  Make sure the 
location where the session files are being written to is writable by the 
php user.


Have them compare the two configs between the different sites.  See if 
anything besides the document root is different.


Or, upgrade to a dedicated host and run the web server your self.

--
Jim Lucas


Perseverance is not a long race;
it is many short races one after the other

Walter Elliot



Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.

Twelfth Night, Act II, Scene V
by William Shakespeare

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



[PHP] PHP and daylight savings

2007-09-30 Thread Bruce Cowin
I'm using PHP 5.1.2 on IIS.  Here in New Zealand, our daylight savings started 
a week earlier than usual and went into affect this past weekend.  The time on 
my machine is correct.  The timezone settings on my machine are correct.  But 
if I display the time on a PHP page, it is 1 hour behind.  Setting the timezone 
with date_default_timezone_set() doesn't make any difference.  If I display the 
time on an ASP page, it shows the correct time so it can't be an IIS problem I 
don't think.

Why would PHP be showing the time as if it hadn't changed?  Where is it getting 
the time from?  Here is the code I'm using:

date_default_timezone_set('Pacific/Auckland');
echo time is  . date(h:i:s);




Regards,

Bruce

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



Re: [PHP] PHP and daylight savings

2007-09-30 Thread Bruce Cowin
I discovered that we needed to update the php_timezonedb.dll.  This worked fine 
on our servers and time is now correct.  But in my dev environment on my 
machine, when I put the same dll in (with the same version of PHP), I get a CGI 
error when PHP tries to do anything.  Anyone know why?



Regards,

Bruce

 Bruce Cowin [EMAIL PROTECTED] 1/10/2007 11:02 a.m. 
I'm using PHP 5.1.2 on IIS.  Here in New Zealand, our daylight savings started 
a week earlier than usual and went into affect this past weekend.  The time on 
my machine is correct.  The timezone settings on my machine are correct.  But 
if I display the time on a PHP page, it is 1 hour behind.  Setting the timezone 
with date_default_timezone_set() doesn't make any difference.  If I display the 
time on an ASP page, it shows the correct time so it can't be an IIS problem I 
don't think.

Why would PHP be showing the time as if it hadn't changed?  Where is it getting 
the time from?  Here is the code I'm using:

date_default_timezone_set('Pacific/Auckland');
echo time is  . date(h:i:s);




Regards,

Bruce

--
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



Re: [PHP] PHP and daylight savings

2007-09-30 Thread Bruce Cowin
Yet another update!  I managed to get rid of the CGI error by turning off error 
logging to the syslog.  But now I get this message:

PHP Warning: PHP Startup: Unable to load dynamic library 
'c:\php\ext\php_timezonedb.dll' - Access is denied. in Unknown on line 0

As I say, this same dll works fine on a server running the same PHP version 
(5.1.2).  Any ideas?



Regards,

Bruce

 Bruce Cowin [EMAIL PROTECTED] 1/10/2007 12:13 p.m. 
I discovered that we needed to update the php_timezonedb.dll.  This worked fine 
on our servers and time is now correct.  But in my dev environment on my 
machine, when I put the same dll in (with the same version of PHP), I get a CGI 
error when PHP tries to do anything.  Anyone know why?



Regards,

Bruce

 Bruce Cowin [EMAIL PROTECTED] 1/10/2007 11:02 a.m. 
I'm using PHP 5.1.2 on IIS.  Here in New Zealand, our daylight savings started 
a week earlier than usual and went into affect this past weekend.  The time on 
my machine is correct.  The timezone settings on my machine are correct.  But 
if I display the time on a PHP page, it is 1 hour behind.  Setting the timezone 
with date_default_timezone_set() doesn't make any difference.  If I display the 
time on an ASP page, it shows the correct time so it can't be an IIS problem I 
don't think.

Why would PHP be showing the time as if it hadn't changed?  Where is it getting 
the time from?  Here is the code I'm using:

date_default_timezone_set('Pacific/Auckland');
echo time is  . date(h:i:s);




Regards,

Bruce

--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 500 Internal Server Error

2007-09-30 Thread Wolf

Either change your PHP installation to be C:\php

Or you need to learn how to write:
C:\progra~1\php


Wolf

Francisco Frost wrote:
No, it's not, but I found out by enabling the show errors in php.ini 
that for about 80 items it's saying PHP Startup: Unable to load dynamic 
library 'C:\Program Files\PHP\ext\ then the DLL's file name, then The 
specified module was not found but all the files are there.


Per Jessen [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

Francisco Frost wrote:


I'm getting an error with my PHP, I'm running Apache 2.2.6 and every
time I try to access a PHP page on the Apache server, it says HTTP 500
Internal Server Error, can anyone help?


Check your apache error logs.  My guess is that PHP is making apache
segfault.


/Per Jessen, Zürich 




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



Re: [PHP] PHP and daylight savings

2007-09-30 Thread Jeffery Fernandez
On Monday 01 October 2007 10:08, Bruce Cowin wrote:
 Yet another update!  I managed to get rid of the CGI error by turning off
 error logging to the syslog.  But now I get this message:

 PHP Warning: PHP Startup: Unable to load dynamic library
 'c:\php\ext\php_timezonedb.dll' - Access is denied. in Unknown on line 0

I don't know if this will make a difference.. have you checked the permissions 
of the file. I think you need to grant the extentions folder Full Control for 
IUSR_COMPUTERNAME


 As I say, this same dll works fine on a server running the same PHP version
 (5.1.2).  Any ideas?



 Regards,

 Bruce

  Bruce Cowin [EMAIL PROTECTED] 1/10/2007 12:13 p.m. 

 I discovered that we needed to update the php_timezonedb.dll.  This worked
 fine on our servers and time is now correct.  But in my dev environment on
 my machine, when I put the same dll in (with the same version of PHP), I
 get a CGI error when PHP tries to do anything.  Anyone know why?



 Regards,

 Bruce

  Bruce Cowin [EMAIL PROTECTED] 1/10/2007 11:02 a.m. 

 I'm using PHP 5.1.2 on IIS.  Here in New Zealand, our daylight savings
 started a week earlier than usual and went into affect this past weekend. 
 The time on my machine is correct.  The timezone settings on my machine are
 correct.  But if I display the time on a PHP page, it is 1 hour behind. 
 Setting the timezone with date_default_timezone_set() doesn't make any
 difference.  If I display the time on an ASP page, it shows the correct
 time so it can't be an IIS problem I don't think.

 Why would PHP be showing the time as if it hadn't changed?  Where is it
 getting the time from?  Here is the code I'm using:

   date_default_timezone_set('Pacific/Auckland');
   echo time is  . date(h:i:s);




 Regards,

 Bruce

 --
 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

-- 
Internet Vision Technologies
Level 1, 520 Dorset Road
Croydon
Victoria - 3136
Australia


pgp6eqX1VWSRW.pgp
Description: PGP signature


Re: [PHP] PHP and daylight savings

2007-09-30 Thread Bruce Cowin
That was it, thanks!  I compared the permissions on this dll to another dll 
extension that loads fine.  When I made it the same, it worked.  Thanks again!


Regards,

Bruce

 Jeffery Fernandez [EMAIL PROTECTED] 1/10/2007 1:23 p.m. 
On Monday 01 October 2007 10:08, Bruce Cowin wrote:
 Yet another update!  I managed to get rid of the CGI error by turning off
 error logging to the syslog.  But now I get this message:

 PHP Warning: PHP Startup: Unable to load dynamic library
 'c:\php\ext\php_timezonedb.dll' - Access is denied. in Unknown on line 0

I don't know if this will make a difference.. have you checked the permissions 
of the file. I think you need to grant the extentions folder Full Control for 
IUSR_COMPUTERNAME


 As I say, this same dll works fine on a server running the same PHP version
 (5.1.2).  Any ideas?



 Regards,

 Bruce

  Bruce Cowin [EMAIL PROTECTED] 1/10/2007 12:13 p.m. 

 I discovered that we needed to update the php_timezonedb.dll.  This worked
 fine on our servers and time is now correct.  But in my dev environment on
 my machine, when I put the same dll in (with the same version of PHP), I
 get a CGI error when PHP tries to do anything.  Anyone know why?



 Regards,

 Bruce

  Bruce Cowin [EMAIL PROTECTED] 1/10/2007 11:02 a.m. 

 I'm using PHP 5.1.2 on IIS.  Here in New Zealand, our daylight savings
 started a week earlier than usual and went into affect this past weekend. 
 The time on my machine is correct.  The timezone settings on my machine are
 correct.  But if I display the time on a PHP page, it is 1 hour behind. 
 Setting the timezone with date_default_timezone_set() doesn't make any
 difference.  If I display the time on an ASP page, it shows the correct
 time so it can't be an IIS problem I don't think.

 Why would PHP be showing the time as if it hadn't changed?  Where is it
 getting the time from?  Here is the code I'm using:

   date_default_timezone_set('Pacific/Auckland');
   echo time is  . date(h:i:s);




 Regards,

 Bruce

 --
 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 

-- 
Internet Vision Technologies
Level 1, 520 Dorset Road
Croydon
Victoria - 3136
Australia

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



Re: [PHP] SimpleXMLElement is not Simple

2007-09-30 Thread Jeffery Fernandez
On Friday 28 September 2007 11:21, Jeffery Fernandez wrote:
 On Friday 28 September 2007 11:09, Nathan Nobbe wrote:
  just curious, what database are you using?

 I am using MySQL Ver 14.12 Distrib 5.0.22


Any clues Nathan? 

I have done some further testing and found that if I copy the working code 
(standalone script) and put it amongst the application code, that doesn't 
work either. I am thinking its a locale or character encoding problem. Any 
thoughts ?


cheers,
Jeffery


 cheers,
 Jeffery

  -nathan
 
  On 9/27/07, Jeffery Fernandez [EMAIL PROTECTED] wrote:
   I am having nightmares with this bit off code.
  
   The following code work perfectly fine:
  
   $soap_request_string = XML
   ?xml version=1.0 encoding=UTF-8?
   env:Envelope xmlns:env=http://www.w3.org/2003/05/soap-envelope;
   xmlns:ns1=urn:Gateway_Proxy
   xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:enc=
   http://www.w3.org/2003/05/soap-encoding;
   env:Body
 ns1:make_proxy_payment env:encodingStyle=
   http://www.w3.org/2003/05/soap-encoding;
   payment_id61ecc268-1cd0-f468/payment_id
   payment_amount15495/payment_amount
  
  
   callback_query_stringamp;payment_id=61ecc268-1cd0-f468/callback_que
  ry _string transaction_noteOrder from Student Library Fees with
   Payment Id: 61ecc268-1cd0-f468/transaction_note
 /ns1:make_proxy_payment
   /env:Body
   /env:Envelope
   XML;
  
   $xml = new SimpleXMLElement($soap_request_string, NULL, false, '
   http://www.w3.org/2003/05/soap-envelope');
   print_r($xml);
   $ns = $xml-getNamespaces(true);
   //print_r($ns);
  
   foreach ($xml-children($ns['env']) as $body)
   {
   //printf(%sbr /, $body-getName());
  
   foreach ($body-children($ns['ns1']) as $function)
   {
   printf(function %s()br /, $function-getName());
  
   foreach ($function-children() as $parameters)
   {
   printf(%s = \%s\br /,
   $parameters-getName(), $parameters);
   }
   }
   }
  
  
   However when the XML string is coming from the database it does not
   work. The Field and table have a collation of utf8_unicode_ci
  
   $soap_request_string = trim(str_replace(array(\n), '',
   $record['SoapRequestEnvelope']));
   $xml = new SimpleXMLElement($soap_request_string, NULL, false, '
   http://www.w3.org/2003/05/soap-envelope');
   print_r($xml);
  
  
   The above code is supposed to print out the following (for me to
   proceed further):
  
   SimpleXMLElement Object
   (
   [Body] = SimpleXMLElement Object
   (
   )
   )
  
  
   but only returns:
   SimpleXMLElement Object
   (
   )
  
  
   The XL string from the database looks exactly like this (after
   replacing new lines):
  
   ?xml version=1.0 encoding=UTF-8?env:Envelope xmlns:env=
   http://www.w3.org/2003/05/soap-envelope; xmlns:ns1=urn:Gateway_Proxy
   xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=
   http://www.w3.org/2001/XMLSchema-instance; xmlns:enc=
   http://www.w3.org/2003/05/soap-encoding;env:Bodyns1:make_proxy_paym
  en t
   env:encodingStyle=http://www.w3.org/2003/05/soap-encoding;payment_id
  5
   ce30dcc-7df7-04e8/payment_idpayment_amount10/payment_amountcallb
  ack
   _query_stringamp;payment_id=5ce30dcc-7df7-04e8/callback_query_string
  t ransaction_noteOrder from Student Library Fees with Payment Id:
   5ce30dcc-7df7-04e8/transaction_note/ns1:make_proxy_payment/env:Bod
  y /env:Envelope
  
  
   I can't figure out whats wrong with the code. Any suggestions?
  
   cheers,
   Jeffery
   --
   Internet Vision Technologies
   Level 1, 520 Dorset Road
   Croydon
   Victoria - 3136
   Australia

-- 
Internet Vision Technologies
Level 1, 520 Dorset Road
Croydon
Victoria - 3136
Australia


pgpd4X4Xvas84.pgp
Description: PGP signature