Bug #68841 [Opn->Fbk]: date_default_timezone_set(), call to undefined fuction when called from html.

From: Date: Fri, 16 Jan 2015 21:20:09 +0000
Subject: Bug #68841 [Opn->Fbk]: date_default_timezone_set(), call to undefined fuction when called from html.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189998@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68841&edit=1

 ID:                 68841
 Updated by:         requinix@php.net
 Reported by:        nick4 at nickniquette dot com
 Summary:            date_default_timezone_set(), call to undefined
                     fuction when called from html.
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Date/time related
 Operating System:   linux
 PHP Version:        5.4.36
 Block user comment: N
 Private report:     N

 New Comment:

Not which operating system *you* are using. Which OS *PHP* is running on. It's some version of
Linux, not Windows, and I'd like to know exactly which.

As for "Configuration > date", I mean to look at the Configuration heading, then below
that are various blocks of configuration information. Each one has its own heading, like
"bc" or "curl". What do you see for the block whose heading is "date"?

And you say you're using PHP 5.4.36. Are you sure? It's definitely not 5.3?

Oh. And you should contact your host too for support.


Previous Comments:
------------------------------------------------------------------------
[2015-01-16 21:11:52] nick4 at nickniquette dot com

- Which Linux?
 host apache 2.2.24, my os is windows 7 64bit

- What does phpinfo() show for the Configure Command?
'./configure' '--prefix=/usr/local/php53' '--mandir=/usr/man'
'--with-config-file-path=/usr/local/php53/lib'
'--with-config-file-scan-dir=/usr/local/php53/etc'
'--with-pear=/usr/local/php53/pear' '--with-iconv'
'--enable-magic-quotes' '--disable-ipv6'
'--with-openssl=/usr/local/openssl-1.0.1g' '--with-zlib'
'--enable-bcmath' '--with-bz2' '--enable-calendar'
'--with-curl' '--with-db4' '--with-dbm' '--with-enchant'
'--with-curlwrappers' '--enable-exif' '--enable-ftp'
'--with-kerberos' '--enable-intl' '--with-pcre-regex'
'--with-libdir=lib64' '--with-gd' '--with-pspell'
'--with-libedit' '--with-readline' '--with-jpeg-dir'
'--with-png-dir' '--with-zlib-dir' '--with-xpm-dir'
'--with-freetype-dir' '--with-t1lib' '--enable-gd-native-ttf'
'--with-gettext' '--with-imap' '--with-imap-ssl'
'--with-ldap' '--with-ldap-sasl' '--enable-mbstring'
'--with-mcrypt' '--with-mhash' '--with-mysql=/usr'
'--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-icu-dir=/usr'
'--with-mysqli' '--enable-p!
 cntl' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pgsql'
'--enable-shmop' '--with-snmp=shared' '--enable-ucd-snmp-hack'
'--enable-soap' '--with-tidy' '--enable-sockets'
'--enable-sqlite-utf8' '--enable-wddx' '--with-xmlrpc'
'--with-xsl=/usr/local/libxslt' '--with-libxml-dir=/usr/local/libxml2'
'--enable-zip' '--enable-zend-multibyte' 

- What does phpinfo() show for Configuration > date? 
aug 15,2014 11:06:57

- Do you have any zend_extensions installed? Which? Does it work if they're all disabled?
220090626, per phpinfo().  Not very familiar with zend extensions.  I'd have to ask my host for
more info or possibly disabling.

- Did you specifically check if other date/time functions work, like date() and
date_default_timezone_get()?
These functions work.

Thanks for your support.
Nick

------------------------------------------------------------------------
[2015-01-16 00:47:50] requinix@php.net

Questions:
- Which Linux?
- What does phpinfo() show for the Configure Command?
- What does phpinfo() show for Configuration > date?
- Do you have any zend_extensions installed? Which? Does it work if they're all disabled?
- Did you specifically check if other date/time functions work, like date() and
date_default_timezone_get()?

------------------------------------------------------------------------
[2015-01-16 00:22:35] nick4 at nickniquette dot com

Description:
------------
---
From manual page: http://www.php.net/function.date-default-timezone-set
---
Fatal error: Call to undefined function: date_default_timezone_set() When called from html, causes
error.  Works fine with php extensions but not with html.  the only function I've found not
working in html.

.htaccess modified to include
AddType application/x-httpd-php5 .php .htm .html

Test Script is called test.html

Test script:
---------------
<?php
date_default_timezone_set('America/New_York');
?>



Expected result:
----------------
Expect no error.

Actual result:
--------------
Fatal error: Call to undefined function: date_default_timezone_set() in
/home/something/public_html/test.html on line 2


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68841&edit=1


Thread (7 messages)

« previous php.bugs (#189998) next »