I am trying to get a Gallery2 installation running on my (upgraded) FreeBSD 8.1 machine. It used to be FreeBSD 6.2 and Gallery2 used to work there. My problem hopefully is not very Gallery2-related though.

What I am experiencing right now (besides other things which are - so I hope - unrelated) is that Apache (2.2.15) somewhen (when I (try to) navigate in Gallery2) tries to load a module called pcre.so. It seems to be looking for this module in /usr/local/lib/php/20090626-debug. Now that path indeed does not exist (anymore?). There is no (i.e. should not be) any debug build of php on the machine.

Here is the log entry from /var/log/httpd-error.log:

Unknown(0) : Warning - PHP Startup: Unable to load dynamic library
        '/usr/local/lib/php/20090626-debug/pcre.so' - Cannot open
        "/usr/local/lib/php/20090626-debug/pcre.so"

I am wondering where that path comes from... There is the directory /usr/local/lib/php/20090626/ for example but there is no pcre.so in it either. Also the port devel/php5-pcre was removed (apparently because pcre is in lang/php5 now?).

I did build PHP in debug mode first (by mistake). But I have removed and reinstalled PHP (and all extensions) and even Apache in the meantime - still the same log entry keeps popping up.

There is a second type of log entry I cannot explain (from /var/log/httpd-error.log again):

<br />
<b>Warning</b>:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3
        and greater in <b>Unknown</b> on line <b>0</b><br />

But I cannot find anything referencing/using magic_quotes_gpc (e.g. it is not in /usr/local/etc/php.ini or more precise it is commented out there).

Can anybody provide a hint why Apache could be looking for a (deprecated) module in a deprecated/non existent path?

link|improve this question
feedback

3 Answers

Try removing prce, check if it works, if not, remove the php directories and then rebuild php 5:

$ sudo apt-get remove php5-pcre
$ rm -rf /usr/local/include/php /usr/local/lib/php /usr/local/etc/php
link|improve this answer
I do not have apt-get (on FreeBSD). But I still get the point, there is no php5-pcre thoug. And I have done that (more or less) already ("I have removed and reinstalled PHP (and all extensions)..."). It would probably be best if I tried to reinstall devel/pcre itself... Maybe that will help? – scherand Jul 23 '10 at 12:49
@scherand - Ah! Well it's my Ubuntu habit! ;) Sorry for that... Anyway, have you removed every single PHP directory? – BloodPhilia Jul 23 '10 at 14:10
Reinstalling devel/pcre itself won't help, the issue is with PHP's (former) pcre.so module, not with pcre's shared lib, which lives in /usr/local/lib/libpcre.so. – lapo Jul 23 '10 at 14:50
yes, I believe I removed everything?!? @lapo: I understand your case - but I tried nevertheless. And - surprise - the error seems to be gone. At least I did not get any of those log messages in /var/log/httpd-error.log for quite some time now... I cannot explain this though :( – scherand Jul 23 '10 at 19:33
feedback

Extension ports don't spam the main php.ini file but insteaf they modify /usr/local/etc/php/extensions.ini, you probably must delete it from there (but that's strange, as that file doesn't use full paths, only the filename; also, this should have been taken care of during de-install of the package, maybe better check with pkg_info|fgrep php if you still have it, and in that case pkg-delete it).

link|improve this answer
There is nothing about pcre in /usr/local/etc/php/extensions.ini. But I think I managed to get rid of the error by now (see Comment on @BloodPhilia's answer). Thanks anyway! – scherand Jul 23 '10 at 19:31
feedback
up vote 0 down vote accepted

Reinstalling devel/pcre seems to have solved the problem. See my comment to BloodPhilia's Answer.

I do not know why that worked.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.