1

No luck finding a reference to my issue so....

I've installed APC 3.1.9 on my CENTOS 5.8 x86_64 server with WHM 11.32.5, Apache 2.2, PHP 5.3.18.

It appears to be working. With the apc.enable_cli option on the following code works as expected:

$bar = 'BAR';
apc_store('foo', $bar);
var_dump(apc_fetch('foo'));

Output is: string(3) "BAR"

APC was compiled from source and installed as a PHP extension. To eliminate any possible configuration issues I have the bare minimum configuration set in my php.ini file:

[apc]
extension="apc.so"
apc.enabled=1
apc.enable_cli=1

(Note that enable_cli has no effect on my issue either way, 0 or 1)

The problem I am having is after copying the apc.php file from the APC source folder to the root of my web folders and opening apc.php in a browser the server is throwing a 500 error. The really odd thing though is that if I run apc.php from the command line php apc.php I'm seeing the expected result (HTML with cache information, though because it's on the CLI it's very minimal cache info.)

Hopefully that's enough info to help get this sucker resolved!

[edit]

The above test code does not work in browser. It also throws a 500 error.

Apache error log shows:

[Sat Oct 27 08:12:14 2012] [error] [client 174.51.36.143] SoftException in Application.cpp:357: UID of script "/home/eduki/public_html/apc.php" is smaller than min_uid
EdukiDave
  • 11
  • 2
  • 1
    Check the web server's (error) log file. – Peter Kiss Oct 27 '12 at 14:07
  • Did you restart Apache after installing APC? Does `phpinfo()` from the browser say APC is installed? – DCoder Oct 27 '12 at 14:08
  • Why you don`t use yum? sudo yum install php-pecl-apc – AlexeyKa Oct 27 '12 at 14:08
  • Yum did not work because of the WHM, at least that's my best guess. Compiling and manually adding apc.so works but apc.php throws 500. apache error_log shows: [Sat Oct 27 08:12:14 2012] [error] [client 174.51.36.143] SoftException in Application.cpp:357: UID of script "/home/eduki/public_html/apc.php" is smaller than min_uid – EdukiDave Oct 27 '12 at 14:15
  • Okay, so sorry for the noob question here, but I want to give Peter Kiss credit for leading me to the answer but can't figure out how to mark my question as answered and by whom! – EdukiDave Oct 27 '12 at 14:26
  • That error is kind of self-explanatory, isn't it? The script `apc.php` is owned by someone with a low UID (I'm guessing `root`) and your Apache PHP setup includes suPHP, which is configured to not execute scripts owned by low UIDs. See [this question](http://stackoverflow.com/q/9711085/1233508) and [suPHP configuration](http://www.suphp.org/DocumentationView.html?file=CONFIG). – DCoder Oct 27 '12 at 14:27
  • 1
    @EdukiDave You can't. What you can do is adding your own answer, detailing how you solved your problem, and accept it. All the things above are just comments, not answers. – greg0ire Oct 27 '12 at 14:28
  • Yep, thanks Dcoder and Peter Kiss for putting me on the right path. – EdukiDave Oct 27 '12 at 14:34

0 Answers0