myamiweb can't display image
Added by Harry Kao over 11 years ago
After upgrade, myamiweb server can't display images. From the error log:
PHP Fatal error: Call to undefined function socket_create() in /srv/www/htdocs/myamiweb/inc/redux.inc on line 378
----------------------
I copied back the old myamiweb directory,and the same image is displayed properly. I did copy over the same config.php to the new installation.
Replies (4)
RE: myamiweb can't display image - Added by Anchi Cheng over 11 years ago
The trunk version you are updating to uses redux to serve images on the webserver so that we can move to CentOS 6 (php 5.3 and above) and/or other newer flavors of linux for 3.0 release. This page will help you in doing this. Unfortunately, software package required by redux are not available on CentOS 5 if that is what you have now. This means you will have to go through the trouble of moving to CentOS 6.
http://emg.nysbc.org/projects/leginon/wiki/Using_Redux_to_serve_images_on_myamiweb
RE: myamiweb can't display image - Added by Harry Kao over 11 years ago
I installed redux package on Opensuse11.4 and the command line redux tests (with and without the --server_host) went OK. But I am still getting the same socket_create() error. Reduxd is running, as the redux command line with --server_host ran Ok and produced a correct test.png file.
info.php shows that mrc module is installed.
But when I ran
php -q ex1.php | display
This works on the old ex1.php file, but not on the ex1.php under the myamiweb/test directory. The error is same--> socket_create(), as in the above post.
RE: myamiweb can't display image - Added by Harry Kao over 11 years ago
Found the solution.
1. First install the sockets extension for php
2. add the following lines to config.php of myamiweb
define('SERVER_HOST',"localhost");
define('SERVER_PORT',77777); ### or your own port number!!
Thank you.
RE: myamiweb can't display image - Added by Jim Pulokas over 11 years ago
Thanks for posting your solution. Looks like it is just a difference in linux distributions. CentOS decided to include the sockets extension into the main php package but SuSE has it in its own package.