0

Basic Info - Running WAMP 2.2 with PHP 5.4.3 and Apache 2.2.22 on Windows XP Pro 32 bit

My problem is that when I run a php script it will run just fine. Now if I change that script and re-run it, the page will never load and the script will become locked due to being used by another program. I have found that it is being used by the process httpd.exe, which if I use End Process (Which actually restarts it rather than stopping it) the original page will suddenly load and the new script will be ran. If I change it again it will do this same thing.

If I disable the PHP APC extension this problem doesn't happen, so it is caused by APC

I have tried using php_apc_3114_beta_php54.dll (renamed it to php_apc.dll) downloaded from http://dev.freshsite.pl/php-accelerators/apc.html "APC 3.1.14 beta for PHP 5.4" and apc_3113_beta_php54_vc9.dll (renamed it to php_apc.dll) the same place "APC 3.1.13 beta for PHP 5.4 vc9"

Cains
  • 883
  • 2
  • 13
  • 23

2 Answers2

0

I would suggest to download PHP extensions from specific sites only. The extensions should be compiled for your specific PHP version and system (check for x86/x64 and thread-safe vs non-thread-safe). The best places to download correctly compiled extensions for windows are:

PHP for Windows:

and Anindya's Blog:

EDIT: As mentioned below in my comment, have you tried using BOTH versions of APC (thread safe AND non-thread-safe) from the original site you linked to?

This does sound like some sort of threading issue...

Filippos Karapetis
  • 4,367
  • 21
  • 39
  • Many people link to http://downloads.php.net/pierre/ saying there are many versions (even though only two are there) and if I use php_apc-3.1.10-5.4-vc9-x86.zip from there I get a PHP Startup: Unable to load dynamic library '-----/php_apc.dll' - The specified procedure could not be found. The other version gives another error, I assume because it's for PHP 5.3. I'll try ones from those other sites now, but the site I used was the first one I found that gave dll's that went in fine. – Cains May 29 '13 at 21:37
  • I seems like Anindya's blog is for 64 bit downloads, which doesn't apply to me. When going to windows.php.net I found the extension at http://pecl.php.net/package/APC but with very limited information on what version applies to what version of PHP, 32/64 bit, or ts vs nts. Could you by any chance link me to a download for my exact situation? – Cains May 29 '13 at 21:47
  • Have you tried both the thread-safe AND the non-thread-safe (nts) version of APC from your original link to freshite.pl? – Filippos Karapetis May 29 '13 at 22:35
  • The non-thread-safe version gives a "PHP Startup: Unable to load dynamic library '-----/php_apc.dll' - The specified module could not be found", I'm fairly sure the thread-safe, although it goes in without error, is broken or not right for my PHP in some way. The apc_add function works with the original annoyance, but apc_store seems to not work at all, locking the file and hanging the page up whenever it's used at all in the PHP script. – Cains May 29 '13 at 22:47
  • After reading up on Apache and my two httpd.exe processes, I'm fairly sure I need the thread-safe version as Apache apparently handles requests with multiple threads on Windows. – Cains May 29 '13 at 22:53
0

I did myself a favor and did it all on Linux. Setting up my whole server and installing APC on Ubuntu was faster and smoother than just trying to insert APC in WAMP. After a few commands and a clean install it's working beautifully, I can't believe I didn't migrate to Linux sooner!

Cains
  • 883
  • 2
  • 13
  • 23