Updating to PHP5.5.2.

   At Aug-16 02:13:06UTC, they released PHP5.5.2. So, I downloaded a Thread Safe version php-5.5.2-Win32-VC11-x86.zip for my server (Windows7HP+SP1(x86)). It requires VC11. If you don’t have VC11 on your Windows, you must install vcredist_x__.exe before the PHP configuration.

   Acoording to the ChangeLog, it has some bug fixes and includes the patch for CVE-2013-4248.

   The new php.ini-production has two difference from the php.ini-production of version 5.5.1.
   The line “;extension=php_zip.dll” doesn’t exist anymore.
   Edit typos: mssql.compatability_mode = Off —> mssql.compatibility_mode = Off

   As the official PHP binary includes php5apache2_4.dll, I extract the zip archive and replace all PHP5.5.1 files with all PHP5.5.2 files except my php.ini. Then, I restart my Apache. That’s it.

   If you need how to configure PHP5.5, please see the post. It is for a mbstrings user, but the information gives some help for you.

To create a Wamp-like Web Server in Windows7-#4.

   Continued from my last post.

Enabled SSL.

  1. Copy cacert.pem, server.crt, server.key to the Apache conf directory.

    If you need how to make these three files, please see WordPress: Administration Over SSL #1.

    I think a cmd.exe on a Windows7 recognizes both slashes(/) and backslashes(\) in a openssl.cnf. Maybe, you need not use “\\” in the openssl.cnf when you customize it. On a Windows7, you can see a openssl.cnf as a openssl.conf instead of openssl, a file type “SpeedDial”. Ha-ha-ha.

  2. Customize the file httpd-ssl.conf in the Apache extra conf directory.
    If you need how to customize, please see WordPress: Administration Over SSL #1.
  3. Customize the file httpd.conf.
    If you need how to customize, please see WordPress: Administration Over SSL #1.
  4. Control Panel >> Administrative tools >> Windows Firewall with Advanced Security >> Inbound Rules
    Add the port 443 to “Apache HTTP Server”.

    By the way, if you accept about the port alert from your Windows Firewall, the rules are created automatically. But they seem too looser for the Web Server wares. At “Windows Firewall with Advanced Security” you can strictly set up them. So, you should use this advanced feature.

  5. Restart the Apache.

   Mission Complete!

To create a Wamp-like Web Server in Windows7-#3.

   Continued from my last post.

The installation of MySQL 5.6.

  1. Download mysql-5.6.12-win32.zip.
  2. Extract the Zip archive.
  3. Make the directory ‘MySQL’ in Drive_SV (A partition for server wares I made), then, install the directories and files to the MySQL. You can install all of extracted things. But, I only installed the next 5 directories and 2 files because I do not use others on my server by remote.
    • directories
    • files
        my.ini  <---   Copy of the my-default.ini.
  4. Customize the my.ini file. (See Creating an Option File)
        # basedir = …..  —>  basedir = Drive_SV:/MySQL   (*) not a backslash(\) but a slash(/).
        # datadir = …..  —>  datadir = Drive_SV:/MyDATA
    Add the next line.
        explicit_defaults_for_timestamp = true
  5. Move the data directory (Current location:Drive_SV:\MySQL\data) to Drive_SV: and rename to MyDATA.
  6. Run a cmd.exe as an Administrator.
    >cd Drive_SV:\MySQL\bin
    >mysqld --console    (See Starting the Server for the First Time)

    2013-07-30 08:22:26 3484 [Note] Plugin ‘FEDERATED’ is disabled.
              ・                 ・
              ・                 ・
    2013-07-30 08:22:27 3484 [Warning] No existing UUID has been found, …………
              ・                 ・
              ・                 ・
    2013-07-30 08:22:27 3484 [Note] mysqld: ready for connections.
    Version: ‘5.6.12’ socket: ” port: 3306 MySQL Community Server (GPL)

    If you have other errors or warnings, customize the my.ini again. If having an alert about the port 3306 from Windows Firewall, you may accept it.

    Run another cmd.exe as an Administrator.
    >cd Drive_SV:\MySQL\bin
    >mysqladmin -u root shutdown

  7. Run a cmd.exe as an Administrator.
    >cd Drive_SV:\MySQL\bin
    >mysqld.exe --install
  8. Control Panel >> Administrative tools >> Services
    Select the MySQL Service name and start
    If its ‘Startup Type’ is not ‘Automatic’, you have to change it to ‘Automatic’.
  9. Add the directory Drive_SV:\MySQL\bin to the Path.

    Change root password.

    Run a cmd.exe as an Administrator.
    >mysql -u root
    >SET PASSWORD FOR root@localhost=PASSWORD(‘password’);
    > quit

    Logon check.
    >mysql -u root -p
    Enter password: ************
    > quit

