|
|

11-23-2012, 07:23 PM
|
|
Member
|
|
Join Date: Sep 2012
Posts: 17
|
|
Quote:
Originally Posted by NiteWave
can change the build option from "--with-gd=shared" to "--with-gd", and rebuild php ? see if it resolves the issue.
another tip, to narrow down the issue, you can run test program to see if working as expected or giving out any error message. for example, http://php.net/manual/en/function.imagejpeg.php
"Example #1 Outputting a JPEG image"
|
I did the first example and got the attached. I took that code and put it in a php file, tried all the image filenames too. I also did the tail error log and nothing is coming up. I will try the --with-gd next.
Last edited by Jakobi; 11-23-2012 at 07:37 PM..
|

11-23-2012, 10:51 PM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,220
|
|
|
the output of the test php is wrong, so your php not compile jpeg correctly.
just now I build php 5.4.6 with options
'--with-gd' '--with-jpeg-dir'
only, test script return right result.
|

11-24-2012, 12:12 AM
|
|
Member
|
|
Join Date: Sep 2012
Posts: 17
|
|
Thank you for the continued help. I did what you mentioned, but it still returns the test as broken. Any other thoughts?
Code:
'--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-tidy=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-litespeed'
|

11-24-2012, 05:33 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,220
|
|
|
please try
#strace /usr/local/lsws/fcgi-bin/lsphp5 test.php > a.jpg 2>test.log
at command line.
check test.log, see any useful info in it.
|

11-24-2012, 07:53 AM
|
|
Member
|
|
Join Date: Sep 2012
Posts: 17
|
|
|
Thanks! Ok, I attached the log. Also, when I do the command it returns my webpages to a 503 error. I then have to gracefully restart the server...not sure if that is normal.
Again, thank you for all the help!!!
|

11-24-2012, 08:56 AM
|
|
Member
|
|
Join Date: Sep 2012
Posts: 17
|
|
Ok I have a few things I found, the cause?
This shows up a few times. I have 62 installed in lib64 and 80 in lib.
Code:
2012-11-24 03:07:41.580 [STDERR] Wrong JPEG library version: library is 62, caller expects 80
I am not sure what this is, anything bad? It fills up the log:
Code:
2012-11-24 03:08:02.268 [STDERR] LSAPI: SUEXEC_UGID set UID: 502, GID: 502
2012-11-24 03:08:04.062 [STDERR] LSAPI: SUEXEC_UGID set UID: 501, GID: 501
I did see this, but I think it is because we changed the shared to '--with-gd' '--with-jpeg-dir'
Code:
2012-11-24 10:34:03.830 [STDERR] PHP Warning: Module 'gd' already loaded in Unknown on line 0
|

11-24-2012, 09:15 AM
|
|
LiteSpeed Staff
|
|
Join Date: Sep 2009
Posts: 2,220
|
|
some useful info from the output:
Quote:
open("/usr/lib64/libjpeg.so.62", O_RDONLY) = 3
open("/etc/php.d/gd.ini", O_RDONLY) = 3
open("/usr/lib64/20100525/gd.so", O_RDONLY) = 3
write(2, "PHP Warning: Module 'gd' alread"..., 62PHP Warning: Module 'gd' already loaded in Unknown on line 0) = 62
|
since it's "--with-gd" instead of "--with-gd=shared", so no need load gd.so now.
edit /etc/php.d/gd.ini, comment out "extension=gd.so" line.
Quote:
|
open("/usr/lib64/php/modules/ioncube_loader_lin_5.3.so", O_RDONLY) = 3
|
this is not related to jpeg issue, but since it's php 5.4.6, should load ioncube module for php 5.4.x. current one is for php 5.3.x
Quote:
open("test.php", O_RDONLY) = -1 ENOENT (No such file or directory)
"write(1, "Could not open input file: test."..., 37) = 37"
|
when run that command, to be sure test.php exists at current directory.
when run
#strace /usr/local/lsws/fcgi-bin/lsphp5 test.php > a.jpg 2>test.log
also ok to edit a.jpg to see any text info in it.
|

11-24-2012, 02:26 PM
|
|
Member
|
|
Join Date: Sep 2012
Posts: 17
|
|
Hello,
I don't have this directory: /usr/local/lsws/fcgi-bin/lsphp5
There was nothing in the a.jpg file. Does this work?
Code:
execve("/usr/local/lsws/fcgi-bin/", ["/usr/local/lsws/fcgi-bin/", "test.php"], [/* 21 vars */]) = -1 EACCES (Permission denied)
dup(2) = 3
fcntl(3, F_GETFL) = 0x8001 (flags O_WRONLY|O_LARGEFILE)
close(3) = 0
write(2, "strace: exec: Permission denied\n", 32strace: exec: Permission denied
) = 32
exit_group(1) = ?
|

11-24-2012, 04:51 PM
|
|
Member
|
|
Join Date: Sep 2012
Posts: 17
|
|
|
I got it fixed, thank you for the help and direction. I removed libjpeg version 8, and recompiled. This fixed my issue with WordPress. I can now upload and edit jpeg files in WordPress. However, vBulletin still gave me issues.
So I installed Imagemagick, and now vBulletin works great again.
I am now really sure if this was the correct way to really do it, but it works. Oh that example with the test.php now outputs correctly.
I think we are set. Again, thank you for your time.
I didn't recompile PHP after installing Imagemagic, but it works. I wasn't really sure if I had or should do that.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:40 PM.
|
|