GD2 - How can I make it work?

#1
or isn't supported in the free version?

the library is installed

I've tried changing
/opt/lsws/admin/conf/php.ini
/opt/lsws/admin/misc/php.ini
/etc/php.ini

I installed php-gd

phpinfo() reports no additional modules and extension_dir
/usr/lib/php/extensions/no-debug-non-zts-20020429

still no success, can somebody help me please?
 

xing

LiteSpeed Staff
#2
You need to change "/opt/lsws/conf/php.ini" if you are using litespeed's default php binary. If you compiled your own php binary, you need to use the php.ini specified in the configure line.
 
#3
"/opt/lsws/conf/php.ini" does not exist

xing said:
You need to change "/opt/lsws/conf/php.ini" if you are using litespeed's default php binary. If you compiled your own php binary, you need to use the php.ini specified in the configure line.
 
#4
No lazies allowed

I tried copying /etc/php.ini to /opt/lsws/conf/
(configured for gd)
and

/usr/bin/php /opt/lsws/fcgi-bin/
(comes from an RPM)

and the server stops responding

so, do I really have to compile php from sources ??

:(
 

xing

LiteSpeed Staff
#5
1) If you compiled any php module, you must compile it matching the "version" of the php binary that you will use it for.

For example, if the php binary used by litespeed is version 4.4.1, you must compile your gd module to the 4.4.1 source code. You cannot use a gd module compilied for php 5.0.1 or 4.3.1 with php 4.4.1.

2) the default php binary that comes with lsws looks for modules in the lib directory of the installation and in your case: /opt/lsws/lib

You can also just doing to the .so file directly via full-path in php.ini to avoid this problem. Again, this would only work if the module's phpize (used for pre-compile stage of module) version matches that of the lsws php binary.

3) You cannot copy a rpm binary to the lsws/fcgi-bin/ directory and have it work. For example, if under external applications you are using php with FCGI interface, the php binary must be compiled with fcgi interface.

You can check this by doing ./php -v

4) Check http://www.litespeedtech.com/docs/index.html

and visit How-Tos to get an idea on how to compile php from source that would work with litespeed.

So yeah, you have to compile. =)
 
#6
It works !!!!

Well , turns out, it just needed the php.ini

works fine with php binary included in lsws

the problem was the scripts, taking too much memory

sometimes it was 'mysql client ran out of memory'
or '503 server busy'

but taking apart the image in smaller zones, did the trick

Thank you very much for your time and help

Great product, excellent service
 

mistwang

LiteSpeed Staff
#7
Our prebuilt PHP binary includes GD support.
In order to process large images, you should increase the memory limit from both php.ini and LSWS's lsphp configuration.
 
Top