PHP folder is C:\PHP
extension folder is C:\PHP\ext
php.ini found in C:\WINDOWS
system32 is C:\WINDOWS\SYSTEM32
web folder is C:\Apache2\htdocs
1. Create a phpinfo.php file in C:\Apache2\htdocs
2. Write <?php echo phpinfo(); ?> as the text of the file phpinfo.php
3. Verify it works: http://localhost/phpinfo.php (should display readonly php.ini in a table). *This confirms that http server works and php is installed
4. At the DOS/Command Prompt type echo %PATH% to view the current path
5. Put C:\PHP and C:\PHP\ext in your path: Go to My Computer->Advanced->Environment Variables->System Variables, and add C:\PHP;C:\PHP\ext; to the end of your path
6. Download the php .zip archive (with all the extensions in it) that corresponds to your version of php and extract libeay32.dll and ssleay32.dll
7. Put libeay32.dll and ssleay32.dll in your C:\WINDOWS\SYSTEM32 folder
8. Verify php_curl.dll is found in your C:\PHP\ext folder
9. Modify C:\WINDOWS\php.ini
- remove semi-colon from line ;php_curl.dll
- in php.ini, verify that extensions_dir = "C:\PHP\ext"
10. Restart HTTP service if you can't tell it worked.
- Start->Control Panel->Administrative Tools->Services
- right click Apache or HTTP or IIS and select restart
11. Verify by checking http://localhost/phpinfo.php
- Curl should have its own spot
Troubleshooting:
If you get the error...
PHP Warning: Unable to load dynamic library 'C:\PHP\ext\php_curl.dll' - The specified module could not be found. in Unknown on line 0
... at the bottom of your http://localhost/phpinfo.php or at the bottom of any php script, then verify that you followed all the steps.
Also, verify that the php.ini you made changes to is the same one that http://localhost/phpinfo.php displays in the fifth (or so) row down under
"Configuration File (php.ini) Path"
Also, verify that you clicked [Apply] or [OK] after step 5
Keep trying stuff until it works.
No comments:
Post a Comment