Server doesn't seem to load

263 views
Skip to first unread message

Valkyri9

unread,
Feb 23, 2011, 11:22:21 AM2/23/11
to PHudBase Developers
When launching server.php as root I get:

/phudbase-wm/wm_server# php -q server.php
PHP Deprecated: Comments starting with '#' are deprecated in /etc/
php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/
php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/
php5/20090626+lfs/imagick.so' - /usr/lib/php5/20090626+lfs/imagick.so:
cannot open shared object file: No such file or directory in Unknown
on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/
php5/20090626+lfs/suhosin.so' - /usr/lib/php5/20090626+lfs/suhosin.so:
cannot open shared object file: No such file or directory in Unknown
on line 0
PHP Notice: Use of undefined constant E_WARN - assumed 'E_WARN' in /
var/www/phudbase-wm/wm_server/includes/errorFunctions.inc on line 16
Attempting to bind to port 4004...
Socket server started at address 127.0.0.1 on port 4004
Attempting to bind to port 843...
Socket server started at address 127.0.0.1 on port 843
PHP Notice: Undefined offset: 0 in /var/www/phudbase-wm/wm_server/
includes/classes/Server/SocketServer.class.inc on line 127
PHP Notice: Trying to get property of non-object in /var/www/phudbase-
wm/wm_server/includes/classes/Server/SocketServer.class.inc on line
127

The last two lines get spammed over and over again, adding 1 digit to
Undefined offset: until I kill the server. I'm running Ubuntu 10.04
LTS, PHP5 and PHP5-CLI are installed. Imagick.so appears to be
present but suhosin.so is not.

I changed the port to from 12346 to 4004 on both instances in
server.php and also in client.js due to firewall access restrictions
at the location where I'm testing.

Any pointers in the right direction would be greatly appreciated.

Thanks!

J Fitz

unread,
Feb 23, 2011, 11:46:53 AM2/23/11
to PHudBase Developers
I'll have to do a bit of testing, myself, but looking at the code in
the SocketServer.class.inc file at line 127, I think we can get this
one licked.

The first thing that would fix the PHP Notice spamming would be to add
~E_NOTICE to your error reporting line in the php.ini file for the CLI
interface (should be at /etc/php5/cli/php.ini). This obviously just
affects the reporting of the notice and not the cause.

Without testing, I would venture to say that the easiest fix would be
to change the line that reads:

if (is_resource($this->clients[$i]->socket))

to:

if (isset($this->clients[$i] && is_resource($this->clients[$i]-
>socket))

That should prevent the code from trying to test for the variable
"socket" at an undefined array index.

If you'd like to try either or both of these (preferably the latter
first), please let me know if it works for you. I'll try to do some
testing and get a fix in in the next few days.

Thanks!

- John

Ryan Lutrell

unread,
Aug 13, 2012, 1:15:21 AM8/13/12
to phudbase-...@googlegroups.com
i've tried that... it does not work... still getting lots of undefined offset checks

Davide Gazzola

unread,
Jan 11, 2013, 8:00:54 AM1/11/13
to phudbase-...@googlegroups.com, valk...@gmail.com
I'm also got a loop of theese errors:

PHP Notice:  Undefined offset: 255 in /var/www/wm_server/includes/classes/Server/SocketServer.class.inc on line 127
PHP Notice:  Trying to get property of non-object in /var/www/wm_server/includes/classes/Server/SocketServer.class.inc on line 127
PHP Notice:  Undefined offset: 0 in /var/www/wm_server/includes/classes/Server/SocketServer.class.inc on line 218
PHP Notice:  Trying to get property of non-object in /var/www/wm_server/includes/classes/Server/SocketServer.class.inc on line 218

version OS: 
Ubuntu Server 12.04

and

PHP Version 5.3.10-1ubuntu3.4


Any ideas?
Thank to all.

Tim van Dijen

unread,
Jan 30, 2013, 6:43:31 PM1/30/13
to phudbase-...@googlegroups.com, valk...@gmail.com
I ran into the same problem... Has anyone found a solution??
Message has been deleted

Michael Elford

unread,
Jan 30, 2013, 7:00:08 PM1/30/13
to phudbase-...@googlegroups.com, valk...@gmail.com
Guys, I posted a fixed wm_server folder.  It's in the thread "I'm having a heck of a time trying to get this to run"

Reply all
Reply to author
Forward
0 new messages