Wampserver gibin not a valid Win32 application with php 5.4 - php

I replaced my 2.1 version of WampServer with the 3.1.4 64 bit version. Everything worked after the installation. But I need to have php 5.4 and that doesn't come with this version of WS. So I downloaded that version, made the changes to the various files as mentioned here and other places. But when I switch to 5.4 it doesn't start.
I ran the "Check State of Services" tool and it said this
State of services:
The service 'wampapache64' is NOT started EXIT error code:1066 Help
message for error code 1066 is: The service has returned a
service-specific error code.
The service 'wampmysqld64' is started
The service 'wampmariadb64' is started
The service 'dnscache' is started
WampServer (Apache, PHP and MySQL) will not function properly if any
service 'wampapache64' 'wampmysqld64' 'wampmariadb64' 'dnscache' is
not started.
And the "Check http.conf" tool said
httpd.exe: Syntax error on line 195 of
C:/wamp64/bin/apache/apache2.4.35/conf/ht tpd.conf: Cannot load
c:/wamp64/bin/php/php-5.4.9/php5apache2_4.dll into server: %1 is not
a valid Win32 application.
And line 195 of that file is
LoadModule php5_module
"${INSTALL_DIR}/bin/php/php-5.4.9/php5apache2_4.dll"
Is it failing because the dll file is for the wrong version or do to something else? I've tried to locate a php5apache2_4.dll file for 32 bit but I couldn't find one.
I've spent most of the weekend on this and if I can't get it going I will need to go back to my previous version since I work on more sites using 5.4 than later versions. I hope I don't have to do that.

If you are using WAMPServer 3 or greater then there are a multitude of versions of PHP that can be downloaded as ADDONS. In other words installed into WAMPServer with a simple download and click to install.
I suggest you remove the manually installed version of PHP and use the provided downloads.
They are available from SourceForgce, but they are a LOT EASIER to find on the WAMPServer backup repo
It looks like you may need to use the 32bit WAMPServer 3.1.4 as there does not appear to be a 64bit PHP5.4 available in the ADDON list.
You may also find that you need to download an older version of Apache to get PHP5.4 to run as Apache and PHP have to be installed to versions that are compatibly compiled.
But with WAMPServer 3 there are 16 versions of Apache and 50 or so versions of PHP.
EDIT: In answer to your comment
If you uninstall the 64bit WAMPServer (after backing up site code and any databases) and install the 32bit WAMPServer V3.1.4.
The version of Apache i.e. V2.4.35 that comes with WAMPServer3.1.4 will run PHP5.4.45. So once you have WAMPServer 3.1.4 installed and working (check it works before continuing) you can download and install the ADDON for PHP5.4.45
Then using the wampmanager menu, switch to PHP5.4.45.
The version of MySQL is not directly link to Apache/PHP so the version that comes with WAMPServer V3.1.4 will work just fine.
It would also be a good idea to apply the WAMPServer 3.1.5 upgrade to WAMPServer 3.1.4 so you are totoally upto date with WAMPServer

Related

How to enable curl in php 7.3+ in uwamp server

