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

From: Date: Fri, 16 Jan 2015 21:11:53 +0000
Subject: Bug #68841 [Fbk->Opn]: 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-189997@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
 User updated by:    nick4 at nickniquette dot com
 Reported by:        nick4 at nickniquette dot com
 Summary:            date_default_timezone_set(), call to undefined
                     fuction when called from html.
-Status:             Feedback
+Status:             Open
 Type:               Bug
 Package:            Date/time related
 Operating System:   linux
 PHP Version:        5.4.36
 Block user comment: N
 Private report:     N

 New Comment:

- 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


Previous Comments:
------------------------------------------------------------------------
[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 (#189997) next »