weevil Posted July 24, 2009 Share Posted July 24, 2009 Hi everyone! I will try to give you as much info as possible to solve this quick! I am reading the Apache_Php_sql weekend crash course and I am stuck on testing my php installation. Here's what I have so far. Vista Installed Apache 2.2.11 listening on port 80 at "c:\server". Had a small issue with that until I stopped IIS! Cool no problems now! So I do as instructed and test my Apache install by pointing browser to http://localhost and I get "It Works!". Moving on to PHP install now. I download php 5.2.10 unzip it to "c:\PHP". Ok now the book tells me to copy the php.ini-dist file (located in the PHP install directory) to php.ini and locate the new file in your system's windows or winnt directory. This makes no sense b/c there is no php.ini just php.ini-dist and php.ini-recommended. So I interpreted this part of the instructions to mean. Rename php.ini-dist to php.ini and copy/paste it into "c:\windows" (note I copied the un-edited php.ini into the windows directory). Now I copied the php5ts.dll file to "c:\windows\system". Last step...from the book says to edit the php.ini file and change the path specified with the extension_dir parameter to the directory of your PHP installation (for example, extension_dir = c:\php-version ). Well mine has "c:\PHP" Final step: Updating http/conf on windows from book. "After the existing LoadModule lines, add the following line: LoadModule php_module c:\php-version\sapi\php4apache2.dll" I have "LoadModule php5_module c:\PHP\php5apache2_2.dll" then it says to.. "Add the following lines after any existing AddType lines: AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps" and I have "AddType application/x-httpd-php .php .php5 .phtml AddType application/x-httpd-php-source .phps" Now I created a test.php file and placed in c:\server\htdocs\ <?php phpinfo(); ?> I go to http://localhost and I still get it works! however when i go to http://localhost/test.php I get "not found" the requested URL/test.php was not found on this server Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted July 24, 2009 Share Posted July 24, 2009 1st of all where you saved your files? 2ndly, want to reduce your pain use xampp. http://www.apachefriends.org/en/xampp.html Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 24, 2009 Share Posted July 24, 2009 I download php 5.2.10 unzip it to "c:\PHP". Ok now the book tells me to copy the php.ini-dist file (located in the PHP install directory) to php.ini and locate the new file in your system's windows or winnt directory. This makes no sense b/c there is no php.ini just php.ini-dist and php.ini-recommended. So I interpreted this part of the instructions to mean. Rename php.ini-dist to php.ini and copy/paste it into "c:\windows" (note I copied the un-edited php.ini into the windows directory). Now I copied the php5ts.dll file to "c:\windows\system". I do not recommend moving files out side the PHP installation folder. Instead you should extract the contents of the zip to C:\PHP. Now add the PHP folder to the PATH Environment Variable. Next rename the php.ini-recommended file to just php.ini. Open the php.ini and change extension_dir = "./" to extension_dir = "C:/PHP/ext" Save the php.ini and restart Apache. I go to http://localhost and I still get it works! however when i go to http://localhost/test.php I get "not found" the requested URL/test.php was not found on this server Go to C:/Sever/htdocs delete all files, except test.php. Now go to http://localhost and you should see a directory listing with test.php listed. Click test.php. Does it run? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.