/    Sign up×
Community /Pin to ProfileBookmark

How can I eliminate non fatal PHP warnings from my error log file?

This is in regard to a shared web hosting plan, so I only have limited control over the server beyond editing my PHP.INI file, and selecting a PHP version. Long ago I edited my PHP.INI file to direct all errors to a single log file, which I can download and examine as needed. Most errors or warnings come with a time stamp, a description of the problem, a line number in the PHP file, and the name of the offending file, so its very helpful. But lately I’ve been getting occasion warnings like the below, about one every day or so.

[06-Jun-2023 21:39:13 America/New_York] PHP Warning: Cannot load
module 'memcached' because required module 'igbinary' is not loaded in
Unknown on line 0

I’ve seen multiple people complain about this exact warning on “stackoverflow” with no definitive answer. The warning makes little sense because I don’t have any php file called “unknown”, am not using any module called “memcached”, and bottom line none of my PHP scripts are misbehaving. It may be some hacker trying to bang on one of my PHP modules trying to do something I’m not allowing. But anyway, the warnings are definitely not affecting any of my PHP scripts (I’ve tested them fully). So is there anything I can change in my PHP.INI file to suppress them? my error_reporting line in my PHP.INI is currently set as follows…

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

Should I add “& ~E_CORE_WARNING” or possibly “~E_WARNING” ? I guess I could experiment, but I’d hate to accidentally suppress a warning actually caused by something in one of my scripts. Thanks for any help.

to post a comment
HTMLJavaScriptPHP

0Be the first to comment 😎

×

Success!

Help @PeterPan_321 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...