Moved to PS, sockets not working


#1

I recently moved to a PS and wrote a test program to see if socket functions where available but got an error:

Call to undefined function socket_create()

How can I activate socket use in my PS ?

That was the only purpose of moving to a PS.


#2

Sounds like the PHP sockets module isn’t part of our default install. You’ll probably have to build it yourself:

http://wiki.dreamhost.com/Installing_PHP5


#3

It looks disabled in my php.ini file

;extension=php_sockets.dll

How can I modify the php.ini if it doesn’t let me with a “permission denied” message?


#4

That’s for Windoze mate :wink:

As andrewf has already suggested, you’ll need to build PHP with –enable-sockets.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

That line is Windows-specific (Linux PHP modules end in “.so”, not “.dll”)… uncommenting it won’t fix anything. You will need to build your own PHP to get sockets support.


#6

Oh I see, hmm, guess I’m SOL since I know nothing about SSH, much less about rebuilding php.


#7

Yeah, shell can be a bit unnerving at first. I’ll knock up an auto-installer that builds a complete PHP environment on DreamHost servers. If you don’t mind playing the guinea pig I’ll sling you a copy (later today sometime).

Process will be: upload php file, open in browser, wait for success email.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#8

Thanks sXi but I moved back to shared hosting, see, PS is not for me, all I wanted was socket availability not full root access to tweak my dream host (pun).

Perhaps in the future when I have more time to learn new stuff.

Thanks anyway.