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

From: Date: Fri, 16 Jan 2015 00:47:51 +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-189981@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:            HTTP related
+Package:            Date/time related
 Operating System:   linux
 PHP Version:        5.4.36
 Block user comment: N
 Private report:     N

 New Comment:

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()?


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