Category Archives: WAMP Developer Server

“Call to undefined function mb_detect_encoding”

Fatal error:
Call to undefined function mb_detect_encoding()
in Wamp\phpMyAdmin\libraries\php-gettext\gettext.inc on line 177

This error is always related to PHP being unable to load the php_mbstring extension, because of some issue with the “php_mbstring.dll” file, or the environment.

Update PATH and Reboot OS

After installing WAMP, or using a new version of PHP, make sure to reboot/restart the system. This will:

  • Propagate the proper PATH changes that includes the location of these files.
  • Clear out any previous DLL versions that might be still loaded by the OS.

Unblock php_mbstring.dll

Go into PHP’s \ext folder, right-click on file “php_mbstring.dll”, select Properties, and at the bottom make sure the file not listed as “Blocked”. If it is, click “unblock”.
C:\WampDeveloper\Components\Php\ext\

Restart Apache.

Test Dependencies

Test for the presence of all the DLLs the php_mbstring.dll extension depends on…

Open the command-line, change to PHP’s directory, and run PHP’s deplister:

cd Components\Php
deplister ext\php_mbstring.dll
php5ts.dll,OK
MSVCR110.dll,OK
KERNEL32.dll,OK

* This will only work on some newer versions of PHP that have “deplister”.

If you see a message about MSVCR110.dll (or some similar named DLL) missing / not-found, your system is missing this run-time:
Visual C++ Redistributable for Visual Studio 2012 Update 4

You’ll need the 32 bit version: vcredist_x86.exe

This run-time is included on most current and updated OSs, but some non-updated OSs only have the 2008 version.

Reboot.

Check php.ini

Check php.ini to make sure extension “php_mbstring.dll” is being included/loaded…
C:\WampDeveloper\Config\Php\php.ini

Locate, and make sure this extension line is un-commented (no ‘;’ in front) -
extension=php_mbstring.dll

It’s loaded by default under WAMP, unless the PHP version’s php.ini was modified.

Restart Apache.

Check for older DLLs

It is possible that some PHP DLLs, from other PHP or WAMP installations, exist on your system, which should be removed.

Search your PC for files: php5ts.dll, php5.dll, php_mbstring.dll

The found location will most like be:
C:\Windows\system32

In the location you find any of the above files, you might also have a bunch of other php*.dll files that need to be deleted.

* Don’t delete anything within WAMP’s folder:
C:\WampDeveloper\

Reboot.

Check Log Files

If nothing else helps, check the Log files again -

A. Apache’s general error log – Logs\Apache\httpd.host.errorlog.txt

B. PHP’s general error log – Logs\Php\errorlog.txt (if exists)

C. And if this is specific to a website, the website’s error logs -
Logs\Websites\domain.name\http.phplog.txt
Logs\Websites\domain.name\http.errorlog.txt

In the case of http://localhost/phpmyadmin or http://127.0.0.1/phpmyadmin , that “domain.name” would be “serverhost”.

Enabling Zend Guard Loader for PHP 5.4, 5.3, or Zend Optimizer for PHP 5.2

Some PHP scripts and apps require the Zend Guard Loader or Zend Optimizer to be able to run, as their code has been encoded either to obfuscate reverse-engineering or to be licensed.

Normally, to install and use Zend Guard Loader or Zend Optimizer (to decode obfuscated PHP code, or run licensed scripts) you would need to: locate and download the proper package, match it to your PHP version and build type, and configure php.ini to set up and load the extension. Otherwise, an error message similar to “Zend Optimizer | Zend Guard Loader not loaded or installed” will be shown, such as this one:

PHP extension “Zend Optimizer” or “Zend Guard Loader” is not loaded. The required run-time support is not installed or properly configured to run PHP scripts encoded by Zend Encoder and Zend Guard.

Installing and enabling Zend Guard Loader and Zend Optimizer is made easy with WampDeveloper Pro, which includes the last good version of each Loader, their full configuration, and their matching PHP versions and types:

  1. Zend Guard Loader for PHP 5.3 FCGI.
  2. Zend Optimizer (Loader) for PHP 5.2 Regular.

