Run PHP4 on Wamp5 - wamp

how to install php4 on wamp5 1.7.4, any ideas?
BTW, I know how to install php4 addon on WampServer 2.

I installed php4 and php5 in my computer. I want to share the way, how to do this:
Download WampServer version WampServer2.0a.exe at: http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.0/
Download plugin for Apache is version WampServer2-APACHE2058 and Download plugin for PHP is version WampServer2-PHP448 at: http://www.wampserver.com/en/
After download finish, install all plugin and run wampserver.
To run php4,
right mouse click on
wampserver icon => select Apache => Version => Select 2.0.58.
Then
=> select PHP => Version => select 4.4.8
Good luck

The only component of WAMP that uses PHP is Apache. Hence it is a standard installation procedure, same as any Apache on Windows. Nearly the same on all os.
Download PHP4 for Windows.
Install or Unzip PHP-files in a PHP-folder like c:\php.
Stop Apache.
Edit Apache:
Replace PHP5 with PHP4:
# PHP5
#LoadModule php5_module "c:/phpdir/php5apache2_2.dll"
#PHPIniDir "C:/phpdir/php-5.2.3-Win32"
# PHP4
LoadModule php4_module "C:/phpdir/php4apache2.dll"
PHPIniDir "C:/phpdir"
Make sure you change "C:/phpdir" to wherever you put PHP 4.
Start Apache.

Related

Drupal 8 - Commerce Module - BC math PHP extension not found

