How to install php-mysql in pfsense?
-
HI, I am trying to install php-mysql package in pfSense-LiveCD-2.0.3-RELEASE-i386-20130412-1022 on vmware workstation 8 by referring to this post of sash99 http://forum.pfsense.org/index.php/topic,47150.0.html
When I run this command
pkg_info -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/php52-mysql-5.2.13_3.tbz
I get this:
Depends on:
Dependency: pkg-config-0.23_1
Dependency: mysql-client-5.1.48
Dependency: libiconv-1.13.1_1
Dependency: libxml2-2.7.7
Dependency: php52-5.2.13_3If I then try to install only the last package in the list (php52-5.2.13_3) - according to the post - by running
pkg_add -rfi http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/All/php52-5.2.13_3.tbz
I get this error in the prompt:
Fatal error: Call to undefined function preg_match() in /etc/inc/interfaces.inc on line 3584
and I am no longer able to access pfsense webconfigurator page
and there is no dependency error when I run this
/etc/rc.php_ini_setup
What am I doing wrong here?
It is totally a fresh install of pfsense and I have added no extra package.
-
Probably because pfSense 2.0.3 is running PHP 5.2.17_13 so you have down graded it.
You realise that this sort of thing is totally unsupported? ;)
Steve
-
Probably because pfSense 2.0.3 is running PHP 5.2.17_13 so you have down graded it.
Thanks for pointing this. However, this new version does not seem to be available in freebsd archives. Can you point me where it is available?
You realise that this sort of thing is totally unsupported? ;)
Yes, I am aware of this. I am just playing with this.
Thanks.
-
It's in the most recent FreeBSD 8 branch.
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/php52-mysql-5.2.17_13.tbzI have no idea whether you can just use that though. It may have been back ported by the dev team.
Steve
-
Ok. I also am not sure whether this newer version can be used. Is it possible to down grade php version used by newer version of pfsense? I mean I could have used earlier version of pfsense itself but it seems to have issues acquiring dns in pppoe type connection. Is there any way I could do it?
-
You can work around the dns problems in 2.0.2 by just entering them manually or use 2.0.1 which didn't have those problems. I'm not sure how far back you have to go to get 5.2.13_3.
Alternatively start off with 2.1 which is based on FreeBSD 8.3 already so mcuh more likely to accept those newer modules. Though I have no real idea if it would work. :-\Steve
-
Is there a 2.1 version of pfsense? I thought 2.0.3 was the latest version. 2.1 is not on the download list. Where is it? I can just give it a go. If it works then it is good otherwise I will try using 2.0.1. By the way, how is 2.0.3 better than 2.0.1? Does 2.0.3 have any enhancement/extra features over 2.0.1?
-
2.1 is in beta right now, 2.0.3 is the most recent stable release.
http://snapshots.pfsense.org/2.0.1-2-3 were mostly bug/security updates.
Steve
-
I don't know if you still need an answer but I managed to install the packages. I actually did it according to same person's another post: http://forum.pfsense.org/index.php/topic,47086.0.htmlhttp://forum.pfsense.org/index.php/topic,47086.0.html
But I changed all of the packages according to stephew10's post (I picked all of them from 8.4 release). This are the packages I've installed (by the way I'm using pfSense 2.0.3 too) :
(Install all of the packages in this order.)
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/php52-gd-5.2.17_13.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/t1lib-5.1.2_2%2c1.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libX11-1.4.4%2c1.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXpm-3.5.9.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libxcb-1.7.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXau-1.0.6.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXdmcp-1.1.0.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libpthread-stubs-0.3_3.tbz
pkg_add -r http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/mysql-server-5.1.68.tbz
pkg_add -r http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/mcrypt-2.6.8_1.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/php52-mcrypt-5.2.17_13.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libltdl-2.4.2.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/php52-gd-5.2.17_13.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/t1lib-5.1.2_2%2c1.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libX11-1.4.4%2c1.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXpm-3.5.9.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libxcb-1.7.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXau-1.0.6.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libXdmcp-1.1.0.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/libpthread-stubs-0.3_3.tbz
pkg_add -r http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/mysql-server-5.1.68.tbz
pkg_add -r http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/mcrypt-2.6.8_1.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/php52-mcrypt-5.2.17_13.tbz
pkg_add -rfi http://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.4-release/All/jpeg-8_4.tbz
(After installing these packages continue from the post above because the touch commands and everything else is the same)I've added the last pakage myself because ' /etc/rc.php_ini_setup ' said that it was missing.
And also I have came across the exactly same ERROR as you. It was because I tried to use ' /etc/rc.php_ini_setup ' command from the webGUI's command prompt. Don't do it :P It really breaks the pfSense. You can use the webGUI's command prompt for pkg_add and touch commands but when it comes to '/etc/rc.php_ini_setup' use the shell !