The installation of phpMyAdmin4.

  1. Download phpMyAdmin-
    Extract the Zip archive.
  2. Rename the directory phpMyAdmin- to phpMyAdmin.
    Remove the config.sample.inc.php in the extracted files.
    Remove three directorates: doc, examples, and setup.
    Copy my old config.inc.php in the phpMyAdmin. (If you don’t have an old config.inc.php, see Quick Install.)

    Move the phpMyAdmin to Drive_SV.

  3. Make an extra conf file as phpMyAdmin.conf in Drive_SV:\Apache24\conf\extra\.
    The text of phpMyAdmin.conf:
         Alias /phpMyAdmin “Drive_SV:/phpMyAdmin/”

         <Directory “Drive_SV:/phpMyAdmin”>
              Options None
              AllowOverride None
              Require ip Lan IP range.
         <Directory “Drive_SV:/phpMyAdmin/libraries”>
              Require all denied

    Customize the httpd.conf (Location:Apache24\conf\).
    Add the next two lines to at the end of the Supplemental configuration section:
         # phpMyAdmin settings
         Include conf/extra/phpMyAdmin.conf

  4. Restart Apache.
    Access http://xxx.xxx.xxx.xxx/phpMyAdmin

         Username: root
         Password: MySQL root password

    I have the caution:
         The phpMyAdmin configuration storage is not completely configured,
        some extended features have been deactivated. To find out why click here.

    So, to configure the phpMyAdmin configuration storage, I import my old database phpmyadmin. (If you don’t have an old database phpmyadmin, see phpMyAdmin configuration storage.)

  5. Log out, and log in. The caution has gone.
  6. Delete all users except root@localhost.

    Make a user(WP-User) and a database(WPdatabase) for the WordPress.
    WP-user was given all Global privileges except Grant. WP-user was given no Global privileges and was given all WPdatabase privileges except Grant. Their collation is utf8_general_ci.

  7. Log out.

To create a Wamp-like Web Server in Windows7-#2.

Update information      Edit(Dec.27)    Edit2(2014.Mar.24)

   Continued from my last post.

The installation of ActivePerl.

  1. Download ActivePerl-
  2. Install ActivePerl- into Drive_SV (A partition for server wares I made) by the default.
  3. Run a cmd.exe
    >perl -v
    If you get the version information, the directory Perl is already added to the Path.
  4. Customize the printenv.pl file (Location:Apache24\cgi-bin\).
    #!D:/programs/perl/bin/perl.exe  —>  #!Drive_SV:/Perl/bin/perl.exe

    Move printenv.pl from Apache24\cgi-bin\ to drive_DC:\WEB\cgi-bin.
    Access http://xxx.xxx.xxx.xxx/cgi-bin/printenv.pl from a web browser.

    If you have the server environment variables list, the installation is complete.

  5. Remove printenv.pl.
  6. (*) To use CGI scripts outside of ScriptAliased directories, you will need directive AddHandler: (You will also need to add “ExecCGI” to the “Options” directive.)

