You must be on a really old version of PHP (before 5.3), no?
Do consider upgrading PHP-version and if you can’t you can make this small change to wp-content/plugins/autoptimize/classes/autoptimizeStyles.php;
on line 396 change;
$fonturl_regex = <<<‘LOD’
into
$fonturl_regex = <<<LOD
So simply removing the quotes from around LOD.
hope this helps,
frank
That worked! Thanks!
How do I find out which version of PHP I’m using and if it’s old do I have to have my host update it for me?
you can install https://wordpress.org/plugins/wordpress-php-info/ which will add an entry in the tools-menu with info on the version of PHP you are using. And indeed your host should be able to update you.
frank
I might push out AO 2.0.2 soon, could you try this versoin; https://downloads.wordpress.org/plugin/autoptimize.zip
frank
I’m currently on PHP Version 5.2.17
I’ll talk with my hosting soon and see if they can get me to the most current version.
If this in anyway harshly affects my site speed or rankings then I want it fixed.
I’ll wait until you’ve pushed out your new version so that I can update it in my dashboard.
Thank you for all your help.
would it be possible to test the beta-version somehow wiseworks? I would really need someone to confirm this fixes the “lod”-issue …
frank
If this in anyway harshly affects my site speed or rankings then I want it fixed.
well; PHP has become a lot faster since 5.2.17 to begin with, cfr. these tests
5.2.17: 7.38561 sec
5.6.16: 3.80121 sec
7.0.3: 1.94390 sec
7.0.x is pretty new, but 5.6.X should certainly be possible.
next to that there are very serious security issues in 5.2.x, which has not seen updates for 5 years already. if at all possible, you really should (have your hoster) upgrade PHP as soon as possible.
frank
going to mark this as “resolved” as we now know the root cause, have a workaround and have a (future) AO-version with a better solution.
would be great if you test that one out though 😉
frank
I will test it as soon as possible.
fyi: 2.0.2, based on the current dev version, will be released shortly (today or tomorrow) with what a fix for this issue (and a warning on the AO settings page for old PHP).
do test and if things don’t work any more holler now or be silent forever (well, not really, but I’d prefer to fix things before releasing to the masses).
frank