• Resolved ramalxlama

    (@ramalxlama)


    Hi ??

    Thank you for your development effort, im using v2.5.6 and its completely incompatible with PHP 8.3.
    Even with 7.4 there are a lot of warnings.

    Here are the Warnings with PHP 7.4
    PHP Warning: Illegal string offset ‘sanitize_svg_front_end’ in /server/www/wp/wp-content/plugins/svg-support/svg-support.php
    PHP Warning: Illegal string offset ‘sanitize_svg’ in /server/www/wp/wp-content/plugins/svg-support/svg-support.php
    PHP Warning: Illegal string offset ‘restrict’ in /server/www/wp/wp-content/plugins/svg-support/svg-support.php
    PHP Warning: Illegal string offset ‘sanitize_on_upload_roles’ in /server/www/wp/wp-content/plugins/svg-support/svg-support.php

    With PHP 8.3 the plugin breaks WordPress with:
    PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /server/www/wp/wp-content/plugins/svg-support/svg-support.php:90

    I seen one thread previously, about this but its old and unresolved.
    Cheers

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    hey thanks for pointing this out!

    in the hurry to get the fix published, all php versions mustn’t have been tested. Will address and push another release asap.

    Thread Starter ramalxlama

    (@ramalxlama)

    You’re fast, i didnt thought of an reply that soon ??

    Thanks!
    TBH, im not entirely sure if this is really your fault, because i checked the php code and it looks all fine to me, everything is an array as it should be.
    It looks to me like i have something in the Database (i mean old settings from this plugin) that breaks the php side, or maybe i dont have the database tables for this plugin at all.

    Not sure, but its probably related to “not installed through the store” or something, im thinking that simply putting the svg-support folder into the wordpress plugins directory is probably not enough.

    Just saying because those illegal string offsets could come from the Databse.

    Thanks anyway & Cheers ??

    Plugin Author Benbodhi

    (@benbodhi)

    it should be fine when installed manually like that, everything happens on activation and it’s a valid way of installing.

    will def dig into it anyway and make sure anything that comes up is addressed.

    if you do happen to find a conflicting plugin or something, please share so I can test with that too.

    Thread Starter ramalxlama

    (@ramalxlama)

    Nope, no conflicting plugin, just PHP that sees the array whyever as string.

    Thanks for your effort, hopefully you are able to find out what the issue is, i wasn’t able, the code looks for me pretty good ??

    Plugin Author Benbodhi

    (@benbodhi)

    This should be fixed now in 2.5.7

    Thread Starter ramalxlama

    (@ramalxlama)

    PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /server/www/sms-medipool.de/wp-content/plugins/svg-support/svg-support.php:96

    Sadly not for 8.3 ??
    I could test php 7.4 again for the warning messages if you want.

    Plugin Author Benbodhi

    (@benbodhi)

    oh wow, I’m sorry. It was tested in 8.3 though.

    maybe you could share some details about your php setup, what is installed etc.

    in the meantime, I’ll see if I can reproduce.

    Thread Starter ramalxlama

    (@ramalxlama)

    Sorry for the Late Reply:
    This stupid WordPress here breaks the Code line breaks a bit and i dont find a dedicated way how to visualize the configs properly ??

    nginx v1.27.0

    server {
    listen 80;
    server_name wpt.mydomain.de;
    root /server/www/wp;
    server_tokens off;
    client_max_body_size 16M;
    client_body_timeout 300s;
    fastcgi_buffers 32 32k;
    fastcgi_buffer_size 32k;
    fastcgi_hide_header X-Powered-By;
    index index.php;
    location / { try_files $uri $uri/ /index.php?$args; }
    location ~ /. { deny all; }
    location = /robots.txt { allow all; }
    location ~* .(js|css|png|jpg|jpeg|gif|ico|svg)$ { expires max; }
    include /server/www/wp/nginx.conf;
    rewrite ^/(readme.html|license.txt|wp-content/debug.log|wp-includes/$) /nothing_404_404?dYEu_secure-login=secure last;
    rewrite ^/(((wp-content|wp-includes)/([A-Za-z0-9-_\/]))|(wp-admin/(!network\/?)([A-Za-z0-9-_\/]+)))(.txt|/)$ /nothing_404_404?dYEu_secure-login=secure last;

    location ~ .php$ { fastcgi_split_path_info ^(.+?.php)(/.)$;
    include fastcgi_params;
    fastcgi_pass php-handler;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    try_files $fastcgi_script_name =404;
    }
    }


    php v8.3.6 fpm
    (Modules: cli, json, apcu, bcmath, curl, gd, mbstring, mysql, opcache, xml, zip, json, intl, imagick)

    [www]
    user = www-data
    group = www-data
    listen = /run/php/php8.3-fpm.sock
    listen.owner = www-data
    listen.group = www-data
    pm = dynamic
    pm.max_children = 64
    pm.start_servers = 16
    pm.min_spare_servers = 16
    pm.max_spare_servers = 48

    env[HOSTNAME] = $HOSTNAME
    env[PATH] = /usr/local/bin:/usr/bin:/bin
    env[TMP] = /tmp
    env[TMPDIR] = /tmp
    env[TEMP] = /tmp

    php_admin_value[mysqli.allow_local_infile] = On
    php_admin_value[mysqli.allow_persistent] = On
    php_admin_value[mysqli.cache_size] = 2000
    php_admin_value[mysqli.max_persistent] = -1
    php_admin_value[mysqli.max_links] = -1
    php_admin_value[mysqli.default_socket] = /run/mysqld/mysqld.sock
    php_admin_value[mysqli.connect_timeout] = 60
    php_admin_value[mysqli.trace_mode] = Off

    php_admin_value[opcache.revalidate_freq] = 60
    php_admin_value[opcache.save_comments] = 1
    php_admin_value[opcache.jit] = 1255
    php_admin_value[opcache.jit_buffer_size] = 128M
    php_admin_value[opcache.memory_consumption] = 256
    php_admin_value[opcache.interned_strings_buffer] = 64
    php_admin_value[opcache.max_accelerated_files] = 10000

    php_admin_value[memory_limit] = 512M
    php_admin_value[upload_max_filesize] = 2G
    php_admin_value[post_max_size] = 2G
    php_admin_value[max_execution_time] = 3600
    php_admin_value[max_input_time] = 3600
    php_admin_value[output_buffering] = 0

    No Changes in any other PHP Files, except /etc/php/8.3/fpm/conf.d/10-opcache.ini (Because the default is Jit disabled and pool.d config can’t overwrite the value of 10-opcache.ini if its defined)
    zend_extension=opcache.so
    opcache.jit=1255

    Thats it, i try to set everything with the pool.d config, no php.ini modifications.
    The nginx Section has no 443 and SSL Configs, because there is an Reverse Proxy in Front (NPM).

    In /etc/hosts you need only an 172.30.1.15 wpt.mydomain.de ip/host to the reverse Proxy, to make WordPress loopback working.

    WordPress v6.6.1 and Plugins:
    Borlabs Cookie
    Contact Form 7
    Download Manager
    Email Address Encoder
    Hide My WP
    LayerSlider
    Sucuri Security
    The7 Elements
    Ultimate Addons for WPBakery Page Builder
    Visual Composer Responsive Google Maps
    W3 Total Cache
    WP Extra File Types
    WP Mail SMTP
    WPBakery Page Builder
    Yoast Duplicate Post
    Yoast SEO

    Everything is Up2Date etc…

    Cheers & Thanks!

    • This reply was modified 3 months, 3 weeks ago by ramalxlama.
    Plugin Author Benbodhi

    (@benbodhi)

    This is very helpful, thank you!

    Plugin Author Benbodhi

    (@benbodhi)

    this should be fully addressed in 2.5.8

    I tested with all major and current php versions.

    Thread Starter ramalxlama

    (@ramalxlama)

    Amazing, you fixed all errors/warnings! Not a single warning appears now ??

    Thank you a lot! ??

    Plugin Author Benbodhi

    (@benbodhi)

    thanks for your patience!

    I was able to cover a lot of things in this update. Very happy it’s working as expected for you now!

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.