[tl] Image Optimizer for XF 2.x

[tl] Image Optimizer for XF 2.x [Paid] 2.0.0

No permission to buy ($29.00)

tommydamic68

Well-known member
I’m getting this server error. Any thoughts?

  • RuntimeException: Job Truonglv\ImageOptimizer\Job\Optimizer: Server has been disabled exec command.

  • src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php:45
  • Generated by: Unknown account

  • Mar 21, 2019 at 2:26 PM
Stack trace

Request state


#0 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(140): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/admin/pub...')
#1 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(84): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 90580)
#3 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#4 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#5 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#6 job.php(42): XF\Job\Manager->runQueue(false, 8)
#7 {main}


array(4) { ["url"] => string(18) "/community/job.php" ["referrer"] => string(72) "https://sphynxlair.com/community/threads/sphynx-cat-tattoos.17844/page-7" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
 

Nuno

Well-known member
You need to talk to your host ... "Server has been disabled exec command."
They disabled the exec command and php cannot execute the binary that optimize the images.
 

truonglv

Formerly Nobita.Kun
I’m getting this server error. Any thoughts?

  • RuntimeException: Job Truonglv\ImageOptimizer\Job\Optimizer: Server has been disabled exec command.

  • src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php:45
  • Generated by: Unknown account

  • Mar 21, 2019 at 2:26 PM
Stack trace

Request state


#0 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(140): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/admin/pub...')
#1 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(84): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 90580)
#3 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#4 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#5 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#6 job.php(42): XF\Job\Manager->runQueue(false, 8)
#7 {main}


array(4) { ["url"] => string(18) "/community/job.php" ["referrer"] => string(72) "https://sphynxlair.com/community/threads/sphynx-cat-tattoos.17844/page-7" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
To use this add-on you must enable shell_exec or exec functional.
 

Strong

Member
How does this add-on compare to the ThemeHouse image optimizer that utilizes Kraken.io?
It doesn't. Oranges and apples. While both fruit, the two are completely different.

One uses system binaries to do the job while the other uses third party resources and a subscription.

Basically, if you have root and CPU to spare, this is a better option.

If you don't have root and are using a shared system, kracken.io might be your only automated solution.
 

tommydamic68

Well-known member
@truonglv - I’m getting this error. Any thoughts?
Code:
Server error log
ErrorException: [tl] Image Optimizer: Failed to optimize image. $path=/home/admin/public_html/community/internal_data/temp/xfBKYclZ, $command=/home/admin/public_html/community/src/addons/Truonglv/ImageOptimizer/pngquant -f --quality '60-80' --speed '5' --output '/home/admin/public_html/community/internal_data/temp/xfcNnECO' '/home/admin/public_html/community/internal_data/temp/xfBKYclZ' $output=array ( ) $newSize=0 src/XF/Error.php:75
Generated by: Unknown account Jun 3, 2019 at 12:16 PM
Stack trace
#0 src/XF.php(187): XF\Error->logError('[tl] Image Opti...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(55): XF::logError('[tl] Image Opti...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(140): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/admin/pub...')
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(84): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('data://avatars/...')
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'avatar', Object(XF\Timer), 1559529073)
#5 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Request state
array(4) {
  ["url"] => string(18) "/community/job.php"
  ["referrer"] => string(33) "https://sphynxlair.com/community/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

tommydamic68

Well-known member
@truonglv - I’m getting this error. Any thoughts?
Code:
Server error log
ErrorException: [tl] Image Optimizer: Failed to optimize image. $path=/home/admin/public_html/community/internal_data/temp/xfBKYclZ, $command=/home/admin/public_html/community/src/addons/Truonglv/ImageOptimizer/pngquant -f --quality '60-80' --speed '5' --output '/home/admin/public_html/community/internal_data/temp/xfcNnECO' '/home/admin/public_html/community/internal_data/temp/xfBKYclZ' $output=array ( ) $newSize=0 src/XF/Error.php:75
Generated by: Unknown account Jun 3, 2019 at 12:16 PM
Stack trace
#0 src/XF.php(187): XF\Error->logError('[tl] Image Opti...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(55): XF::logError('[tl] Image Opti...')
#2 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(140): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/admin/pub...')
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(84): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('data://avatars/...')
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(51): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'avatar', Object(XF\Timer), 1559529073)
#5 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#6 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#7 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#8 job.php(42): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Request state
array(4) {
  ["url"] => string(18) "/community/job.php"
  ["referrer"] => string(33) "https://sphynxlair.com/community/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
@truonglv?
 

Bonsai Coder

Active member
I updated to 2.0.0 today, and tried again. The bad news is that it still isn't working. The good news is that I am getting a new server error log:

Code:
    ErrorException: Binary () are incorrect version. Expected version: 1.4.4 Your version: Unknown src/XF/Error.php:75

    Generated by: Unknown account Jun 9, 2019 at 2:26 PM

Stack trace

#0 src/XF.php(187): XF\Error->logError('Binary () are i...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/JPEG.php(62): XF::logError('Binary () are i...')
#2 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(32): Truonglv\ImageOptimizer\Images\JPEG->beforeOptimize()
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(143): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/bonsainu/...')
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(85): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...', Object(Truonglv\ImageOptimizer\ContentData\AttachmentData))
#5 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(52): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 14360)
#6 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#7 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#8 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#9 job.php(42): XF\Job\Manager->runQueue(false, 8)
#10 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(57) "https://www.bonsainut.com/threads/is-this-wireworm.38840/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

truonglv

Formerly Nobita.Kun
I updated to 2.0.0 today, and tried again. The bad news is that it still isn't working. The good news is that I am getting a new server error log:

Code:
    ErrorException: Binary () are incorrect version. Expected version: 1.4.4 Your version: Unknown src/XF/Error.php:75

    Generated by: Unknown account Jun 9, 2019 at 2:26 PM

Stack trace

#0 src/XF.php(187): XF\Error->logError('Binary () are i...', false)
#1 src/addons/Truonglv/ImageOptimizer/Images/JPEG.php(62): XF::logError('Binary () are i...')
#2 src/addons/Truonglv/ImageOptimizer/Images/AbstractImage.php(32): Truonglv\ImageOptimizer\Images\JPEG->beforeOptimize()
#3 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(143): Truonglv\ImageOptimizer\Images\AbstractImage->optimize('/home/bonsainu/...')
#4 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(85): Truonglv\ImageOptimizer\Job\Optimizer->optimizeImageFile('internal-data:/...', Object(Truonglv\ImageOptimizer\ContentData\AttachmentData))
#5 src/addons/Truonglv/ImageOptimizer/Job/Optimizer.php(52): Truonglv\ImageOptimizer\Job\Optimizer->processImages(Array, 'attachment_data', Object(XF\Timer), 14360)
#6 src/XF/Job/Manager.php(253): Truonglv\ImageOptimizer\Job\Optimizer->run(G)
#7 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#8 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#9 job.php(42): XF\Job\Manager->runQueue(false, 8)
#10 {main}

Request state

array(4) {
  ["url"] => string(8) "/job.php"
  ["referrer"] => string(57) "https://www.bonsainut.com/threads/is-this-wireworm.38840/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
Look like your setup are incorrect. Can you show me your options?
 
Top