Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.0.9, Win7x64: %1 is not a valid Win32 application. #225

Closed
Kruithne opened this issue Feb 2, 2017 · 8 comments
Closed

PHP 7.0.9, Win7x64: %1 is not a valid Win32 application. #225

Kruithne opened this issue Feb 2, 2017 · 8 comments

Comments

@Kruithne
Copy link

Kruithne commented Feb 2, 2017

Hey,

Dropped the latest version of APCu (5.1.8) into a PHP 7.0.9 build on Windows 7 64-bit and it's throwing the following error:
Unable to load dynamic library 'ext\php_apcu.dll' - %1 is not a valid Win32 application.

The settings I have in php.ini are as follows:

extension=php_apcu.dll
apc.enabled=1
apc.shm_size=32M
apc.ttl=7200
apc.enable_cli=1
apc.serializer=php

Is this a problem with APCu itself, or have I overlooked a mistake somewhere? Thanks.

@weltling
Copy link
Collaborator

weltling commented Feb 2, 2017

Please use an absolute path in extension_dir.

Thanks.

@Kruithne
Copy link
Author

Kruithne commented Feb 2, 2017

@weltling I should have mentioned that I tried that, same issue occurs.
Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP7\ext\php_apcu.dll' - %1 is not a valid Win32 application. in Unknown on line 0

@Kal74
Copy link

Kal74 commented Feb 3, 2017

APCU 5.1.8 is only builded with VC14.
Have you an appropraiter version of PHP?
Check with phpinfo():
Compiler => MSVC14 (Visual C++ 2015)

@weltling
Copy link
Collaborator

weltling commented Feb 3, 2017

@Kruithne besides what @Kal74 says, all the other parameters have to match as well - the bitness, thread safety, etc. The output you post is likely about wrong bitness or a broken DLL. Also, please always try with latest versions.

Thanks.

@Kruithne
Copy link
Author

Kruithne commented Feb 5, 2017

PHP build compiled using MSVC14 (Visual C++ 2015), as @Kal74 mentioned.

Using APCu 5.1.8 7.0 Non Thread Safe (NTS) x64 with PHP 7.0.9 NTS MSVC14 on Windows 7 64-Bit. Seems all matching?

@Kruithne
Copy link
Author

Kruithne commented Feb 5, 2017

Managed to get success using the x86 version, unsure why the 32-bit version works on a 64-bit environment/interpreter, but if it works it works! Thanks for the help. :)

@Kruithne Kruithne closed this as completed Feb 5, 2017
@Oswaldgerald
Copy link

trying to disable the APCu extension and delete it in C:/xampp/php/apcu.dill .It worked for me

@cbloss
Copy link

cbloss commented Feb 15, 2018

I second that I had the same issues at @Kruithne and the x86 version worked on a 64. So weird. I did use an absolute path as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants