php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80741 garbage text "($implicit=uninitialized)" randomly appears within error message
Submitted: 2021-02-12 18:52 UTC Modified: 2021-05-23 04:22 UTC
From: php4fan at gmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 7.4.15 OS: linux
Private report: No CVE-ID: None
 [2021-02-12 18:52 UTC] php4fan at gmail dot com
Description:
------------
Errors logged to the error log file sometimes contain this garbage string:

   $implicit = *uninitialized*

inserted into the error messages at apparently random places.

For example, here a logged error:

   [Fri Feb 12 19:26:25.663189 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got error 'PHP message: PHP Warning:  Use of undefined constant THIS_SCRIPT - assumed 'THIS_SCRIPT' (this will throw an Error in a future version of PHP) in /XXXXX/web/htdocs/vbseo/includes/functions_vbseo_vb.php on line 1128PHP message: PHP Stack trace:PHP message: PHP   1. {main}() /XXXXX/web/htdocs/vbpvbseo.php:0PHP message: PHP   2. include() /XXXXX/web/htdocs/vbpvbseo.php:151PHP message: PHP   3. vbseo_get_forum_info($implicit = *uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041'

This is a legitimate error, and the backtrace looks correct, except for the nonsensical "$implicit = *uninitialized*" which certainly means something to the person who wrote it but not to anybody else.

In this case above I can still make sense of the error message and of the backtrace. However this other one:


[Fri Feb 12 19:26:25.663791 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got error '($implicit = *uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041'

The error is just that nonsensical thing followed by the file and line where the error supposedly happen, but it doesn't tell me what the error actually is (unless I know how to decypher "$implicit = *uninitialized*").

Line 1041 of that file is just a function call with no arguments:

    vbseo_get_forum_info();

so it makes no sense whatsoever that you get an error message right there, unless:

- the function does not exist: in which case you should get a sensible error message like "Call to undefined function"; or
- the error happens inside the function, in which case the error message would not point to that line where the function is called, but the line inside the function where the error happens.





Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-12 18:58 UTC] danack@php.net
What extensions do you have enabled?

Also, if you are using Suhosin, try disabling it.
 [2021-02-12 19:32 UTC] nikic@php.net
PHP does not generate this kind of error message, something else must be doing it (xdebug, custom error handler, etc).
 [2021-02-12 20:50 UTC] php4fan at gmail dot com
It turns out that the first error message actually makes sense.

The third item in the backtrace:

  3. vbseo_get_forum_info($implicit = *uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041

means that the function vbseo_get_forum_info(), whose signature is vbseo_get_forum_info($implicit=false) was called without any argument.


The reason I immediately dismissed that as nonsensical without looking at the signature of the function, is that I first saw the other error message:

  [Fri Feb 12 19:26:25.663791 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got error '($implicit = *uninitialized*) /XXXXX/web/htdocs/vbseo.php:1041'

and this one definitely does *not* make sense.

Now, I see what happened: the latter nonsensical error message is actually the result of a single error message being split and logged as if it was two consecutive error messages:

[Fri Feb 12 19:26:25.663275 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got error 'PHP message: PHP Warning:  Use of undefined constant THIS_SCRIPT - assumed 'THIS_SCRIPT' (this will throw an Error in a future version of PHP) in /XXXXX/htdocs/vbseo/includes/functions_vbseo_vb.php on line 1128PHP message: PHP Stack trace:PHP message: PHP   1. {main}() /XXXXX/htdocs/vbpvbseo.php:0PHP message: PHP   2. include() /XXXXX/htdocs/vbpvbseo.php:151PHP message: PHP   3. vbseo_get_forum_info'
[Fri Feb 12 19:26:25.663791 2021] [proxy_fcgi:error] [pid 32445] [client XX.XX.XX.XX:0] AH01071: Got error '($implicit = *uninitialized*) /XXXXX/htdocs/vbseo.php:1041'


You can see that it's actually one error message that is split in two parts.

There are many instances of this (legitimate) error in my log, most of them are correct, but a few here and there are split into two like that. So that is the real issue: error messages being randomly split into multiple (namely two) log entries per error.
 [2021-02-12 20:56 UTC] php4fan at gmail dot com
Configure Command	'./configure' '--prefix=/***/php-7.4' '--localstatedir=/var' '--enable-fpm' '--enable-xml' '--enable-pdo' '--enable-dba=shared' '--with-zip' '--enable-ftp=shared' '--enable-dom=shared' '--enable-intl=shared' '--enable-json=shared' '--enable-soap=shared' '--enable-exif=shared' '--enable-phar=shared' '--enable-posix=shared' '--enable-ctype=shared' '--enable-shmop=shared' '--enable-pcntl=shared' '--enable-libxml' '--enable-dtrace=shared' '--enable-bcmath=shared' '--enable-session=shared' '--enable-sockets=shared' '--enable-mbstring=shared' '--enable-calendar=shared' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--enable-gd-native-ttf' '--enable-gd-jis-conv' '--with-config-file-path=/***/php-7.4/etc/' '--with-config-file-scan-dir=/***/php-7.4/lib/php/extensions' '--with-pic' '--with-db4' '--with-mhash' '--with-qdbm=/usr' '--without-gdbm' '--with-bz2' '--with-pear' '--with-zlib' '--with-zlib-dir=/usr' '--with-pcre-regex' '--with-iconv=shared' '--with-tidy=shared' '--with-curl=shared' '--with-openssl=shared' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-pgsql=shared' '--with-sqlite3=/usr' '--with-unixODBC=shared,/usr' '--with-interbase=shared,/usr' '--with-mysqli=shared,mysqlnd' '--with-mysql-sock=/tmp/mysql.sock' '--with-pdo-dblib=shared' '--with-pdo-mysql=shared' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=/usr' '--with-pdo-firebird=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-xmlrpc=shared' '--with-xsl=shared,/usr' '--with-snmp=shared,/usr' '--enable-gd' '--with-gettext=shared,/usr' '--with-gmp=shared,/usr' '--with-enchant=shared' '--with-pspell=shared,/usr' '--with-readline=/usr' '--with-ldap=shared,/usr' '--with-ldap-sasl=/usr' '--enable-opcache' '--with-xmlrpc' '--with-fpm-acl' '--with-jpeg' '--with-freetype' '--with-xpm' '--with-webp'
Server API	FPM/FastCGI
Loaded Configuration File	/***/php-7.4/etc/php.ini
Scan this dir for additional .ini files	/***/php-7.4/lib/php/extensions
Additional .ini files parsed	/***/php-7.4/lib/php/extensions/00-ctype.ini, /***/php-7.4/lib/php/extensions/00-curl.ini, /***/php-7.4/lib/php/extensions/00-dom.ini, /***/php-7.4/lib/php/extensions/00-exif.ini, /***/php-7.4/lib/php/extensions/00-ftp.ini, /***/php-7.4/lib/php/extensions/00-iconv.ini, /***/php-7.4/lib/php/extensions/00-intl.ini, /***/php-7.4/lib/php/extensions/00-json.ini, /***/php-7.4/lib/php/extensions/00-ldap.ini, /***/php-7.4/lib/php/extensions/00-mbstring.ini, /***/php-7.4/lib/php/extensions/00-mysqli.ini, /***/php-7.4/lib/php/extensions/00-opcache.ini, /***/php-7.4/lib/php/extensions/00-openssl.ini, /***/php-7.4/lib/php/extensions/00-pdo-mysql.ini, /***/php-7.4/lib/php/extensions/00-phar.ini, /***/php-7.4/lib/php/extensions/00-posix.ini, /***/php-7.4/lib/php/extensions/00-session.ini, /***/php-7.4/lib/php/extensions/00-soap.ini, /***/php-7.4/lib/php/extensions/00-xmlreader.ini, /***/php-7.4/lib/php/extensions/00-xmlwriter.ini, /***/php-7.4/lib/php/extensions/10-igbinary.ini, /***/php-7.4/lib/php/extensions/10-memcache.ini, /***/php-7.4/lib/php/extensions/10-memcached.ini, /***/php-7.4/lib/php/extensions/10-msgpack.ini, /***/php-7.4/lib/php/extensions/10-newrelic.ini, /***/php-7.4/lib/php/extensions/10-xdebug.ini

This should tell you what extensions are installed.

There's no occurrence of "suhosin" in the whole output of phpinfo() so I'm guessing it's not installed or enabled.
 [2021-05-12 06:11 UTC] krakjoe@php.net
-Status: Open +Status: Feedback
 [2021-05-12 06:11 UTC] krakjoe@php.net
Please remove newrelic and try to reproduce.
 [2021-05-23 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 09:01:27 2024 UTC