davidljung
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Weird: response hdr 500 Internal error, but pages render anywayA plugin. (not one of the public ones).
The php.net documentation for eval() claims it’ll halt script execution if the PHP isn’t valid, but that isn’t true in this case (it just returned FALSE instead).
Thanks.
Forum: Networking WordPress
In reply to: Weird: response hdr 500 Internal error, but pages render anywayok, I’ve figured it out. There was some invalid PHP being passed to an eval() call. That PHP parser error within eval() was causing the status to be set to 500, even though execution proceeded just fine and rendered the page.
(Specifically, there was a function taking a string expression to be evaluated. It was ‘sanitizing’ it making it safe to execute as PHP – just restricting it to simple math expressions – then passing it to eval wrapped in “return ($expr);”. Problem was it wasn’t considering when $expr was the empty string and since “return ();” isn’t valid, that was causing it).
Forum: Networking WordPress
In reply to: Weird: response hdr 500 Internal error, but pages render anywaySo, PHP’s headers_sent() function was useless, just reporting the line when the top-level call to render the template was made.
by disabling all plugins, I’ve narrowed it to one plugin. Now, searching the source for header( .. 500 ..) I’ve located all the places in WP where it calls that and put in debug code around them – but they are *never* called with a status of 500. The header *is* being set to 200, but the response from Apache is coming back 500!
So, what could be causing it? Any gurus out there?
Appreciate any clues anyone might have.
Thanks.ok, so the plugin is multisite aware in the sense that it uses blogs.dir/2/files etc. I didn’t realize that. However, the configuration settings need to be setup independently for each site. While I can see some people may like that flexibility, ideally it would also have the ability to be setup once for all network sites. Obviously, using the admin form fields to setup hundreds of sites manually is impractical.
I wasn’t hired specifically for this job, no, but I am an employee. I chose to use WordPress even though I’m not familiar with it, since the code base seems relatively small, simple and clean. I am familiar with cloud services and AWS (though mainly from the Java world, I have written several PHP apps that use S3/CloudFront/SimpleDB).
So, I could modify the plugin to automate all the necessary pieces, but I honestly don’t want to generate 312 S3 buckets and 312 CloudFront distributions when one would do perfectly fine.Yes, I could always fork the code – but this is why Linux has never gained wide acceptance in the general public – because it is a bunch of pieces being developed by people serving their own interests, typically without serving the greater community (i.e. the public). Even when some organization stands-up and tries to take on that role for those who want it, the rest of the self-interested project communities shout them down (cf Ubuntu).
So, no, I won’t fork CDN Sync Tool if I can avoid it. What I may do, is look more closely at the code for both CDN Sync Tool and any other similar plugins and decide which is easiest to adapt to my requirements, then contribute any code I write back.
Thanks for the pointer.
Cheers,
-David.I’ve also installed CDN Sync Tool with the aim of using it for multisite. I discovered the hard way that it isn’t really multisite aware.
Tomorrow I have to start creating 312 sites, which will require some automation. While it would be possible to script creation of 312 S3 buckets & CloudFront distributions, I don’t think I’m going to do that (and wouldn’t like having to login to each site to click the plugin sync button anyway).Unfortunately, until this plugin can work at the network level, instead of at the site level, I can’t use it in practice.
If anyone knows of a multisite aware CDN plugin, please let me know.
Otherwise it looks like a nice plugin for a handful of sites.
Cheers.
Forum: Networking WordPress
In reply to: After adding defines, dies looking for wp_1_options tableok, I solved the issue.
In case anyone makes the same silly mistake:
When I copied the defines into wp-config.php, I missed the first (important) one – define(‘MULTISITE’, true) since I saw the define(‘WP_ALLOW_MULTISITE’, true) there and at a glance didn’t notice it was different.
That’s what I get for late-night installations I guess 🙂
Sorry for the noise.