The installation of PHP5.5.

  1. Actually, on Jun 20th PHP5.5 was released, but, this doesn’t support WindowsXP anymore. So, until now, I wasn’t able to use it if I wanted to use it. Now, I have a Windows7 on Xw4200, so I downloaded php-5.5.1-Win32-VC11-x86.zip. This is a thread safe version because my web server software is Apache and OS is Windows. To confirm about this thing, please read the install.txt of PHP by yourself.
    Extract the Zip archive.
    Rename the directory php-5.5.1-Win32-VC11-x86 to PHP.
  2. Copy the file php.ini-production as the file php.ini. Customize the php.ini file (Location:PHP\).
      Default Custom
    1 ;default_charset = "UTF-8" default_charset = "UTF-8"
    2 ; extension_dir = "ext" extension_dir = "Drive_SV:\PHP\ext\"
    3 allow_url_fopen = On allow_url_fopen = Off
    4 ;extension=php_curl.dll extension=php_curl.dll
    5 ;extension=php_gd2.dll extension=php_gd2.dll
    6 ;extension=php_mbstring.dll extension=php_mbstring.dll
    7 ;extension=php_mysql.dll extension=php_mysql.dll
    8 ;extension=php_mysqli.dll extension=php_mysqli.dll
    9 ;extension=php_openssl.dll extension=php_openssl.dll
    10 ;date.timezone = date.timezone ="Asia/Tokyo"
    11 ;sendmail_from = me@example.com sendmail_from = My email address
    12 ;mbstring.language = Japanese mbstring.language = Japanese
    13 ;mbstring.internal_encoding = UTF-8 mbstring.internal_encoding = UTF-8
    14 ;mbstring.http_input = UTF-8 mbstring.http_input = pass
    15 ;mbstring.http_output = pass mbstring.http_output = pass
    16 ;mbstring.encoding_translation = Off mbstring.encoding_translation = Off
    17 ;mbstring.detect_order = auto mbstring.detect_order = UTF-8,ASCII,SJIS,EUC-JP,JIS
    18 ;mbstring.substitute_character = none mbstring.substitute_character = none

    (*) About the 14-18, it should work by leaving the default. The above 14-18 customization is particularly for my server.

    Three additional settings by the security reason. The 19 and 21 settings might give some troubles on your server. It depends on your server environment. (Edit:Dec.27).

      Default Custom
    19 output_buffering = 4096 output_buffering = Off
    20 expose_php = On expose_php = Off
    21 mysql.allow_persistent = On mysql.allow_persistent = Off
  3. Move the directory PHP to Drive_SV.
  4. Make an extra conf file as php55.conf in Drive_SV:\Apache24\conf\extra\.
    The text of php55.conf:
         LoadModule php5_module “Drive_SV:/PHP/php5apache2_4.dll”
         AddHandler application/x-httpd-php .php
         PHPIniDir “Drive_SV:/PHP”

    Customize the httpd.conf (Location:Apache24\conf\).
         DirectoryIndex index.html  —>  DirectoryIndex index.php index.html
    Add the next two lines to at the end of the Supplemental configuration section:
         # PHP settings
         Include conf/extra/php55.conf

  5. Make a php file as test.php in drive_DC:\WEB\htdocs
    The text of test.php:
         <?php phpinfo() ?>
  6. Restart Apache.

    Access http://xxx.xxx.xxx.xxx/test.php from a web browser.

    If you have the phpinfo list, the installation is complete.

  7. Remove test.php.
  8. Customize the php.ini (Location:PHP\).
         ;disable_functions =  —>  disable_functions =”shell_exec, suexec, passthru, phpinfo”
  9. Restart Apache.

   I enabled the Opcache on 2013 Dec. 27. If you use a lot of PHP scripts on your server, I also recommend the post “Enabled Opcache”.

To create a Wamp-like Web Server in Windows7-#1.

Update information      Edit(Aug.11)

   Yesterday, I had the PC which was installed Windows7HP+SP1(x86) as I wrote the article. It is good for me to create a new Wamp-like Web Server.

   First I make two partitions. One for server wares(Drive_SV), another for other files(drive_DC).

   By the way, during creation, Windows Firewall gives alerts several times. At the time, confirm and open required ports. Well, let me get started.

