APC (Alternate PHP Cache) Throwing Lots of PHP Notices
Asked Answered
I

4

6

I got APC 3.1.9 setup on my Linux box running PHP 5.3.6.

Caching works fine but I have noticed in our error logs, that APC throws a lot of PHP notices, such as:

[Wed Jun 29 01:08:56 2011] [error] [client ip] PHP Notice: require_once() [function.require-once]: apc_cache_find [16085954]\n in /path/to/file on line 75, referer: /path/to/referer/file

[Wed Jun 29 01:08:56 2011] [error] [client ip] PHP Notice: require_once() [function.require-once]: 1. h->opened_path=[/path/to/file] h->filename=[/path/to/file]\n in /path/to/file on line 84, referer: /path/to/referer/file

[Wed Jun 29 01:08:56 2011] [error] [client ip] PHP Notice: Unknown: apc_cache_find [16215361]\n in Unknown on line 0, referer: /path/to/referer/file

--> /path/to/file & /path/to/referer/file have been inserted by me replacing the original file names

Any idea why APC throws all these messages ?

Italianize answered 29/6, 2011 at 8:59 Comment(2)
figured it out, debugging was enabled. Re-installed APC and disabled debugging during installation...Italianize
Would you mind posting how you did that in an answer?Cosetta
K
14

The exact installation line when installing/reinstalling APC is this:

Enable internal debugging in APC [no] :no
Knout answered 27/1, 2012 at 11:14 Comment(2)
I should note that if you just hit <Enter> when going through the pre-build prompts in PECL, it appears to default to yes. That is, I hit <Enter> and it gave me the notices mentioned above on each page load. If you want to reinstall via PECL, btw, you have to do pecl uninstall apc first.Dwelling
How can I disable in my case?? I tried copying the dll to ext/ folder and modifying the ini file.Hellenistic
P
2

A bit late for Mike, but I found a solution (APC 3.1.9 / 3.1.13) :

You can also follow this :

https://bugs.php.net/bug.php?id=59445

Where it is said :

"If compiling is not an option, roll back to stable: pecl install -f APC-3.1.6"

It is indeed a regression, but it worked fine for me :)

Prediction answered 9/10, 2012 at 15:46 Comment(1)
I had the same problem & that has been resolved now.. Thanks BenjKelpie
P
2

Uninstall and reinstall apc, typing “no” to disable debugging:

pecl uninstall apc

pecl install apc
    Enable internal debugging in APC [no] : no

Restart apache: #service httpd restart or #/etc/init.d/apache restart

Petigny answered 6/9, 2013 at 9:38 Comment(0)
C
0

And also this problem's cause it can be php version. (So PHP version changes / mismatch. in particular, If the moved web site. You should check.)

Good luck!

Compagnie answered 19/7, 2015 at 9:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.