I'm trying to install the commerce module in Drupal 8 however I get the error 'BC math PHP extension not found'.
I've searched for this problem and tried different things such as editing the PHP.ini by adding 'bcmath.scale=2' however I still get the error message.
Any help would be appreciated, thanks.
Just install bcmath plugin for your php version with no need to (re)build php as mentioned on accepted answer
# get php version
php -v
# install bcmath based on your version lets assume php 7.1
# for ubuntu
sudo apt install php7.1-bcmath
# for centos
yum install bcmath
# restart apache
sudo systemctl restart apache2
Above problem appears when installing commerce or commerce kickstart using composer
Update 2020
Please refer to #GiorgosK's answer for installing bcmath via a package manager if you are using a distribution that provides a bcmath package for PHP. I will ask the OP in comments to update the recommended answer, since that solution is probably what most people need.
Three years ago when I answered this question, I suggested that you have to rebuild PHP to get bcmath. That was incorrect. I was using an older distribution of Debian/Ubuntu that provided bcmath as a statically linked extension in the core php package. I determined at the time (incorrectly) that bcmath was a core extension that had to be enabled at build-time (like SPL and PCRE).
For those trying to troubleshoot a missing bcmath extension (such as those building/installing PHP themselves or nevertheless encountering issues), I've corrected and updated my original answer below. It explains in detail how to troubleshoot a missing PHP extension.
Original Answer (Corrected)
The error message indicates that PHP wasn't built with bcmath support or can't find the installed extension. PHP extensions are either built into PHP directly or they are loaded from an external dynamic library file at runtime.
Since PHP obviously doesn't have the extension built-in, it can't find the external library file that provides bcmath. This file on POSIX platforms will be called bcmath.so and php_bcmath.dll on Windows.
Extension files are installed under a directory indicated by the extension_dir property in php.ini. To determine the value of this property, run the following command:
php -r 'echo ini_get("extension_dir").PHP_EOL;'
The default value for this property is configured when PHP is built and may vary from distribution-to-distribution.
Once you verify the extension file is installed in this location, you can then check to see if the extension is enabled in php.ini. You should see a line that enables the extension like so:
# POSIX platforms
extension=bcmath.so
# Windows
extension=php_bcmath.dll
For Linux distributions like Ubuntu/Debian that install extensions via the package manager, the format is somewhat different since Debian employs a distributed configuration. Typically the package manager installs everything correctly, but you can check to see if an ini file exists for bcmath under the corresponding conf.d directory. These small ini files are snippets imported into the larger php.ini file, and they are typically symlinked to /etc/phpX/mods-available, allowing modules to be initially enabled for all PHP SAPIs such as CLI, CGI, Apache Mod PHP, ETC. Make sure a symlink exists for the PHP SAPI you need to use.
To ensure your PHP is loading the extension, run phpinfo(); in a test page and search for bcmath. You can also more easily do this with the CLI using a command like:
$ php -i | grep -i bcmath
# Success output: BCMath support => enabled
# (Another command that works well for checking extensions)
$ php -m | grep -i bcmath
# Success output: bcmath
In order for the CLI to show accurate results, it must target the same php.ini file. If it doesn't, then use the -c option to temporarily point the CLI at the correct php.ini (i.e. the one being used by your Drupal site).
Add BC MATH extension for PHP 7.2
If you are getting this (https://prnt.sc/sehmd5) error then, run below command using vagrant ssh
Run these command in root of vagrant ssh
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.2-bcmath
service apache2 restart
Then open php.ini and search for bcmath
If bcmath scale is 0, Change it to 2
Restart php
Restart Apache
Hard Reload website
Install required modules
Similarly for any version of PHP, you only need to change PHP version in 3rd command.

How to install pecl memcached extension on wamp?

I need to install memcached for my windows 64bit wamp running on localhost. My specific php version is 5.5.12.
I am using version 2.2.0 of the extension found here:
http://pecl.php.net/package/memcached
How do I install the extension as it is a .tgz file?
I tried finding a working dll for this extension without any success.
Step 1:
Check in your PHP’s extension directory (like: C:\wamp64\bin\php\php5.6.25\ext) if not exists file php_memcache.dll, go to the page http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/
to download this file (depends on your PHP version) and put php_memcache.dll in your directory C:\wamp64\bin\php\php5.6.25\ext
Step 2:
Edit your file php.ini, add this line:
extension=php_memcache.dll
Step 3: restart apache
and check now your phpinfo

add "mod_wsgi-win32-ap22py27-3.3.so" module to "Apache 2.4.23 VC9" with python 2.7 installed for all users in windows 7

I have windows 7/64 bit and I have installed python 2.7 for all users and "Apache 2.4.23 VC9" from here and "mod_wsgi-win32-ap22py27-3.3.so" from here. and I have added this "mod_wsgi.so" module to modules folder in
"C:\Apache24\modules".
But when I uncomment this line "LoadModule wsgi_module modules/mod_wsgi.so"
in "C:\Apache24\conf\httpd.conf" I get an error when I run this command:
C:\Apache24\bin>httpd.exe
the error is :
"httpd.exe: Syntax error on line 181 of C:/Apache24/conf/httpd.conf: Cannot load
modules/mod_wsgi.so into server: The specified module could not be found."
I checked like tens of different Apache versions and mod_wsgi.so versions and read lots of documentation, but none of them provide practical information and none of them seems to work!!!
Apache works fine without that line in its configuration file.
Is there anybody who can actually work with Apache and mod_wsgi.so
in windows? If so can you provide the links you have used in here?
Are the links I am using to download correct?
Thanks in advance
You are using Apache 2.4, but your mod_wsgi is compiled for Apache 2.2: "mod_wsgi-win32-ap22py27-3.3.so". Look for a mod_wsgi with "ap24" in the name.
First install python 2.7 "for alle users", then get the correct mod_wsgi version. It did not load without python installed (for me).

Best way to Upgrade wamp 2.0 to 2.5

My wamp 2.0 is using around more than 100 large database and a lot of projects.I also made around more than 50 virtual host. Now I need to upgrade wamp 2.0 to 2.5.
I got some suggestion on internet that take back up of database and files , then uninstall wamp 2.0 and install 2.5 then set up every thing again, but it seems it is not a right way.
What is the best way ?
Usually I follow following steps to do it easily.
Stop Wamp Service
Rename the wamp folder to wamp-backup
Download latest version of wamp and install it
Rename the data folder of mysql with some different name
(C:\wamp\bin\mysql\mysql5.5.20)
copy data folder of mysql from wamp-backup and paste it to new
install wamp mysql folder (C:\wamp\bin\mysql\mysql5.5.20)
Rename new httpd-vhosts.conf file to httpd-vhosts-backup.conf.
Copy old httpd-vhosts.conf and paste to new installed wamp
(C:\wamp\bin\apache\Apache2.2.21\conf\extra)
In apache 2.4, the directive Allow was dropped in favor of new
directive Require. So change the settings from Order Deny,Allow
Deny from all Allow from all to Require all granted
From
Order Deny,Allow
Deny from all
Allow from all
to
Require all granted
9.The old www folder in wamp needs to be copied into the new one.
Let me know whether it's working or not.
you should do this , I recently updated it , first of all I took my Wamp directory back, then uninstall Wamp not remove the www directory , After that install the latest wamp on the same location , after this copy the folder named data inside the old wamp bin\mysql\mysql5.5.24 and paste that folder inside your new wamp on the same location then run your projects after starting the wamp services.
Note: folder version of db may be different and also latest wamp is based on virtual host so create v hosts also
Thanks
You may directly Upgrade Wampserver from Secondary repository of Wampserver files.
There are various options present on the site:
Install Wampserver full version
Wampserver Update
Addons-
Applications
Apache
PHP
MySQL
MariaDB
Also, one could directly download Tools and Visual C++ packages from here.
So, my suggestion would not be to make any changes in any file in the wamp, nor uninstall the present wamp, and download the latest version. Simply update your wampserver from this website.
There will be no change to the Apache, PHP, MySQL, and MariaDB
settings and versions used; your local sites and databases will not be
affected. This update will be necessary to be able to install the last
addons Apache, PHP, MySQL or MariaDB
Quoted from the site itself.
NOTE: Before uptading, you may just make a copy/backup of your "wamp folder" somewhere on your local machine. In case there is some issue in the update, you won't lose any file and always be able to restore your previous work.
Hope this answer helps someone, if it does kindly upvote. All the best!
To update to latest wamp version safely, use http://wampserver.aviatechno.net/
You can update complete wamp or install newer php/apache versions.

WAMP 2.4 installation of joomla 2.5.14 stuck on step 4 (database)

I saw similar questions but any of them has not correct answer. The installation of Joomla on localhost does not proceed after step 4. Database Configuration.
WAMPSERVER version 2.4
Apache 2.4.4
PHP 5.4.12
MySQL 5.6.12
Joomla_2.5.14-Stable-Full_Package
The usual reason for this is simply that php runs out of execution time.
Check your php.ini file ( use the wampmanager menus so you edit the correct version of this )
left click wampmanager -> PHP -> php.ini
This will open notepad on the correct php.ini file, look for this directive
max_execution_time = 60
Change it to something larger like
max_execution_time = 240
Then retry your install.
Remember to set it back to 60 after the install completes
if you edit the SQL install file (Root/installation/SQL/mysql/joomla.sql) in something like notepad++ and replace all "ENGINE=InnoDB" with "ENGINE=MyIsam" the DB type is more responsive to the Joomla install conditions.