Archive

Posts Tagged ‘php’

EAccelerator does not play nice with multiple workers

June 20th, 2010 recon No comments

After a few PHP access violations, I’m pretty sure EAccelerator does not work properly with multiple IIS worker processes.

I should really move to lighttpd or nginx one of these days…

Categories: Uncategorized Tags:

More on eAccelerator

December 27th, 2009 recon No comments

Now that I’m correctly loading the extension (zend_extension_ts), eAccelerator is running smoothly.

I found something interesting in the event log yesterday:

PHP Warning:  [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.9. Rebuild it for your PHP version (5.2.9-2) or download precompiled binaries.

Now that error message makes perfect sense. The reason I didn’t see it the first time around is that PHP logged two messages separately at the same time. If I was reading a flat file log, I would’ve noticed it immediately.

Categories: Uncategorized Tags: ,

Thread safety and PHP

December 26th, 2009 recon No comments

UPDATED

After a few seg-faults, I realized that eAccelerator isn’t thread safe (I was running it under a thread safe server)… It is thread safe… I just wasn’t loading it in thread safe mode (see the manual for details). Whoops.

Categories: Uncategorized Tags: ,

eAccelerator

December 26th, 2009 recon No comments

After getting somewhat annoyed with the slowness of my blog, and having nothing better to do, I decided to setup eAccelerator. I’m pretty sure I tried setting it up a long time ago, but for some reason, didn’t finish.

Following the path of logic, I went to the eAccelerator website in search of the appropriate files. Their Windows section directed me to SiteBuddy, which had a nice collection of binaries for various PHP versions. After determining my PHP version (5.2.9-2), I tried the closest match (5.2.9), and was greeted by the following error in the Windows event log:

Unable to start eAccelerator module in Unknown on line 0.

My initial reaction to the error: what the ****… (UPDATE: See this post for more details) After a quick Google search, I found that PHP modules must be built for the EXACT PHP version you plan to use them on.

Since I have just about every Microsoft C++ compiler, I figured compiling a new eAccellerator module for my version of PHP would be simple. I downloaded the archived PHP files I needed (now I understand why they keep archives), switched to the release configuration, and pressed build.
Read more…

Categories: Uncategorized Tags: ,

InDefero – include(“commonsense.php”);

August 8th, 2009 recon 2 comments

I spent a really long time (8+ hours) setting up an open source project tracker called InDefero. I was also trying to setup Git at the same time, but that’s something for another post.

InDefero has no install wizard (one is in the works though), so all the configuration is manual. Installing the DB tables requires you to run a PHP CLI script. Everything was going smoothly until I tried to install the tables. The script exited with no output every time I ran it.

I tried to debug the script with echo statements, and traced to issue to a require statement that was causing execution to stop. After tinkering with several of the scripts, including the script in the require statement (the config file), and still having the install script fail, the thought occurred to me, why am I not getting any debug info from PHP?

Since the php.ini I was using was setup for production, display_errors was off. After turning it on with a CLI switch, I got a debug message. My config file was messed up. After going to the indicated line, I realized what happened.
Read more…

Categories: Uncategorized Tags: ,

Download Monitor bug fixes

July 29th, 2009 recon No comments

After using Download Monitor (a WP plugin), I noticed there was a little annoying bug in uploader.php, which prevented me from using the post uploader form.

To fix, find (in uploader.php):

<option value=""><?php _e('N/A',"wp-download_monitor"); ?></option>

Replace with:

<option value="0"><?php _e('N/A',"wp-download_monitor"); ?></option>

Another minor bug is that there was a missing space when using the download short code (link titles looked like VersionNumHere instead of Version NumHere).

To fix, find (in wp-download_monitor.php):

$format = '<a class="downloadlink" href="{url}" title="{version,"'.__("Version","wp-download_monitor").'", ""} '.__("downloaded","wp-download_monitor").' {hits} '.__("times","wp-download_monitor").'" >{title} ({hits})</a>';

Replace with:

$format = '<a class="downloadlink" href="{url}" title="{version,"'.__("Version","wp-download_monitor").' ", ""} '.__("downloaded","wp-download_monitor").' {hits} '.__("times","wp-download_monitor").'" >{title} ({hits})</a>';
Categories: Uncategorized Tags: ,