Fritex
Forum Replies Created
-
Forum: Plugins
In reply to: [W3 Total Cache] Redis option not enabledYou need to install, using the apt-get install redis-server, redis-tools and php-redis and in the config for redis check out IP and port.
Restart web server – apache.
Validate it you can see it in phpinfo().
Try the button “Test” in W3TC settings page for redis – if successfull, great it’s working.I did not needed to custom write into files db, advanced-cache, object-cache.
Just copy them from the plugin’s /wp-content/ to your /wp-content/ folder.
- This reply was modified 6 years, 8 months ago by Fritex.
Forum: Plugins
In reply to: [W3 Total Cache] OpCache not refreshed after php7.2 update CVE-2019-11043Server 32GB DDR3 RAM, all time usage ~10GB of 32GB.
Forum: Plugins
In reply to: [W3 Total Cache] OpCache not refreshed after php7.2 update CVE-2019-11043Using nginx and PHP 7.2 FPM.
The opcache config has:
zend_extension=opcache.so
opcache.enable=1
opcache.validate_timestamps=0
opcache.revalidate_freq=60
opcache.max_accelerated_files=10000
opcache.memory_consumption=1024
opcache.interned_strings_buffer=128
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.save_comments=1
opcache.load_comments=1Forum: Plugins
In reply to: [W3 Total Cache] OpCache not refreshed after php7.2 update CVE-2019-11043PHP.ini config
memory_limit=128MB
Forum: Plugins
In reply to: [W3 Total Cache] OpCache not refreshed after php7.2 update CVE-2019-11043Compatibility Check:
Inačica dodatka: 0.10.1
PHP inačica: 7.2.24-1+0~20191026.31+debian9~1.gbpbbacde;
Web Server: nginx
FTP functions: Installed (potrebno za samostalno hostanu (FTP) CDN podršku)
Podrška za višebajtne nizove: Instalirano (potrebno za Rackspace Cloud Files podršku)
cURL ekstenzija: Instalirano (potrebno za Amazon S3, Amazon CloudFront, Rackspace CloudFiles podršku)
zlib extension: Instalirano (required for gzip compression support)
brotli extension: Nije instalirano (required for brotli compression support)
Opcode cache: Installed (OPCache)
Memcached extension: Instalirano
Memcache ekstenzija: Instalirano
Redis extension: Instalirano
HTML Tidy ekstenzija: Instalirano (required for HTML Tidy minifier support)
Detekcija mime vrste: Instalirano (Fileinfo) (potrebno za CDN podršku)
Heš (hash) funkcija: Instalirano (hash) (potrebno za NetDNA / MaxCDN CDN podršku za brisanje)
Otvoriti basedir: Yes: -HIDDEN TO PUBLIC HERE!
zlib izlazna kompresija: Isključeno
set_time_limit: Dostupno
SSH2 extension: Instalirano (required for Self-hosted (FTP) CDN SFTP support)WordPress resursi
-HIDDEN TO PUBLIC HERE! nginx.conf: Ok
-HIDDEN TO PUBLIC HERE! wp-content: OK
-HIDDEN TO PUBLIC HERE! wp-content/uploads/2019/10: OK
Lijepe stalne veze: /%postname%/
WP_CACHE definicija: Defined (true)
Prepravljanje URL-a: Omogućeno
Mrežni režim: NeSo, after we upload some image to WP Media Librabry, my code above does next:
a) creates a new image from the uploaded one
b) adds the “watermark logo” .png to the specific position of the uploaded image (full-size, original)
c) this new image with watermark logo is saved (overrides/overwrites the uploaded one – original)
d) the same image is converted to .webp image
e) so at the end we have the modified original uploaded image with watermark on it and the .webp version of it too (full sized both)Sorry for too much text, but as I did read it again, it did not sound so good for me to understand what the code does and what I wanted as an explanation of it.
Your suggestions help me a lot!
Basically, the original image after upload is modified and on it is placed the watermark.png logo image, and the new one is created – the same filename.
After it, this new one with watermark on it is converted to webp.Dear Alim, thanks for reply and provided information.
Will try.
Morover, regarding your 1st statement, where should I put this code? To my functions.php or I should modify the plugin files?
The
add_filter(‘wp_generate_attachment_metadata’,’water_mark’, 10, 2);code is somehow skipped, or the plugin just fires and uploads images, and this filter is somehow done after it, right?
That’s the way why the plugin cannot recognize the .webp, event the modified .jpg with watermark, to upload them?Regarding your 2nd statement, I do not know if there is possibility for WordPress similar like add_image_size() to convert to .webp, so the size of this image with .webp extension would be automatically added to the sizes array() which you are saying, right?
I do not think I know how to do it, so I will have to Google around about the action and/or filter from the Official Documentation, how to add it as webp size to the attachment meta size array while on upload.
Kindly, if there are any other ideas or possible solutions, appreciate and thank you very much for provided answers and help!
On the fly does not suppose to find newly created image as filename.webp, after the uploaded to media, so “on the fly” compatibility does not work either?
– regarding the above code added to the functions.phpRequirements: SSH on Linux OS with webp library installed (apt-get)
Not working.
So, how to make this plugin to:
a) upload to bucket the new image with watermar added, same filename and extension .jpg, after we have uploaded it to WP Media Library?
b) the same, just extension is .webpI believe it has to be easy, somehow because the plugin works great.
Thanks!
Does it work with exec()?
Like:
exec(“gsutil cp file gs://bucket > /dev/null 2>&1”);
or
exec(“gsutil cp file gs://bucket”);Anyone tested?
Even maybe better to modify the dynamic-image-support.php?
Maybe something to do with class-utility.php?
/* Get metadata in case if method is called directly. */
if( current_filter() !== ‘wp_generate_attachment_metadata’ && current_filter() !== ‘wp_update_attachment_metadata’ ) {
$metadata = wp_get_attachment_metadata( $attachment_id );
}Does this line skips the add_filter() in my functions.php, which makes a copy or originall image, then to the full-size image adds watermark, and converts the specific one to webp as well as full-size one?
Thanks!
Forum: Fixing WordPress
In reply to: TTFB insanely highSame here on my http://www.racunalo.com.
Forum: Plugins
In reply to: [Disqus Comment System] Comment count always 0 on homepageThe solution that I figured out few minutes ago and worked for me (SEO purpose):
<?php $loc = "http://disqus.com/api/3.0/users/details.json?user=<YOUR_USER_ID_HERE>&api_key=<YOUR_API_KEY>"; $json = file_get_contents($loc); $json_array = (array)(json_decode($json)); //print_r($json_array); $comments_number = $json_array['response']->numPosts; ?>And in my templete I used
<?php echo $comments_number; ?>.I used Disqus Plugin for WordPress (checked the JavaScript files in footer) and added the shortname as is.
Worked for me!