Click to See Complete Forum and Search --> : PHP compile with https, ftps, tls, ssl


phpnewby
08-29-2006, 08:14 PM
Hello,

I'm very new to this.
I was wondering how do go about compiling PHP so that I can have the secure PHP streams and Socket Transports as below:

Registered PHP Streams php, file, http, ftp, compress.zlib, https, ftps, zip
Registered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls

Right now, my compiled PHP only has the plain text ones:

Registered PHP Streams php, file, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp, unix, udg

Was compiled with these commmands:

./configure --prefix=/wwwroot/php --with-apxs22=/wwwroot/bin/apxs --with-config-file-path=/wwwroot/php --with-mysql --with-mysql-so
ck=/var/lib/mysql/mysql.sock --with-dbase --enable-ftp --enable-force-cgi-redire
ct --with-freetype-dir=/usr/lib --enable-gd-native-ttf --enable-ge-imgstrttf --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib --with-gd --with-sybas
e=/opt/sybase/OCS-12_5 --with-ldap --with-mhash --enable-magic-quotes --enable-i
map --with-xml --enable-iconv

MarkR
08-30-2006, 12:15 PM
I use --with-openssl and it does the trick.

Of course the openssl development environment will have to be somewhere that PHP can find it - this typically means you need the -dev package(s) installed.

Mark

phpnewby
08-30-2006, 05:16 PM
Thanks.
I checked that openssl-devel is installed already.
So I recompiled by adding --with-openssl at the end of the old commands and do make && make install, it goes through fine but after I restart apache,
and go to http://localhost/info.php,
info.php is :
<?php
phpinfo();
?>

it still doesn't show the secure PHP streams and Socket transport and actually looks exactly the same as before it was compiled without the --with-openssl.

so tried recompiling with --with-openssl-dir=/usr/lib and it errors out with:
configure: error: Cannot find OpenSSL's <evp.h>

I found out that evp.h is actually in /usr/local/openssl/evp.h so created a symbolic link to /usr/lib but still doesn't work.

Any suggestions?

MarkR
08-30-2006, 06:36 PM
You should not normally need to do --with-openssl-dir=/somewhere - it should find it - definitely if it's in the normal places in /usr or /usr/local

You should certainly not go symlinking include files in /usr/lib

When you do ./configure, does it confirm that it's found the openssl headers?

It certainly should.

Mark