Zend Guard Loader for PHP 5.4 and 5.3 FCGI

The last version of Zend Guard Loader is v3.3, and it was released for PHP 5.4 and 5.3 FCGI only (e.g., there is no “Thread Safe” build for regular PHP).

1. In WampDeveloper’s Components Tab, click the link to download the latest PHP 5.4 or 5.3 FCGI version, and extract the ZIP into folder:
C:\WamDeveloper\Versions\Php\

2. Open and edit (via notepad) PHP 5.4′s or 5.3′s php.ini file:
C:\WampDeveloper\Config\Php\php-54.ini
C:\WampDeveloper\Config\Php\php-53.ini

Near the bottom, find section “[ZendGuardLoader]“, un-comment it as such:

[ZendGaurdLoader]
; ONLY PROVIDED UNDER PHP-FCGI
; MUST BE LOADED AFTER Ioncube, AND BEFORE XDebug
zend_extension="C:\WampDeveloper\Components\Php\ext\ZendLoader.dll"
zend_loader.enable=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=

Save file.

3. In WampDeveloper's Components Tab, select PHP's 5.4 and 5.3 Subscription Channel:

Channel:  Stable
Bits:     32
PHP Type: FCGI

Then check-mark to use the proper Apache, PHP (FCGI), and MySQL versions. And click: "Switch To Selected Versions".

4. After starting Apache, check the http://serverhost/phpinfo.php page:
with-zend-guard-loader-php-53-fcgi

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

zend-guard-loader-php-53-fcgi

Zend Guard Loader

Zend Guard Loader    enabled
License Path         no value
Obfuscation level    3

Zend Optimizer (Loader) for PHP 5.2

The last version of Zend Optimizer (Loader) is v3.3.3, and it was released for PHP 5.2 only (e.g., there is no "Not Thread Safe" extension for FCGI PHP).

1. In WampDeveloper's Components Tab, click the link to download the latest PHP 5.2 Regular version, and extract the ZIP into folder:
C:\WamDeveloper\Versions\Php\

2. Open and edit (via notepad) PHP 5.2's php.ini file:
C:\WampDeveloper\Config\Php\php-52.ini

Near the bottom, find section "[Zend Optimizer]", it should already be un-commented as such:

[Zend Optimizer]
; this will make Apache crash/unstable if used with APC
zend_extension_ts="C:\WampDeveloper\Components\Php\ext\ZendOptimizer.dll"
zend_optimizer.optimization_level=0
zend_optimizer.enable_loader=1

Save file (if you made any changes).

3. In WampDeveloper's Components Tab, select PHP 5.2's Subscription Channel:

Channel:  Legacy-PHP52
Bits:     32
PHP Type: Regular

Then check-mark to use the proper Apache, PHP (FCGI), and MySQL versions. And click: "Switch To Selected Versions".

4. After starting Apache, check the http://serverhost/phpinfo.php page:
with-zend-optimizer-loader-php-52

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

zend-optimizer-loader-php-52

Zend Optimizer

Optimization Pass 1     disabled
Optimization Pass 2     disabled
Optimization Pass 3     disabled
Optimization Pass 4     disabled
Optimization Pass 9     disabled
Zend Loader             enabled
License Path            no value
Obfuscation level       3

Zend Optimizer's "optimization" has been disabled, as we only want it's "decoding" (loader) part.

Display Country Stats In Awstats By Using GeoIP

There are two different ways to get country information displayed in Awstats.

Use Reverse DNS Loopkups

The simplest way to display country stats in Awstats is to enable reverse DNS lookups for each IP address, which Awstats can attempt to parse the country info out of.

This method has two problems, the reverse DNS loopkup: 1) will greatly slow down the update process (5x-10x), and 2) is not very accurate (you’ll get allot of “unknowns”).

1. Edit your website’s awstats configuration file (via Notepad):
C:\WampDeveloper\Tools\awstats\wwwroot\cgi-bin\awstats.domain.name.conf

Update -