I'm running Uwamp server under windows7 and it works perfectly with php versions from 5.5 to 7.0.3 and with curl enabled.
When I switch to php 7.2, 7.3 or latest 7.4.3 uwamp server still working - but without curl.
php_curl.dll file is enabled under extensions (ext) but phpinfo() confirms that curl extension is missing / not enabled. I compared php.ini with previous php versions, modified it but it still doesn't work.
cURL is NOT installed on this server
I have testet xampp and this server has no problem with curl and php 7.3/7.4. I compared php.ini etc. but curl extension still not working under Uwamp.
It seems that the author of the project has abandoned it, because there have been no updates or activities since many years. Maybe someone using it and can help me to solve it.
Any idea would be greatly appreciated!
finally got a working solution for this problem of uwamp and running an up to date version of php and getting curl working.
I have sat here for a couple of days trying to work why you couldn't get a later version of php 7.0.3 without breaking uwamp and curl. So I learnt how to integrate and test php apache as standalones and then working on updating uwamp. Lots of head scratching of working out how uwamp uses its on the fly configuration setup.
I will list all the steps to update your version of uwamp (to apache 4.2 and php 7.4.4 as of Mar 2020)
Download uwamp (portable or installer)
Download c++ runtime https://aka.ms/vs/16/release/VC_redist.x86.exe (taken from the windows php page)
Install the runtime above
Install uwamp to a directory (in this example will just use c:\ making it install to c:\uwamp after expanding)
Before running uwamp
Goto to apache lounge website and download the latest 32 build of apache (4.2)
https://www.apachelounge.com/download/VS16/binaries/httpd-2.4.41-win32-VS16.zip
Expand this archive, it should create a folder called apache2.4
Step in to this directory and copy all the files and paste them here in your uwamp folder (c:\uwamp\bin\apache). This should overwrite all the apache files and add the latest apachephp dll
TIP. Just make sure you havent expanded the apache2.4 zip in the uwamp apache folder, easy to tell as you will see a apache24 appear
Goto to php.net and download the latest THREAD SAFE version of php (7.4.4)
https://windows.php.net/downloads/releases/php-7.4.4-Win32-vc15-x86.zip
Extract the php zip this folder in to the c:\uwamp\bin\php in to a new folder with name of php-7.4.4 (so the files should be in c:\uwamp\bin\php\php-7.4.4)
There you are, you have completed your manual upgrade of uwamp , run uwamp and if no errors appear with in the GUI, everything should be working. Test by opening a browser and use http://localhost/uwamp/phpinfo or http://127.0.0.1/uwamp/phpinfo or click the "phpinfo button" in the uwamp GUI
This way seems to allowed an upgrade of uwamp (except sql) but resolve a common problem of php and curl not working / breaking.
This works for x86 version installed on a 32/64 bit system.
Still trying to work out the kinks for uwamp to be running 64 bit apache and php but should be possible.
Try and delete the version of PHP that is affected by the missing Curl extension and then re-download the version from inside the AWamp interface. I have had similar problems with other extensions and have solved it this way.

Issue with Wamp on Win7 - PHP 7.2.10

I'm trying to use newest version of Wamp and I also need php7 version.
My problem is:
When start WAMP show me 0xc000007b error
Orange icon - start 2 of 3 service
SHow me the error on PHP path
When try to install 'wampapache' show me again 0xc000007b error
I have Win7 and Service Pack 1 and also all necessary Visual C++ libraries.
WAMPServer runs all its internal scripts using PHP5.6.38 as that is what they have been tested on. It has nothing to do with the version of PHP that will run with your Web Server.
You should never put any version of PHP onto your Windows PATH. WAMPServer is to flexible as it can have any number of versions of PHP installed which you can switch to with a simple menu click. V3 comes with 3 versions of PHP installed out of the box. See this answer for an explanation
If you are getting an 0xc000007b error, then most likely you dont have all the required MSVC RUntime libraries installed OR you didnt when you installed WAMPServer. If you installed them AFTER you installed WAMPServer, then uninstall WAMPServer, delete the wamp folder, and then reinstall WAMPServer AFTER you are sure ALL the MSVC Runtimes are installed. (without them the install can fail to complete all its processes.
You can find a handy utility on the WAMPServer Backup Repo called Checks VC++ packages installed It is down nearly at the bottom of the page.
You can also find a Downloadable ZIP file containing ALL the necessary MSVC Runtimes on the bottom of that page. If the Checker reports any missing MSVC Runtimes, download that too, unzip it and run EACH of the MSVC RUntime Installs in Version order (one by one). If you see a dialog saying this version is already installed, us the REPAIR button and this will ensure it is properly installed and the correct version.

Call to undefined function printer_list()

I'm getting Call to undefined function printer_list() cuz my php_printer.dll isn't working and in the error log I'm getting PHP Startup: Unable to load dynamic library.
c:/wamp64/bin/php/php5.6.31/ext/php_printer.dll
I searched the entire web for php_printer.dll that works with php 5.6.31 and I didn't find it, I'm working with wampserver 3.1 on windows 7 can anyone help?
Looking at the one issue on that git repo I see that gimjudge has complied these DLL's for 32 PHP only. Their reasoning being that until PHP7 the 64bit PHP versions were actually only experimental. PHP only became truly 64 bit as of PHP7.0
So to use this dll you would have to install the 32bit version of WAMPServer. Then you will probably have no problems activating this DLL.
You can download the 32bit version of WAMPServer 3 from here Its the backup repo and much easier to see what you are doing and which version you are downloading than the normal SourceForge repo.
Make sure you have backed up all you site(s) and databases before installing the 32bit WAMPServer.
However it is possible to install the 32bit AND 64bit WAMPServer on the same PC as the default folder names are different (C:\wamp or C:\wamp64) the Apache and MySQL service names are also different (wampapache or wampapache64) and (wampmysqld or wampmysqld64)
Although its not a good idea to start both at the same time as this will use a lot of memory for no good reason.

How to download, use and keep updated PHP, Apache, MySQL on a machine running on Windows 10 Home operating system?

I'm a PHP developer by profession. Till now I was working on Ubuntu Linux 14.04 LTS 64-bit operating system and LAMP stack.
Yesterday I bought a new Lenovo laptop pre-installed with Windows 10 Home Single Language operating system.
Then to start development using PHP and MySQL I installed Wampserver (64 bits & PHP 5.6.15 & PHP 7) 3 on my new machine.
After installation I'm facing so many problems in running PHP and PHPMyAdmin without error. Also it's showing me PHP Version 5.6.16 installed which is actually a old one.
Actually, I want to install the latest stable versions of following softwares before starting my PHP development :
PHP Version 7.0.6
Apache httpd 2.4.20
MySQL Version 5.7.12
PHPMyAdmin Version 4.6.1
And also whenever any new stable version for any of the above softwares become available I should be able to upgrade the same software to it like I used to do on my Ubuntu machine by running regular system update.
Can someone please suggest me a way to achieve it without any hassle and trouble? So that I can concentrate more on web development rather than doing configuration settings.
Thanks.
There are MANY ADDONS available for WAMPServer 3
They are all on SourceForge
Or they can be downloaded from links on the WAMPServer forum
Or the alternate download site (often a few days ahead of SourceForge)
Remember that with WAMPServer you can switch between any installed version of Apache/PHP/MYSQL with a simple click of a menu item.
The latest version of WAMPServer is currently V3.0.4 and comes with
Apache2.4.18
MYSQL5.7.11
PHP7.6.19 & 7.0.4
ADDON for PHP7.0.6 is also there ready for download and install
ADDON for Apache2.4.20 is also there ready for download and install
ADDON for MYSQL5.7.12 is also there ready for download and install
ADDON for PHPMyAdmin Version 4.6.1 is also there ready for download and install
There have been a few odd hiccups with phpMyAdmin lately so there is also an ADDON for a tool called Adminer4.2.4 available also
MYSQL Workbench is also a great tool for messing with MYSQL, but if you install that be careful to only install the Workbench and not another MYSQL Server as well.
What more could you possibly want
Try XAMPP , pick the version you want
https://www.apachefriends.org/download.html
XAMPP is an easy to install Apache distribution containing MariaDB, PHP, and Perl. Just download and start the installer. It's that easy.

PHP CURL not loading in WAMP after upgrading PHP from 5.3.4 to 5.3.22

I have the exact same issue as PHP cURL not working - WAMP on Windows 7 64 bit
CURL doesn't load at Apache restart, with message: "PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.22/ext/php_curl.dll' - The operating system cannot run %1.\r\n in Unknown on line 0"
Except that I am not installing 5.3.13 as in the other thread but I am attempting to upgrade PHP in an existing WAMP installation from 5.3.4 to 5.3.22, both x64 VC9 TS on a Win 2008R2 64 bits, running Apache 2.2.4 x64.
I did the following steps:
stopped Apache
unzip php5.3.22 in /wamp/bin/php5.3.22;
updated php.ini, httpd.conf and the 2 Wamp config files to point to the new PHP version;
updated php5ts.dll and php5isapi.dll in Apache\bin with the new ones
updated Windows PATH to point to php5.3.22 folder instead of php5.3.4
restarted Apache -> CURL load error message
I could try most of the answers provided in other threads except the one from Matthieu:
Go to http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and download the curl version that corresponds to your php version under "Fixed curl extensions:".
...as there is no "Fixed curl extension" for 5.3.22 in Anindya's site.
Does anyone know if there is need or not for a "fixed curl lib" after 5.3.13? and where I can find it?
Either there are some typos in your question or you have done a few things wrong.
The new PHP should have gone into \wamp\bin\php\php5.3.22
updated php5ts.dll and php5isapi.dll in Apache\bin with the new ones This is done by Switching versions in WAMP, you dont do it manually
updated Windows PATH to point to php5.3.22 folder instead of php5.3.4 There is no need to put PHP on the PATH, in fact it reduces the ability of WAMPServer to switch between various versions of PHP.
Have a look at this it may help How to install a version of PHP into an existing WAMP install

Categories