Apache Version : 2.4.2
MySQL Version : 5.5.27
PHP Version : 5.4.11
EasyPHP Version : 12.1
Operating System : Windows 7 - Home Premium (64-bit)
OS Version : 6.01.7601 Service Pack 1
For a few hours, I could not get PHP to run in the command line.
And it all revolved around trouble with YAZ.
I really hope this helps someone else from going down the rabitt hole like I did.
The Problem
1. I clicked the Windows 7 Start button
2. I went to the command prompt by typing cmd.exe (right click to make sure I was running as administrator)
3. I traveled to the directory where EasyPHP has PHP installed, which was
C:\EasyPHP\EasyPHP-12.1\php\php5411x130215105458
4. I typed php –i.
5. I received an error that the dynamic library “php_yaz.dll” could not be loaded.
6. I go to C:\EasyPHP\EasyPHP-12.1\php\php5411x130215105458 and look for yaz4.dll. Instead I find yaz.dll.
7. I found the same thing in C:\Windows\System32, that is, yaz.dll, and not yaz4.dll.
The Solution
1. I look in the following files to make sure “extension=php_yaz” is uncommented.
C:\EasyPHP\EasyPHP-12.1\easyphp.ini
C:\Windows\php.ini
C:\EasyPHP\EasyPHP-12.1\php\php5411x130215105458\php.ini
2. I look in the following file to make sure the extension_dir is correct and uncommented
C:\EasyPHP\EasyPHP-12.1\php\php5411x130215105458\php.ini
“extension_dir = "C:\EasyPHP\EasyPHP-12.1\php\php5411x130215105458\ext\”
3. I run a utility called Dependency Walker to drill down into PHP_YAZ.DLL:
The DLL file is located in this path:
C:\EasyPHP\EasyPHP-12.1\php\php5411x130215105458\ext\PHP_YAZ.DLL
4. Dependency Walker just tells me that it cannot locate yaz4.dll (along with GPSVC.dll, but that made no diff in the end)
5. If your still following me, I download the yaz package at
[
pecl.php.net].
6. I unpack the yaz package.
7. I navigate to the bin directory in the yaz package
8. I copy paste the following files from yaz/bin into these directories
Into the php5411x130215105458 directory
Into the apache/bin directory
yaz4.dll
iconv.dll
libxml2.dll
libxslt.dll
zlib1.dll
I don't think I've left anything out. Hopefully this helps someone.
Jon