# Possible values:
# 0 - No DNS Lookup
# 1 - DNS Lookup is fully enabled
# 2 - DNS Lookup is made only from static DNS cache file (if it exists)
# Default: 2
# 
DNSLookup=1

2. Delete old awstats data files:
C:\WampDeveloper\Tools\awstats\wwwroot\data\*

3. And in URL /stats, click to “Update now”.

Use AWStats GeoIP Plugin

To get more accurate and faster country results in Awstats, use its GeoIP plugin…
http://awstats.sourceforge.net/docs/awstats_contrib.html#geoip

1. Install the Perl “Geo::IP::PurePerl” module:

Open command-line and execute -

perl -MCPAN -e shell;
install Geo::IP::PurePerl
exit

2. Download GeoIP database:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz

Extract/place GeoIP.dat file into folder -
C:\WampDeveloper\Tools\GeoIP\

3. Update awstats configuration file for website:

Edit your website’s awstats configuration file (via Notepad) -
C:\WampDeveloper\Tools\awstats\wwwroot\cgi-bin\awstats.domain.name.conf

Load plugin GeoIP (uncomment and update line) -

LoadPlugin="geoip GEOIP_STANDARD C:/WampDeveloper/Tools/GeoIP/GeoIP.dat"

Save file.

4. Delete old awstats data files:
C:\WampDeveloper\Tools\awstats\wwwroot\data\*

5. And in URL /stats, click to “Update now”.

You will have to periodically re-download the database file (which can be automated via Windows Task Scheduler and wget). Also, it’s the free version of MaxMind’s GeoIP offering, how often it’s updated is unknown.

* We are using “Geo::IP::PurePerl” instead of “Geo::IP” because the later depends on additional GeoIP C libraries that are not provided (extra steps would need to be taken to build/compile them).

How To Access Local Website from Internet

The sites work fine on local host, but not on the internet.

Most WAMP Servers such as WampDeveloper Pro accept all incoming connections by default. Even when a request comes in for an unknown website (i.e., the domain name or IP address is not assigned to any website), Apache is configured to return the default website – localhost (the 1st Virtual Host loaded).

If you are unable to make a connection from the internet to your website, then the request did not reach Apache.

When this happens, Chrome (browser) displays “This webpage is not available” message, and clicking on Details shows Error code: ERR_CONNECTION_TIMED_OUT

this-webpage-not-available

IE (browser) produces a more generic “Internet Explorer cannot display the webpage” message, without any specific error code…

ie-cannot-display-webpage

The most common cause of this are:

  1. Local Firewall software such as McAfee, Norton, and Windows Firewall blocking incoming port 80 and 443 requests.
  2. Bad or missing port-forward rules in the Router.
  3. Router settings blocking internet traffic via internal firewall or configuration.
  4. Network firewall or appliances dropping incoming port 80 and 443 requests.
  5. The ISP blocking incoming port 80 and 443 requests.
  6. Changing IPs (both the LAN IP and Public IP), and/or bad DNS records for domains.
  7. Within LAN or Corporate Network, local network proxy settings that are taking the domain-name resolve to somewhere else.

To troubleshoot the issue -

1. Delete all auto-created Windows Firewall rules for “Apache” or “HTTPD”. Create general rules to open port 80 and 443 TCP. Once Apache is started again, when notified/prompted by the firewall, click to unblock Apache.

Also turn all other firewall and anti-virus software off when testing everything… McAfee, Norton, Kaspersky, etc.

2. Access the Router via URL: http://lan-ip.of.router/, and once in, go over it’s setting to make sure it’s not blocking internet traffic.

Then remove all port-forwarding rules, and create the proper rules to forward all WAN:80 and WAN:443 traffic (internet requests) to LAN:80 and LAN:443 (the LAN IP of server).

The Public IP will be assigned to the first device connected to the ISP (which is usually the Router), and that is the reason why the Router needs the proper port-forwarding rules – so that it can forward incoming internet traffic requests to the proper LAN system.

3. When testing this, bypass DNS and domain-names by using the IP address directly:

A) Assigning both the Public IP address and LAN IP address as Domain Aliases of a website.
B) Turning off Redirects from Aliases to Primary Domain Name.
C) And just use the Public IP address, as URL: http://public.ip.address/, to access your website.

