Problems Installing/Running PHP Mail on Windows 2003.
Problem:
Email generation in PHP scripts fails.
Solution:
1. You must install PEAR extension to PHP when either installing PHP or modifying it's installation via Control Panel -> Add/Remove Programs.
2. If you install the PEAR extension, you will see a PEAR folder in the PHP folder.
3. run the go-pear.bat in PHP folder. This will install the PEAR system.
Verify PEAR is installed correctly by using a DOS command from the PEAR sub-folder:
pear version
Finally, be sure to copy the php.ini from the PHP folder to the c:\windows folder. This will have a modified include_path set to include the PEAR sub folder.
4. Find the PHP PEAR Mail package at http://pear.php.net/package/Mail. Download the .gz file to the PEAR sub folder. From a DOS command prompt in the PEAR sub-folder, enter the following to install the PEAR Mail package into PHP:
pear install -a MailPackageName <--- do not include the .gz file extension.
the -a option installs all dependant PEAR packages needed for Mail to work (important to use this option)
REMEMBER to move an updated php.ini to \windows folder.
Email generation in PHP scripts fails.
Solution:
1. You must install PEAR extension to PHP when either installing PHP or modifying it's installation via Control Panel -> Add/Remove Programs.
2. If you install the PEAR extension, you will see a PEAR folder in the PHP folder.
3. run the go-pear.bat in PHP folder. This will install the PEAR system.
Verify PEAR is installed correctly by using a DOS command from the PEAR sub-folder:
pear version
Finally, be sure to copy the php.ini from the PHP folder to the c:\windows folder. This will have a modified include_path set to include the PEAR sub folder.
4. Find the PHP PEAR Mail package at http://pear.php.net/package/Mail. Download the .gz file to the PEAR sub folder. From a DOS command prompt in the PEAR sub-folder, enter the following to install the PEAR Mail package into PHP:
pear install -a MailPackageName <--- do not include the .gz file extension.
the -a option installs all dependant PEAR packages needed for Mail to work (important to use this option)
REMEMBER to move an updated php.ini to \windows folder.