cd /usr/ports/www/mod_php4 make install clean;
3、还需要安装php4-extensions
cd /usr/ports/lang/php4-extensions/ make install clean;
然後你就看到上面的錯誤了,所以自己去改一下程式把 -n 拿掉吧….
拿掉之後,安裝程式應該就可以正常運作了了:
On Tue, 2006-03-07 at 16:43 +0100, Olivier Mueller wrote: > $ pecl > Fatal error: Call to undefined function preg_match() > in /usr/local/share/pear/PEAR/Frontend/CLI.php on line 70 > > But the preg functions are installed and active. (pcre.so & co.) update: pecl can't work this way because at the end of /usr/local/bin/pecl, php is started with option "-n" : -n No php.ini file will be used ( exec $PHP -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 $INCDIR/peclcmd.php "$@" ). And with php5-5.1.2_1, the extensions are not compiled in the php binary, but defined in php.in... By remove this "-n", pecl is working fine... > Well, I'd still like to get my pecl pop3 running... An idea? The pecl part is ok, but the pop3 won't compile (yet): gcc -I. -I/usr/local/src/pop3-1.0.2 -DPHP_ATOM_INC -I/usr/local/src/pop3-1.0.2/include -I/usr/local/src/pop3-1.0.2/main -I/usr/local/src/pop3-1.0.2 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/pop3-1.0.2/pop3.c -fPIC -DPIC -o .libs/pop3.o /usr/local/src/pop3-1.0.2/pop3.c: In function `pop3_objects_new': /usr/local/src/pop3-1.0.2/pop3.c:175: error: structure has no member named `in_get' /usr/local/src/pop3-1.0.2/pop3.c:176: error: structure has no member named `in_set' *** Error code 1 work in progress... :) regards, Olivier描述及解决四:
Today’s crazy error of the day is:
Fatal error: Call to undefined function preg_match() …
Wahoo! A built in function being undefined!
So how’s this possible? It seems that if you reinstall PHP without compiling in PCRE (Perl Compatible Regular Expressions), you can get this crazy error. It’s a flag you may need to manually enable.
make deinstall rmconfig clean
make build
make install
make clean
apachectl graceful
Thanks for this post! I tried my best to get my FreeBSD server running after updating to PHP 5.2.10
I would just recommend adding the following step in to ensure you start from scratch:
make rmconfig - will remove your old user config settings.
So the steps will be:
cd /usr/ports/devel/php5-pcre
make deinstall rmconfig clean
make build
make install
make clean
apachectl graceful
Last line is a more graceful way of restarting Apache.
I was on freebsd 7.0 and also had just done a portupgrade of a bunch of packages so I had no idea where to start looking. rebuilding /devel/php5-pcre did the trick.
Thanks again for posting.
Much appreciate this post...been trying fix PCRE on my FreeBSD 7 box for about 3 hours now. Thanks for the info, got my phpMyAdmin and Gallery setup working again.
cd /usr/ports/devel/php5-pcre
make deinstall clean
make build
make install
/usr/local/etc/rc.d/apache22 restart