4. Verify that you are using the right Public IP and LAN IP addresses. These IPs can change time to time.

5. Also, test the connection from another LAN system via URL:http://lan.server.ip.address/ and http://computer-name/. If this is not working, there is an issue within the local network.

Notes

Being able to successfully ping the Public IP will tell you nothing about the situation… Pings work differently from HTTP connections. If a ping comes back, all that signifies is that the Router settings have pings enabled, and your Router is able to ping you back.

If Apache is running, then it was successful in binding to port 80 and 443, and it’s not a problem with another web-facing service or application (like Skype) taking these ports.

Enabling Online and Internet Access of Websites For WAMP Server

Accessing Websites on a Local Network (LAN) Web Server

Limiting Access To Apache’s VirtualHosts To Local Network (LAN) Only

To only allow connections to websites from machines that are on your local network (LAN), while blocking everyone coming from the Internet, edit the website’s HTTP and SSL VirtualHost files and update the website’s <Directory> configuration…

From – All Access:

Options All

AllowOverride All

Order allow,deny
Allow from all

To – LAN Access Only:

Options All

# All directives except Limit directives (allow, deny, order)
AllowOverride AuthConfig FileInfo Indexes Options=All

Order deny,allow
Deny from all

Allow from localhost

# IPv4
Allow from 127.0.0.0/8       # IPv4 Loopback Addresses
Allow from 169.254.0.0/16    # IPv4 Link-local Addresses
Allow from 10.0.0.0/8        # IPv4 Normal LAN Address Space
Allow from 172.16.0.0/12     # IPv4 Normal LAN Address Space
Allow from 192.168.0.0/16    # IPv4 Normal LAN Address Space

# IPv6
# For Apache 2.4 and up only
<IfVersion >= 2.4>
Allow from ::1/128           # IPv6 Loopback Addresses
Allow from fe80::/10         # IPv6 Link-local Addresses
Allow from fc00::/7          # IPv6 Unique Local Addresses (LAN Space)	
</IfVersion>

Changing AllowOverride All to remove Limit directives (allow, deny, order) restricts further .htaccess files from overriding the above Allow from configuration.

To use the IfVersion directive this module should be loaded by Apache -

LoadModule version_module modules/mod_version.so

To use the allow, deny, and order directives on Apache 2.4 this module should be loaded -

LoadModule access_compat_module modules/mod_access_compat.so

Private Network Addresses

Running PHP Scripts Outside of DocumentRoot

In some WAMP configurations, PHP execution is only enabled under a specific root folder and given path (instead of for any *.php filename under any folder or path).

For example, under WampDeveloper Pro, PHP is enabled for all *.php files under the path of:
C:\WampDeveloper\Websites\*\webroot\

There are two ways to enable the execution (running) of PHP scripts outside of a website’s DocumentRoot (\webroot) folder…

* In this example we’ll enable the running of PHP scripts in folder: D:\Folder\path\

JunctionPoint Into DocumentRoot

The preferred way to enable PHP in an outside folder is to keep the existing configuration (by not adding anything to it), and creating a “JunctionPoint” to link…

1. A folder inside a website’s DocumentRoot:
C:\WampDeveloper\Websites\www.example.com\webroot\path\

2. Into the PHP web-app/script folder:
D:\Folder\path\

Open the command line (with elevated privileges) and execute:
mklink /j C:\WampDeveloper\Websites\www.example.com\webroot\path D:\Folder\path

This will create folder C:\WampDeveloper\Websites\www.example.com\webroot\path and link it to D:\Folder\path. The former will have all the proper configurations enabled (from the base WAMP configuration), and with all the files/folders of the later.

* The only limitation here is that the target folder needs to be a local volume (e.g., can’t be a networked drive).

Enable PHP Directly For a Specific Folder

The second option is to directly enable PHP execution in the specific folder by placing this into a website’s VirtualHost, or into the global configuration (included into httpd.conf via Config\Apache\extra\wampd-custom.conf):

Alias /path/ "D:/Folder/path/"

