Bug #61503 [Opn->Fbk]: Call to dirname() produces: PHP Fatal error: Call to undefined function (null)
Edit report at https://bugs.php.net/bug.php?id=61503&edit=1
ID: 61503
Updated by: rasmus@php.net
Reported by: rodush at gmail dot com
Summary: Call to dirname() produces: PHP Fatal error: Call
to undefined function (null)
-Status: Open
+Status: Feedback
Type: Bug
Package: Directory function related
Operating System: Debian 6.0; Linux 3.0.0-2-686pae
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
Looks like there is something else at play here that you haven't told us about.
dirname() obviously works fine in 5.4. Try it from the command line:
php -r 'echo dirname(__FILE__);'
Of course, you should just use __DIR__ to do that, but my guess is that you have
some other low-level extension like an apc ot xcache that you haven't upgraded to
work with 5.4 that is causing this weird symbol table corruption.
Previous Comments:
------------------------------------------------------------------------
[2012-03-25 11:15:31] rodush at gmail dot com
Description:
------------
After upgrading to php5.4 on my Debian (configured to "testing" sources for apt)
none of my local website works.
After upgrade I used option "maintainer's version of php.ini" for all php.ini files
(apache, fpm, cli).
Version of Apache: 2.2.22
Here what I see in one of my error log files (Apaches's):
[Sun Mar 25 13:32:54 2012] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function
(null)() in /home/web/ccc/frontend/index.php on line 4
Actually, this is regular Yii fremework's frontpage. Nothing was changed and worked perfect
before upgrade.
Test script:
---------------
1<?php
2
3 // change the following paths if necessary
4 $yii=dirname(__FILE__).'/../framework/yii.php';
5 $config=dirname(__FILE__).'/protected/config/main.php';
6
7 // remove the following lines when in production mode
8 defined('YII_DEBUG') or define('YII_DEBUG',true);
9 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
Expected result:
----------------
dirname() must be called without error producing and should return full path to the current file.
Actual result:
--------------
PHP Fatal error: Call to undefined function (null)() in /home/web/ccc/frontend/index.php on line 4
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61503&edit=1
Thread (4 messages)