[PHP] Fixing timezone issues
At some point recently, PHP/Apache running on FreeBSD decided that i'm on GMT, instead of EST5EDT. The system date is correct: bash-2.05a# date Tue Aug 13 14:39:37 EDT 2002 But phpinfo() shows me: _ENV["TZ"] GMT What's the best way to get PHP thinking I'm in eastern time again? Thanks, Wade -- If you have a VCR or MP3 player, you need to read these links: http://www.digitalconsumer.org/ http://digitalspeech.org/ http://www.libertyboard.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fixing timezone issues
On Tue, 13 Aug 2002, Rasmus Lerdorf wrote: > Fix your Apache startup environment so TZ is set correctly. I've got this in the apache startup script, but it's still on GMT: bash-2.05a# head /usr/local/etc/rc.d/apache.sh #!/bin/sh TZ="EST5EDT"; export TZ case "$1" in start) [ -x /usr/local/sbin/apachectl ] && /usr/local/sbin/apachectl startssl > /dev/null && echo -n ' apache' ;; stop) [ -r /var/run/httpd.pid ] && /usr/local/sbin/apachectl stop > /dev/null && echo -n ' apache' -- If you have a VCR or MP3 player, you need to read these links: http://www.digitalconsumer.org/ http://digitalspeech.org/ http://www.libertyboard.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Postgres pconnect
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a website where each new page access connects to a Postgres database to load information. Each DB connect uses a $dblink=pg_connect() to connect to the database. I'd like to avoid the overhead with opening a new connection with every page. So, can I change all of the pg_connect calls to pg_pconnect call and have the pages use persistent connections, or is there something more that needs to be done? - --Wade -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE6ZfSfX5y4ZKLK2pMRAkVBAKCznNSkCNX7CCZtnWSVKKMqmf7tSwCgiBez q4vzBEFouHJ2ZvaLXvJGvdo= =nNgn -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Splitting at word count
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm doing a page where the front page will show "news" stories. What I'd like is if the story is longer than X words/chars/etc, the index page will show the first X words, then a link for the full story. Does anyone have a good idea on how to split after a certain number of words? Thanks, Wade -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE6cIdgX5y4ZKLK2pMRAjOoAJ0RD43TCH7yVTLKhVjtsJ2mr/ZLMgCgmcz0 QHiQipt8ngHq7dnVdiQeHXY= =PwwQ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] phpinfo ?
That's incorrect, at least under PHP4. I've got the following file that does the phpinfo stuff perfectly: BEGIN FILE END FILE On Fri, 26 Jan 2001, John Guynn wrote: > Actually what you need is otherwise you're never > going to get anything on the screen. > > John Guynn > > This email brought to you by RFCs 821 and 1225. > > > -Original Message- > From: Robert Collins [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 26, 2001 3:30 PM > To: kaab kaoutar; [EMAIL PROTECTED] > Subject: RE: [PHP] phpinfo ? > > > looks like you forgot the semi-colon (;) at the end of phpinfo(); > > Robert W. Collins > [snip] > - Original Message - > From: "kaab kaoutar" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, January 26, 2001 10:23 AM > Subject: [PHP] phpinfo ? > > > > Hi there! > > > > I'm sure it's a stupid problem but the phpinfo does work while trying the > > following html code: > > > > PHP Test > > > > > > > > > > > > the result is a blank page! > [snip] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]