• Resolved jakegeno

    (@jakegeno)


    hi, this is my current configuraiton:
    1. https://babb-auto.pl
    2.

    gd
    GD Support	enabled
    GD Version	bundled (2.1.0 compatible)
    FreeType Support	enabled
    FreeType Linkage	with freetype
    FreeType Version	2.7.1
    GIF Read Support	enabled
    GIF Create Support	enabled
    JPEG Support	enabled
    libJPEG Version	8
    PNG Support	enabled
    libPNG Version	1.6.28
    WBMP Support	enabled
    XBM Support	enabled
    WebP Support	enabled
    Directive	Local Value	Master Value
    gd.jpeg_ignore_warning	1	1
    imagick
    imagick module	enabled
    imagick module version	3.4.3
    imagick classes	Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version	ImageMagick 6.9.8-2 Q16 x86_64 2017-03-20 https://www.imagemagick.org
    Imagick using ImageMagick library version	ImageMagick 6.9.8-2 Q16 x86_64 2017-03-20 https://www.imagemagick.org
    ImageMagick copyright	? 1999-2017 ImageMagick Studio LLC
    ImageMagick release date	2017-03-20
    ImageMagick number of supported formats:	232
    ImageMagick supported formats	3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    Directive	Local Value	Master Value
    imagick.locale_fix	0	0
    imagick.progress_monitor	0	0
    imagick.skip_version_check	0	0
    core
    PHP Version	7.3.1
    Directive	Local Value	Master Value
    allow_url_fopen	On	On
    allow_url_include	Off	Off
    arg_separator.input	&	&
    arg_separator.output	&	&
    auto_append_file	no value	no value
    auto_globals_jit	On	On
    auto_prepend_file	no value	no value
    browscap	/usr/local/etc/browscap.ini	/usr/local/etc/browscap.ini
    default_charset	UTF-8	UTF-8
    default_mimetype	text/html	text/html
    disable_classes	no value	no value
    disable_functions	no value	no value
    display_errors	On	On
    display_startup_errors	Off	Off
    doc_root	no value	no value
    docref_ext	no value	no value
    docref_root	no value	no value
    enable_dl	On	On
    enable_post_data_reading	On	On
    error_append_string	no value	no value
    error_log	no value	no value
    error_prepend_string	no value	no value
    error_reporting	4983	no value
    expose_php	Off	Off
    extension_dir	/usr/local/php73/modules	/usr/local/php73/modules
    file_uploads	On	On
    hard_timeout	2	2
    highlight.comment	#FF8000	#FF8000
    highlight.default	#0000BB	#0000BB
    highlight.html	#000000	#000000
    highlight.keyword	#007700	#007700
    highlight.string	#DD0000	#DD0000
    html_errors	On	On
    ignore_repeated_errors	Off	Off
    ignore_repeated_source	Off	Off
    ignore_user_abort	Off	Off
    implicit_flush	Off	Off
    include_path	.:/:/usr/local/php73/lib/pear	.:/:/usr/local/php73/lib/pear
    input_encoding	no value	no value
    internal_encoding	no value	no value
    log_errors	Off	Off
    log_errors_max_len	1024	1024
    mail.add_x_header	Off	Off
    mail.force_extra_parameters	no value	no value
    mail.log	no value	no value
    max_execution_time	30	30
    max_file_uploads	20	20
    max_input_nesting_level	64	64
    max_input_time	-1	-1
    max_input_vars	1000	1000
    memory_limit	256M	256M
    open_basedir	no value	no value
    output_buffering	0	0
    output_encoding	no value	no value
    output_handler	no value	no value
    post_max_size	64M	64M
    precision	14	14
    realpath_cache_size	4096K	4096K
    realpath_cache_ttl	120	120
    register_argc_argv	On	On
    report_memleaks	On	On
    report_zend_debug	On	On
    request_order	no value	no value
    sendmail_from	no value	no value
    sendmail_path	/usr/local/bin/sendmail -t -i 	/usr/local/bin/sendmail -t -i 
    serialize_precision	-1	-1
    short_open_tag	On	On
    SMTP	localhost	localhost
    smtp_port	25	25
    sys_temp_dir	no value	no value
    syslog.facility	LOG_USER	LOG_USER
    syslog.filter	no-ctrl	no-ctrl
    syslog.ident	php	php
    track_errors	Off	Off
    unserialize_callback_func	no value	no value
    upload_max_filesize	64M	64M
    upload_tmp_dir	no value	no value
    user_dir	no value	no value
    user_ini.cache_ttl	300	300
    user_ini.filename	php.ini	php.ini
    variables_order	EGPCS	EGPCS
    xmlrpc_error_number	0	0
    xmlrpc_errors	Off	Off
    zend.assertions	1	1
    zend.detect_unicode	On	On
    zend.enable_gc	On	On
    zend.multibyte	Off	Off
    zend.script_encoding	no value	no value
    zend.signal_check	Off	Off

    3. no
    4. no
    5. yes
    6. /wp-content/uploads/.htaccess:

    # BEGIN WebP Converter
    # ! --- DO NOT EDIT PREVIOUS LINE --- !
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{HTTP_ACCEPT} image/webp
      RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpg.webp -f
      RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/$1.jpg.webp [T=image/webp]
      RewriteCond %{HTTP_ACCEPT} image/webp
      RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.jpeg.webp -f
      RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/$1.jpeg.webp [T=image/webp]
      RewriteCond %{HTTP_ACCEPT} image/webp
      RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.png.webp -f
      RewriteRule (.+)\.png$ /wp-content/uploads-webpc/$1.png.webp [T=image/webp]
    </IfModule>
    # ! --- DO NOT EDIT NEXT LINE --- !
    # END WebP Converter
    
    # BEGIN WebP Express
    # Dyrektywy zawarte mi?dzy <code>BEGIN WebP Express</code> oraz <code>END WebP Express</code>
    # s? generowane dynamicznie i powinny by? modyfikowane tylko za pomoc?
    # filtrów WordPressa. Zmiany dokonane bezpo?rednio tutaj b?d? nadpisywane.
    # Plugin is deactivated
    # END WebP Express

    /wp-content/uploads-webp/.htaccess:

    # BEGIN WebP Converter
    # ! --- DO NOT EDIT PREVIOUS LINE --- !
    <IfModule mod_mime.c>
      AddType image/webp .webp
    </IfModule>
    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresByType image/webp "access plus 1 year"
    </IfModule>
    # ! --- DO NOT EDIT NEXT LINE --- !
    # END WebP Converter

    7. WebP Converter for Media: 1.2.2
    WP version: 5.4

    Used plugins:
    Advance Automobile Pro Posttype
    Analytify – Contact form 7 Gooogle Analytics Tracking
    Analytify – Google Analytics Dashboard
    Contact Form 7
    Informacja o ciasteczkach
    Official Facebook Pixel
    Page Builder by SiteOrigin
    SiteOrigin Widgets Bundle
    TinyMCE Advanced
    UpdraftPlus
    WebP Converter for Media
    Yoast SEO

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jakegeno

    (@jakegeno)

    Additionally I can say that after commenting:
    RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads-webpc/$1.png.webp -f
    I see some webp files loaded (I guess only these that are converted to webp format currently), but files that are not converted are timed out.

    It seems like this RewriteCond is not working for some reason.

    Thread Starter jakegeno

    (@jakegeno)

    Problem solved – it seems like the problem is with my hosting – ${DOCUMENT_ROOT} variable does not point properly to actual root, so none of the files existed. After changing path in RewriteCond to absolute directory of uploads-webpc webp images are being loaded.

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    Hi @jakegeno,

    Thank you for your message.

    Can you specify what your .htaccess file looks like now?

    Thread Starter jakegeno

    (@jakegeno)

    Sorry for the very late response, but I didn’t touch that file since updating it until now, when I updated the plugin (I basically had to do exactly the same thing to make it work again).
    All in all my file looks like this now (with your newest update):

    # BEGIN WebP Converter
    # ! --- DO NOT EDIT PREVIOUS LINE --- !
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{HTTP_ACCEPT} image/webp
      RewriteCond /web/wordpress2072248/autoinstalator/wordpressplus/wp-content/uploads-webpc/$1.jpg.webp -f
      RewriteRule (.+)\.jpg$ /wp-content/uploads-webpc/$1.jpg.webp [NC,T=image/webp,E=cache-control:private,L]
      RewriteCond %{HTTP_ACCEPT} image/webp
      RewriteCond /web/wordpress2072248/autoinstalator/wordpressplus/wp-content/uploads-webpc/$1.jpeg.webp -f
      RewriteRule (.+)\.jpeg$ /wp-content/uploads-webpc/$1.jpeg.webp [NC,T=image/webp,E=cache-control:private,L]
      RewriteCond %{HTTP_ACCEPT} image/webp
      RewriteCond /web/wordpress2072248/autoinstalator/wordpressplus/wp-content/uploads-webpc/$1.png.webp -f
      RewriteRule (.+)\.png$ /wp-content/uploads-webpc/$1.png.webp [NC,T=image/webp,E=cache-control:private,L]
    </IfModule>
    # ! --- DO NOT EDIT NEXT LINE --- !
    # END WebP Converter

    The only thing that changed is removing %{DOCUMENT_ROOT} variable and replacing it with absolute path. It seems like home.pl is not using this variable properly – at least on the cheapest hosting plan they have, as according to apache docs it should work like a charm ??

    • This reply was modified 4 years, 10 months ago by jakegeno.
    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    You cannot edit files this way because they will always be overwritten. Please add the following code to your theme:

    add_filter('webpc_htaccess_mod_rewrite', function($rules)
    {
      $path  = '/web/wordpress2072248/autoinstalator/wordpressplus';
      $rules = str_replace('%{DOCUMENT_ROOT}', $path, $rules);
      return $rules;
    });

    This will allow you to overwrite the rules with each update so that everything works without problems on your server.

    Thread Starter jakegeno

    (@jakegeno)

    I tested it and now I can forget about changing this with every update, thank you!

    Plugin Author Mateusz Gbiorczyk

    (@mateuszgbiorczyk)

    @jakegeno, I am very pleased! If you can, please add a review. Thank you for all forms of support for plugin development.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Webp converter does not work at all’ is closed to new replies.