November 24th, 2005, 09:24 AM
How enable-sockets on php 4.4.0 under FreeBSD 6.0
How can I enable-sockets on php 4.4.0 with Apache/1.3.33 I installed on FreeBSD 6.0 ?
How recompile php4.4.0 with enable socket support? I use ftp installation via sysinstall. Could somebody explain me with details. I am new in FreeBSD/Unix.
I found php.ini-distr under user/local/etc but can't understand how should I edit it in order to enable socket support.
Here is my configure output from phpinfo():
./configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-regex=php' '--with-apxs=/usr/local/sbin/apxs' '--prefix=/usr/local' 'i386-portbld-freebsd6.0'
It is strange for me that default php 4.4.0 installation does not support sockets and socket function like socket_create(AF_INET, SOCK_STREAM, SOL_TCP)
Thanks in advance,
November 26th, 2005, 01:55 PM
Strange? It would be a huge security problem otherwise. Supporting sockets allows you to surf anonymously, spam mail servers, waste bandwidth, and such.
Originally Posted by Roman2005
But the real reason probably is that PHP extensions have got their own port... /usr/ports/lang/php4-extensions. Did you install it? If yes, you probably have to activate the module in /usr/local/php/extensions.ini.
Note: I have only used FreeBSD 4 and 5, but I don't think the ports system is any different with FreeBSD 6.
Comments on this post