2

I'm writing a custom extension in PHP and am loading the extension in the php.ini file. The extension loads and runs fine when using the command-line interface, but it doesn't load in the web server (Cherokee with FastCGI). To head off some questions before they're asked, I am definitely using the proper php.ini file(s) and I've set the value of extension_dir correctly. Even when I specify the full path to load the extension, it doesn't work.

So I'm wondering what I can do to troubleshoot this problem. I suspect it may be due to an external dependency because the extension was loading fine before I linked it to a couple shared libraries. However, I don't see any indication of a problem in /var/log/cherokee/cherokee.error. Any other ideas as to how I can determine the problem?

okalex
  • 788
  • 5
  • 12
  • Try moving or renaming one of the .so files for one of the other extensions. Do you see an error then? If not, something is going wrong with the error logging. Also, which version of PHP are you using? You may wish to consider upgrading to 5.3.3, which includes the nifty "FPM" FastCGI implementation. In regards to the shared libraries, have you made sure that they are in a findable location? I think the environment variable in question is `LD_LIBRARY_PATH` or something... – Charles Aug 11 '10 at 16:59
  • You mean there's no error in the log saying the extension could not be loaded? – Artefacto Aug 11 '10 at 17:11
  • 1
    There were no errors, but I realized that this was because error_log was not set in php.ini. Having set that to syslog, I now see that the extension is not loading because it is 32-bits, whereas PHP and Cherokee are 64-bits. I'm in the process of rebuilding these to be 32-bits. Thanks for the help. – okalex Aug 11 '10 at 17:29

1 Answers1

0

Okay, I've got it working after rebuilding PHP and Cherokee to be 32-bits (and fixing a bug that arose after switching to 32-bits). Thanks again.

okalex
  • 788
  • 5
  • 12