CodeIgniter Forums
Problems with CI and the PHP APC extension - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Problems with CI and the PHP APC extension (/thread-11694.html)



Problems with CI and the PHP APC extension - El Forum - 09-19-2008

[eluser]tomgkelly[/eluser]
I have recently been trying to implement a file upload progress app using PHP and AJAX. I got a simple app working outside of CI which required activating the APC extension in PHP. After tweaking things to get it working the way I wanted , I decided to integrate it into a CI app that was waiting for this functionality.

Before attempting the integration, I decided to run my CI app to make sure was still working OK. To my surprise, I got a bunch of 'Constant already defined' errors pointing to the 'config/constants.php' file and these errors were followed by the fatal error 'Class 'Controller' not found in .......'. I then checked several other CI apps and they all had the same errors.

I then went back to my php.ini file and disabled the APC extension, ran my CI apps and they all ran OK. I've enabled and disabled APC several times to confirm that it was the cause of the problem.

I'm running the XAMMPLITE 1.6.6a suite on a Windows machine with the following versions:
Apache 2.2.x
PHP 5.2.5
MySQL ???

I sure would like to resolve this problem ... does anyone have any ideas. I haven't checked this out on my Linux box yet, so I'm not sure whether it's platform specific or not.

Thanks in advance,
Tom Kelly


Problems with CI and the PHP APC extension - El Forum - 09-19-2008

[eluser]Pascal Kriete[/eluser]
I have APC enabled on my development box (PHP 5.2.6, lighttpd 1.4) and CI works fine.

Do you have any APC calls in the app right now? (apc_store, apc_fetch, etc.)
Have you tried with just a base CI install?

[Edit: reading fail - you said you tried several others. I'm at a loss, it might be xammp]


Problems with CI and the PHP APC extension - El Forum - 09-20-2008

[eluser]tomgkelly[/eluser]
I have no APC calls at all in my CI apps. APC is definitely the direct or indirect cause of the problem. CI doesn't even get out of the chute with APC enabled.
I'm somewhat new (and enamored with) CI. I was hoping someone more adept with CI would recognize the scenario ...:

warnings that all the constants defined in constants.php have already been defined and then a fatal error that the 'controller class' is undefined.

Thanks for your input though,

Tom Kelly