Closed cbahiana closed 3 years ago
You probably need to enable apache modrewrite module and to have a file called '.htaccess' in your web root folder. You can create a .htaccess file by copying the htaccess.txt file provided by Joomla.
$ cp htaccess.txt .htaccess
also 'cache' is probably not a good choice as there is already a folder with that name
.htaccess was already in use and it's Joomla's own, not modified.
I changed that parameter from "cache" to "gzip" and created the /gzip directory, with 755 permissions, but the problem remains.
Now I'm also getting the message: `Notice: Undefined offset: 0 in /home/customer/www/pwa.sd.eti.br/public_html/plugins/system/gzip/vendor/tbela99/css/src/TBela/CSS/Query/Evaluator.php on line 105
`
You should not create a directory. It does not need to be an existing directory.
Did you enable url rewriting support in the Joomla config?
You can also check the Apache log for an error description
Ok, changed back the Cache Prefix set to 1pp and deleted the gzip directory.
After each change I always go to the "Service Worker" tab in the plugin, use the "Update" button and save, just to be sure.
"Use URL Rewriting" and "Add Suffix to URL" were already enabled, as well as "Gzip Page Compression" at the "Server" tab in the "Global Configuration".
Tried filling $live_site in the configuration.php, which was empty.
The result is still the same.
Check your apache error log file for additional info.
I cannot help you unless I have a clear idea of what is going on. You need to check apache (or another web server like nginx) error log and see what is happening. It could be an out of memory issue, a missing library, etc.
I checked Apache's error log at Siteground, but there was nothing useful there, so I took a copy and ran the site localhost (Ubuntu 20.04 default LAMP stack). PHP 7.4 is set to disable output_buffering. This is what I get at /var/log/apache2/error.log:
[Thu Mar 04 09:26:54.421597 2021] [php7:notice] [pid 9372] [client 127.0.0.1:54294] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 397, referer: http://localhost/pwa/ [Thu Mar 04 09:26:54.421790 2021] [php7:warn] [pid 9372] [client 127.0.0.1:54294] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 399, referer: http://localhost/pwa/ [Thu Mar 04 09:26:54.429300 2021] [php7:notice] [pid 10193] [client 127.0.0.1:54298] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 397, referer: http://localhost/pwa/ [Thu Mar 04 09:26:54.429376 2021] [php7:warn] [pid 10193] [client 127.0.0.1:54298] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 399, referer: http://localhost/pwa/
And the console shows these errors:
GET http://localhost/pwa/1pp/cn/e/db6c747f4b945dd9ec91e32563f58a966a42623a2b722a7c03c60130b4705db9271afd580f3de94fe4ede8dc47590e1aaed3117656093f8a076f2424194e071a2f62fa521a788bbef683733feb807d5a1d38260b0277ba34f7fd47937b11e425c42892df58cf1b6c50bdcb9653f621dd3eaa9c9708dbf499eaab58f529c9/2EklPp.js net::ERR_CONTENT_DECODING_FAILED 200 (OK) (index):799 GET http://localhost/pwa/1pp/cn/e/f8173191e73f6bcd1efad8ba2058010a4389d95fd5359aae34944dc798e0d2bf8146fb9665c7e49aee7c6d5abcaac90f4f5e73da87ceb1e69757dcb411f36f63871bb1f4be8455a701245c79a2070fd5f6b24e80e91198cf7c4fecd49f09888c5db08ed481bb77cf85dcbf705e4a7df0f7569349fe196521df1d97a0f0abcf8fce6c64158f5d9f790e/2vuxqw-main.min.css net::ERR_CONTENT_DECODING_FAILED 200 (OK) (index):799
Disabling the plug-in clears all errors, both in the error.log and in the console, and the images all show.
Enabling the plug-in and disabling "Gzip page compression" in the "Server" tab of the "Global Configurations" clears the errors in the console, images do not show and there are still entries in the error.log:
[Thu Mar 04 09:38:15.102274 2021] [php7:notice] [pid 1365] [client ::1:39208] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 397, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.102331 2021] [php7:warn] [pid 1365] [client ::1:39208] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 399, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.109417 2021] [php7:notice] [pid 11161] [client ::1:39210] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 397, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.109470 2021] [php7:warn] [pid 11161] [client ::1:39210] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 399, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.124188 2021] [php7:notice] [pid 10193] [client ::1:39220] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 28, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.124245 2021] [php7:warn] [pid 10193] [client ::1:39220] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 41, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.171137 2021] [php7:notice] [pid 10193] [client ::1:39220] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 28, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.171185 2021] [php7:warn] [pid 10193] [client ::1:39220] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 41, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.179913 2021] [php7:notice] [pid 9561] [client ::1:39222] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 28, referer: http://localhost/pwa/ [Thu Mar 04 09:38:15.180972 2021] [php7:warn] [pid 9561] [client ::1:39222] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 41, referer: http://localhost/pwa/
You have the error right in front of your eyes
PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 399, referer: http://localhost/pwa/line 397
My guess is you might have another plugin or extension calling _obflush or _ob_endflush before the plugin is executed. This will cause apache to send content before the plugin sends the actual image. This results in a corrupted image downloaded.
I will suggest you disable all the plugins you added and leave this one alone to see if the error is reproducible
After removing all 3rd party extensions but GZIP, still no images and this is the error.log:
[Thu Mar 04 10:17:56.346411 2021] [php7:notice] [pid 20441] [client ::1:46102] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 397, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.346479 2021] [php7:warn] [pid 20441] [client ::1:46102] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 399, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.362933 2021] [php7:notice] [pid 20575] [client ::1:46100] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 397, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.363022 2021] [php7:warn] [pid 20575] [client ::1:46100] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 399, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.395749 2021] [php7:notice] [pid 20473] [client ::1:46112] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 28, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.395843 2021] [php7:warn] [pid 20473] [client ::1:46112] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 41, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.432824 2021] [php7:notice] [pid 20473] [client ::1:46112] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 28, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.433029 2021] [php7:warn] [pid 20473] [client ::1:46112] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 41, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.454891 2021] [php7:notice] [pid 20439] [client ::1:46116] PHP Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /var/www/pwa/plugins/system/gzip/responder.php on line 28, referer: http://localhost/pwa/ [Thu Mar 04 10:17:56.454947 2021] [php7:warn] [pid 20439] [client ::1:46116] PHP Warning: ini_set(): Cannot change zlib.output_compression - headers already sent in /var/www/pwa/plugins/system/gzip/responder.php on line 41, referer: http://localhost/pwa/
Update: Enabling output_buffering in php.ini solves the image problem.
Voilà! :)
I suggest including the information on output_buffering being required in the documentation.
You are welcome to send me a pull request with that change :)
I have HTTP Cache Prefix set to "cache" and checked to confirm that GD was installed and being used.
The image is loaded as a text image through a custom module and is part of the Joomla sample content, which I enabled.
Logging in doesn't change the issue. Notice that the RSS icon is also missing.
in doesn't change the issue.