Php compilation for openssl

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
bundy
Forum Newbie
Posts: 15
Joined: Mon Jun 04, 2007 7:04 pm

Php compilation for openssl

Post by bundy »

Hi

In my php.ini file under the extension section, there are few lines I have uncommented. When I ran the php.exe, it gave me these errors.

PHP Warning: Module 'openssl' already loaded in Unknown on line 0
PHP Warning: Module 'sockets' already loaded in Unknown on line 0

Extension I have modified
extension=php_sockets.dll;
extension=php_openssl.dll;


Does that mean PHP already enabled the module before I uncommented the module?

I searched all the websites, they told me to compile php using --with-openssl[=dir] in order to have php support ssl. When I ran the command, Php doesn't seems to recognise the arguments passed into it and it list all the options available for php command.

How do i compile the openssl so I can use the google as my smtp server?

Do I have to do any changes in the Apache configue files?

Thank you

By the way, I am using php5.2.3, and Apache 2.2.4
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

first, comment these lines you uncommented
then run 'php -m' and look for a line with 'openssl' in it. If it's there - you have php compiled with openssl.
Same goes for sockets extension
bundy
Forum Newbie
Posts: 15
Joined: Mon Jun 04, 2007 7:04 pm

Post by bundy »

Weirdan wrote:first, comment these lines you uncommented
then run 'php -m' and look for a line with 'openssl' in it. If it's there - you have php compiled with openssl.
Same goes for sockets extension
Thanks for that little m. Yea it is in the lists. The problem now I am having is how I can make a swiftmailer to connect to smtp google server. When I ran my code, I've wrote, it gave me an error message saying

'Unable to find the socket transport "tls" - did you forget to enable it when you configured PHP?'

and I've changed to ssl socket, it gave the same error with ssl not tls.

I debug the code and it produce that error when it reached to the function call 'fsock'.

Is there anything I forgot to do .....
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Did you mean fsockopen ?
bundy
Forum Newbie
Posts: 15
Joined: Mon Jun 04, 2007 7:04 pm

Post by bundy »

Weirdan wrote:Did you mean fsockopen ?
:o Yes that is the one.... there was an if statement checking whether it successfully open the socket in the file SMTP.php under connection folder.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

moved to swiftmailer forum
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Not all compiled versions of the openssl extension support TLS. It depends upon which version of OpenSSL the extension was compiled against. Unfortunately, if you're using windows it's very unlikely you'll be compiling your own PHP installation from source. I'd suggest downloading a newer version of PHP. What version of PHP are you running now? :)
bundy
Forum Newbie
Posts: 15
Joined: Mon Jun 04, 2007 7:04 pm

Post by bundy »

d11wtq wrote:Not all compiled versions of the openssl extension support TLS. It depends upon which version of OpenSSL the extension was compiled against. Unfortunately, if you're using windows it's very unlikely you'll be compiling your own PHP installation from source. I'd suggest downloading a newer version of PHP. What version of PHP are you running now? :)
I am currently using PHP5.2.3 ... Do you think of any other way of getting it to work
Post Reply