<Directory "D:/Folder/path">
    Options All
    AllowOverride All
    Order allow,deny
    Allow from all

    # PHP-FCGI
    <IfModule mod_fcgid.c>        
        AddHandler fcgid-script .php .php4 .php5
        Options +ExecCGI +FollowSymLinks

        FcgidWrapper "C:/WampDeveloper/Components/Php/php-cgi.exe" .php virtual
        FcgidWrapper "C:/WampDeveloper/Components/Php/php-cgi.exe" .php4 virtual
        FcgidWrapper "C:/WampDeveloper/Components/Php/php-cgi.exe" .php5 virtual
    </IfModule>

    # Apache 2.2 and 2.4 / PHP5
    <IfModule mod_php5.c>
        AddType text/html .php .phps
        AddHandler application/x-httpd-php .php
        AddHandler application/x-httpd-php-source .phps
    </IfModule>

    # Apache 2.2 / PHP 4.4
    <IfModule php4_module>
        AddType text/html .php .phps
        AddHandler application/x-httpd-php .php
        AddHandler application/x-httpd-php-source .phps
    </IfModule>

    # Apache 2.0 / PHP 4.4
    <IfModule sapi_apache2.c>
        AddType text/html .php .phps
        AddHandler application/x-httpd-php .php
        AddHandler application/x-httpd-php-source .phps
    </IfModule>
</Directory>

* The limitation with this option is that while this will enable PHP execution in the specific folder, this folder will not inherit any other configuration of the base WAMP setup.

Installing and Using ImageMagick with Imagick PHP Extension (php_imagick.dll) on WAMP

The php_imagick extension enables WAMP servers such as WampDeveloper Pro to create, edit, convert, and/or manipulate images via PHP using the ImageMagick software on Windows.

WampDeveloper Pro comes integrated with both the ImageMagick package and the Imagick PHP extension.

To enable the Imagick PHP Extension in WampDeveloper Pro:

1. Open file php.ini -
C:\WampDeveloper\Config\Php\php.ini

2. Near the end of php.ini, locate the ImageMagick section -

[ImageMagick]
;extension="C:\WampDeveloper\Components\Php\ext\php_imagick\php_imagick.dll"
;imagick.locale_fix=0
;imagick.progress_monitor=0

3. Un-comment the load line for this extension (remove the ‘;’ character from the beginning of the line) -

[ImageMagick]
extension="C:\WampDeveloper\Components\Php\ext\php_imagick\php_imagick.dll"

4. Save file. Restart Apache.

Afterwards, Imagick will be loaded by PHP and you can verify this via phpinfo.php…

imagick

5. Test imagick:

A. Create a scaled thumbnail image…

<?php

// if full path is not specified, will look for file in Apache's folder.

$im = new imagick('C:\WampDeveloper\Websites\www.example.com\webroot\imagick\pic.jpg');

// resize by 200 width and keep the ratio
$im->thumbnailImage(200, 0);

// if full path is not specified, file will end up in Apache's folder.

// write to disk
$im->writeImage('C:\WampDeveloper\Websites\www.example.com\webroot\imagick\pic_thumbnail.jpg');

echo 'Image Thumbnail Created.';

?>

B. Covert JGP image to PNG image format…

<?php

$image = 'C:\WampDeveloper\Websites\www.example.com\webroot\imagick\pic.jpg';

// a new imagick object
$im = new Imagick();

// ping the image
$im->pingImage($image);

// read the image into the object
$im->readImage($image);

// convert to png
$im->setImageFormat("png");

// write image to disk
$im->writeImage('C:\WampDeveloper\Websites\www.example.com\webroot\imagick\pic.png');

echo 'Image Converted.';

?>

Connecting PHP to MS SQL Server

php_sqlsrv.dll is PHP’s Database Driver for MS SQL Server, that has replaced php_mssql.dll (which no longer exists with PHP 5.3 and above).

While the php_sqlsrv API is not the same as the php_mssql API, php_sqlsrv can be used through php_pdo_sqlsrv which provides the common PDO Database interface that can access MS SQL Server.

