Joined: 14 Apr 2006
|Posted: Fri Apr 14, 2006 10:06 pm Post subject: Manually installing PHP with SQLite
|Since I had to work a bit to get a direct and complete answer on how to do this, I am posting the procedure that worked for me.
1.) Downloade the complete PHP package from php.net - not just the Windows installer with no extensions package. In other words, under Windows binaries on the PHP downloads page, download the "PHP <version #> zip package" (around 9MB for ver. 5.1.2) rather than the "PHP <version #> installer" (apx. 2.6MB for 5.1.2).
2.) In your PHP installation directory create an extensions subdirectory, say "extensions" for the purposes of this example. From the "ext" subdirectory inside the unzipped downloaded PHP package, copy php_pdo.dll, php_pdo_sqlite.dll, and php_sqlite.dll to the newly created "extensions" subdirectory.
3.) In your php.ini file make sure the following lines are present (and not commented out):
extension_dir="<PHP install directory absolute path>\extensions"
If this is your first PHP install use php.ini-recommended from your downloaded PHP zip package, renamed to php.ini. For safety's sake, find where in php.ini the extension_dir= and extension= or similar lines already exist and write over or add next to as appropriate.
4.) Log into the Abyss Console, click on "Configure" then "Scripting Parameters". Click "Add" under "Interpreters". In the resulting form choose "CGI/ISAPI" for Interface, browse your way to php-cgi.exe in your PHP installation directory for Interpreter, leave Arguments blank, choose "PHP Style" on the dropdown menu under Type.
Under "Custom Environment Variables" add name/value combinations:REDIRECT_STATUS/200 and PHPRC/<PHP install directory absolute path>.
Then click on "OK" towards the lower right corner.
5.) The only other thing you need to do is make sure your php.ini configuration file can be found. If the directory it is located in is included in your Windows PATH environmental variable then this will be the case. The PHP installer (with no extensions) puts php.ini in your Windows directory, which always works. It also appears that putting php.ini in the PHP install directory - which is ideal - also works. However, that might work with Abyss but not with other programs which access the PHP executables.