The installation of the Apache HTTP Server.

  1. Download httpd-2.4.6-win32-VC11.zip.
    It requires VC11. So, I downloaded and installed vcredist_x86.exe.
    Extract the Zip archive.
  2. Customize the httpd.conf file in extracted files (Location:Apache24\conf\).
      Default Custom
    1 ServerRoot “c:/Apache24” ServerRoot “Drive_SV:/Apache24”
    2 ServerAdmin admin@example.com ServerAdmin My email address
    3 #ServerName www.example.com:80 ServerName xxx.xxx.xxx.xxx:80
    4 DocumentRoot “c:/Apache24/htdocs” DocumentRoot “drive_DC:/WEB/htdocs”
    5 <Directory “c:/Apache24/htdocs”> <Directory “drive_DC:/WEB/htdocs”>
    6 Options Indexes FollowSymLinks Options FollowSymLinks
    7 ErrorLog “logs/error.log” ErrorLog “|bin/rotatelogs.exe -l -f logs/error.%Y.%m.%d 86400”
    8 CustomLog “logs/access.log” common # CustomLog “logs/access.log” common
    9 #CustomLog “logs/access.log” combined CustomLog “|bin/rotatelogs.exe -l -f logs/access.%Y.%m.%d 86400” combined
    10 ScriptAlias /cgi-bin/ “c:/Apache24/cgi-bin/” ScriptAlias /cgi-bin/ “drive_DC:/WEB/cgi-bin/”
    11 <Directory “c:/Apache24/cgi-bin”> <Directory “drive_DC:/WEB/cgi-bin”>
    12 Require all granted Require ip Lan IP range (Access control to cgi-bin directory)
    13   ServerTokens Prod
  3. Move the directory Apache24 to Drive_SV.
  4. Run a cmd.exe as an Administrator.
    >cd Drive_SV:\Apache24\bin
    >httpd.exe -t
    If having error messages, you have to fix them before continuing procedures.

    Install as a Service:
    >httpd.exe -k install
    Make an ApacheMonitor.exe shortcut in the Windows Startup folder. Start Apache.

  5. Move index.html from Apache24/htdocs to drive_DC:\WEB\htdocs
    Access http://xxx.xxx.xxx.xxx/ from a web browser.
    If you have “It works!”, the installation is complete.
  6. Remove index.html.

   These days, I was in trouble because my Apache sometimes made no response. At that time, I think the error log gave me the message “(OS 64)The specified network name is no longer available. : AH00341: winnt_accept: Asynchronous AcceptEx failed.”, so I added the next lines my httpd.conf. (Ref:AcceptFilter Directive)

   <IfModule mpm_winnt_module>
      AcceptFilter http none
      AcceptFilter https none

Upgrading from WinXpPro+SP3(x86) to Win7HP+SP1(x86).

   On 2014.Apr.8, Extended Support of Windows XP support ends completely, so I planed to change my server OS to CentOS until the day. But, fortunately, one of my friends gave me ‘Microsoft Windows 7 Home Premium, Upgrade Edition for XP or Vista users’ DVD. I think this is no problem for a license. Because the friend doesn’t use this Win 7 anymore. Am I right?

   Immediately, I installed Windows7HP+SP1(x86) on HP xw4200 Workstation. This is a previous server machine. About this PC, I wrote some articles on the Japanese Blog.

   When you use the upgrade DVD, you need a target OS, of course. So, I installed WinXpPro+SP3(x86) first, and upgraded. By the way, when you upgrade from XP to 7, you have to choose Custom (advanced) type of installation.

   During upgrading, the PC gave me the next message several times. Grrr.
     ***Hardware Malfunction
     Call your hardware vendor for support
     NMI:Parity Check / Memory Parity Error
     ***The system has halted***

   I used Memtest86+ and checked it out, but I had no error.

   Fortunately, I found the page “***Hardware Malfunction Call your Hardware Vendor for Support NMI: Parity Check/Memory Parity Error *** The system has halted ***” at last. (PDF file here.)

   I tried and tested this solution, and then, I installed Windows7 completely. I am still afraid of the error above occurring. But, there is as yet no sign of error.

   Well, I got a Windows7 Desktop PC. Now, my weak heart thinks a Windows7 server instead of a CentOS server. Because, I am a Windows person. (^^;)