There is 1 official build of php_sqlsrv.dll by Microsoft that is provided for PHP 5.3. And several unofficial builds of php_sqlsrv.dll for PHP 5.6, 5.5, 5.3 (32 bit and 64 bit).

PHP 5.5 Driver for MS SQL Server

Download the unofficial builds maintained here:
http://robsphp.blogspot.co.uk/2012/06/unofficial-microsoft-sql-server-driver.html

In the OneDrive folder, right-click on file “sqlsrv_unofficial_3.0.2.2.zip” and select “Download”.

Inside of file sqlsrv_unofficial_3.0.2.2.zip, extract these files out:

Into:
C:\WampDeveloper\Versions\Php\php-5.5.16.0-r2-win32-vc11-standard\ext\

Files:
php_pdo_sqlsrv_55_ts.dll
php_sqlsrv_55_ts.dll

Into:
C:\WampDeveloper\Versions\Php\php-5.5.16.0-r2-win32-vc11-standard-fcgi\ext\

Files:
php_pdo_sqlsrv_55_nts.dll
php_sqlsrv_55_nts.dll

* The above PHP versions are WampDeveloper Pro’s (v5.1.0.1) latest PHP 5.5 releases (regular PHP and FCGI-PHP).

Microsoft’s PHP 5.3 Driver for MS SQL Server

Download the official build maintained here:
http://www.microsoft.com/en-us/download/details.aspx?id=20098

Download file:
SQLSRV30.EXE

This file is not really an EXE (it’s a compressed CAB file), and if you try to run it Windows will display error message: “sqlsrv30.exe is not a valid win32 application”.

You will need to open (not run) SQLSRV30.EXE with either of these un/compression programs: WinRar, or 7-Zip (I use 7-Zip myself, it’s free and open source).

Inside of file SQLSRV30.EXE, extract these files out:

Into:
C:\WampDeveloper\Versions\Php\php-5.3.29.0-r2-win32-vc9-standard\ext\

Files:
php_pdo_sqlsrv_53_ts.dll
php_sqlsrv_53_ts.dll

Into:
C:\WampDeveloper\Versions\Php\php-5.3.29.0-r2-win32-vc9-standard-fcgi\ext\

Files:
php_pdo_sqlsrv_53_nts.dll
php_sqlsrv_53_nts.dll

* The above PHP versions are WampDeveloper Pro’s (v5.1.0.1) latest PHP 5.3 releases (regular PHP and FCGI-PHP).

Then via Components Tab, switch WampDeveloper from using Channel: Current (Apache 2.4 + PHP 5.5 + MySQL 5.6) to Stable (Apache 2.2 + PHP 5.3 + MySQL 5.5)…
http://www.devside.net/wamp-server/howto-switch-wampdevelopers-apache-php-mysql-branches

Load php_sqlsrv.dll

Rename the files under all PHP versions to:
php_pdo_sqlsrv.dll
php_sqlsrv.dll

Edit file php.ini, and insert the loading of “php_sqlsrv.dll”…

[PHP_SQLSRV]
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll

Save file. Restart Apache.

Links

“Microsoft Drivers for PHP for SQL Server” project

http://sqlsrvphp.codeplex.com/

“Update For PHP 5.5″ discussion

http://sqlsrvphp.codeplex.com/discussions/441706

“Data Developer Center SQL Server Driver for PHP” page

http://msdn.microsoft.com/en-us/data/ff657782.aspx

“Accessing SQL Server Databases from PHP”

http://social.technet.microsoft.com/wiki/contents/articles/1258.accessing-sql-server-databases-from-php.aspx

Unable to load or find PHP extension php_intl.dll

PHP Startup: Unable to load dynamic library ‘C:/wamp/path/to/php/ext/php_intl.dll’ – The specified module could not be found.

PHP says it can’t find extension php_intl.dll, yet file “php_intl.dll” does exist in the specified location!

This is a very common issue, especially under PHP 5.5, and can easily be fixed…

To see why PHP cannot load extension php_intl.dll, open the command line, change to WAMP’s PHP directory, and test php_intl.dll’s dependencies:

