BrentNewland
Forum Replies Created
-
Never mind, I figured it out. I was using “amr shortcode any widget” to embed the product list in a page (I think when I first setup this plugin I couldn’t use or it didn’t have a built-in shortcode). I noticed this plugin has its own shortcode now and used that, works fine.
Forum: Plugins
In reply to: [W3 Total Cache] Warning with HHVMI’m having this problem. I checked and that line in the commit linked doesn’t match my current build (which I have not changed in any way).
[01-May-2015 23:35:27 UTC] PHP Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in E:\Server\www\casipc\wp-includes\functions.php on line 3282
Yes, Windows Server.
And if you’re implying that this is a WordPress problem, many other plugins update fine. I’ve turned on debug mode, and I’ll wait for a new update to be released to get more info.
“Users Ultra Lite” is in my post because I had to file several bug reports. Apparently several plugins are not compatible with PHP7.
Yeah, yeah, yeah, I put a slightly wrong bit of text in my post.
Does that really warrant marking it as “resolved”?
Take the part where it says “Users Ultra Lite”, pretend it says “Business Directory Plugin”, and look into fixing your buggy software.
Forum: Plugins
In reply to: [amr shortcode any widget] PHP 7 CompatibilityI had to ask online to find the PHP 7 nightly snapshots are here https://windows.php.net/snapshots/ at the bottom under “Master”. I converted two WordPress installations to it and it’s much faster. If you’re using PHP in FastCGI mode, I’d recommend the x64 Non-Thread-Safe build.
On my server, using nginx (for now), it’s pretty easy to configure PHP per domain. I have PHP5 running as one Windows service (for our server’s Owncloud), and another PHP7 service for our WordPress sites. Here’s a guide I wrote on installing PHP as a Windows service: https://forum.nginx.org/read.php?2,236376,236376
Though our current WinSW FastCGI configuration code looks like this:
<service> <id>PHP7</id> <name>PHP7</name> <description>This service handles the primary PHP7 FastCGI server.</description> <executable>C:\server\php7\php-cgi.exe</executable> <arguments>-b 9127 -c c:\server\php7\php.ini</arguments> <env name="InstanceMaxRequests" value="0" /> <env name="pm.max_requests" value="0" /> <env name="PHP_FCGI_MAX_REQUESTS" value="0" /> <stopexecutable>C:\SERVER\php7\php-stop.cmd</stopexecutable> <logpath>C:\server\logs\php7</logpath> <log mode="roll-by-size"> <sizeThreshold>256</sizeThreshold> <keepFiles>128</keepFiles> </log> </service>
And php-stop.cmd consists of just “taskkill /f /IM php-cgi.exe”
Anyways, back to the topic, looking at the WordPress code, it appears the problem is that the code used in WordPress’s widgets.php is in a foreach loop. The immediate preceding code from widgets.php:
foreach ( (array) $sidebars_widgets[$index] as $id ) {
However, your script’s code does not have a foreach loop, therefore “continue” is not correct for that location. Continue is for use in loops only. https://php.net/manual/en/control-structures.continue.php I’m pretty sure, right now, that if statement does nothing.
I think change:
if ( !isset($wp_registered_widgets[$widget_id]) ) continue; $params = array_merge( array( array_merge( $sidebar, array('widget_id' => $widget_id, 'widget_name' => $wp_registered_widgets[$widget_id]['name']) ) ), (array) $wp_registered_widgets[$widget_id]['params'] );
to
if ( !isset($wp_registered_widgets[$widget_id]) ) { $params = array_merge( array( array_merge( $sidebar, array('widget_id' => $widget_id, 'widget_name' => $wp_registered_widgets[$widget_id]['name']) ) ), (array) $wp_registered_widgets[$widget_id]['params'] ); }
Here’s an image of the JS console error I get https://i.imgur.com/jEyByDu.png