WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Problem with php5. Couldn't add sockets extension.  (Read 3746 times)

Offline roman.styler

  • Newbie
  • *
  • Posts: 12
Problem with php5. Couldn't add sockets extension.
« on: October 04, 2010, 03:00:04 AM »
Hey guys!
I have a problem. I want to use php5 extension. But I need to have possibility to use sockets extension.
At /usr/local/lib/php.ini I saw string below:
extension=php_sockets.dll

I think it's mistake, because linux uses *.so libs. And finally I didn't find php_sockets.so at folder:
/usr/local/lib/php/extensions/no-debug-non-zts-20090626/

Please help me. How can I add possibility to use sockets in php5. Thanks.

Offline gutmensch

  • Administrator
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: Problem with php5. Couldn't add sockets extension.
« Reply #1 on: October 04, 2010, 07:40:25 AM »
if php5.tcz was compiled with --enable-sockets, then it should work right out of the box without any "extension=sockets.so" command. phpinfo() should tell you the configure command. apache2-mod-php5 is compiled with builtin sockets, atm I'm "exporting" some of those.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline roman.styler

  • Newbie
  • *
  • Posts: 12
Re: Problem with php5. Couldn't add sockets extension.
« Reply #2 on: October 04, 2010, 08:38:40 AM »
As I found out, php wasn't complied with --enable-sockets. Because at output of phpinfo(); I didn't find any information about sockets. And If I try to use functions for create sockets I get errors. Php interpreter tells me that this function doesn't exist.
If it's true, I will have big problems because I don't how to compile application for linux.

>> apache2-mod-php5 is compiled with builtin sockets, atm I'm "exporting" some of those.
What do you mean. Can you tell mo about this?

Offline gutmensch

  • Administrator
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: Problem with php5. Couldn't add sockets extension.
« Reply #3 on: October 04, 2010, 08:52:38 AM »
if you use apache2 and apache2-mod-php5 you should be able to use sockets. if you run cli php scripts of course that is not helping ;-)

anyway you could contact the php5.tcz maintainer and kindly ask for resubmission with enabled sockets.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline roman.styler

  • Newbie
  • *
  • Posts: 12
Re: Problem with php5. Couldn't add sockets extension.
« Reply #4 on: October 04, 2010, 09:36:38 AM »
Thank you for help! Now I understand situation. Unfortunately, creator of php5.tcz is php.net. So it'll be hard to get version of php with socket support.
I think, I should read information about compiling software for tinycore (

Offline gutmensch

  • Administrator
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: Problem with php5. Couldn't add sockets extension.
« Reply #5 on: October 04, 2010, 10:06:43 AM »
You're welcome! The maintainer of php5.tcz is robc, you can contact him right here in this forum ;-)
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline roman.styler

  • Newbie
  • *
  • Posts: 12
Re: Problem with php5. Couldn't add sockets extension.
« Reply #6 on: October 04, 2010, 10:10:56 AM »
Thanks a lot! Cool. I will try to do this right now.