C:
cd  WampDeveloper\Components\Php
deplister.exe ext\php_intl.dll

This is a list of all the DLLs php_intl.dll must load, before it can be loaded itself:

# Core PHP DLL
php5ts.dll,OK

# International Components for Unicode (ICU) libraries - Unicode and Globalization support
icuuc51.dll,OK
icuin51.dll,OK
icuio51.dll,OK

# Microsoft VC++ 2012 Runtime libraries - common functions required by C and C++ programs
MSVCR110.dll,OK
MSVCP110.dll,OK

# Core Windows DLL
KERNEL32.dll,OK

The “ICU” and/or the” VC++ Runtime” DLLs will not be found (displayed as “NOTFOUND” instead of “OK”) on the system with this issue.

And when php_intl.dll is not able to find and load these dependencies, PHP outputs:

"The specified module could not be found."

Here is how to fix the issue and load php_intl.dll:

1. Make sure the PHP directory path is included in the system’s PATH environmental variable so this set of provided/included ICU DLLs (that php_intl.dll depends on) are found:

icuuc51.dll, icuin51.dll, icuio51.dll

* WampDeveloper Pro already includes PHP’s directory in PATH, but some other WAMP distributions do not.

2. Install the Microsoft VC++ 2012 Runtime Redistributable that will provide these VC11 runtime DLLs (PHP 5.5 is built with VS.NET 2012):

MSVCR110.dll, MSVCP110.dll

Visual C++ Redistributable for Visual Studio 2012 Update 4

Make sure to install the 32 bit (x86) version if you are using a 32 bit PHP build: vcredist_x86.exe

* Unlike PHP 5.5, PHP 5.3 is built with VS.NET 2008 (VC9), and depends on “Visual C++ Redistributable for Visual Studio 2008″ which provides runtime DLLs: MSVCR90.dll, MSVCP90.dll

Removing Sender’s IP Address From Email’s Received: From Header

When sending an email, Sendmail and other SMTP servers, will log your originating device’s: name (hostname or computer name), IP address, and IP’s reverse DNS lookup, into the first “Received: from” Header line…

Received: from computer.name (ip-address.reverse.lookup [ip.address])

This is a problem because:

  1. It’s sensitive information that contains your location.
  2. It can further contain meta-data about your reader (ex: Outlook, Windows Live Mail, Mail App, Mozilla Thunderbird).
  3. Spam tools will detect a Residential IP address which will prevent email delivery.

The solution to hide the client’s (sender’s) IP address is to redefine the SMTP server’s use of RECEIVED_HEADER.

The standard definition of this header can be found in file:
/usr/share/sendmail-cf/m4/cfhead.m4

define(`_REC_AUTH_', `$.$?{auth_type}(authenticated')
define(`_REC_FULL_AUTH_', `$.$?{auth_type}(user=${auth_authen} $?{auth_author}author=${auth_author} $.mech=${auth_type}')
define(`_REC_HDR_', `$?sfrom $s $.$?_($?s$|from $.$_)')
define(`_REC_END_', `for $u; $|;
        $.$b')
define(`_REC_TLS_', `(version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify})$.$?u')
define(`_REC_BY_', `$.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}')
define(`confRECEIVED_HEADER', `_REC_HDR_
        _REC_AUTH_$?{auth_ssf} bits=${auth_ssf}$.)
        _REC_BY_
        _REC_TLS_
        _REC_END_')

To strip out all private info (senders’s/client’s IP address) of the initial client connection, you would basically remove that entire connection’s info (and also of all the connections before it), and make it look like the email originated from the SMTP server itself…

Edit file:
/etc/mail/sendmail.mc

define(`confRECEIVED_HEADER',`by $j ($v/$Z)$?r with $r$. id $i; $b')dnl

Then rebuild sendmail.cf and restart sendmail:

[root@private mail]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
[root@private mail]# service sendmail restart

Done.

I’ve been doing this for YEARS without any issues whatsoever to be able to send out emails from my PC (using Outlook and Windows Live Mail) to my clients without triggering spam filters, and to prevent privacy leaks.