rbradshaw Posted January 7, 2008 Share Posted January 7, 2008 First, the environment... Windows XP running Apache 2.2.x. My preference is to run PHP 5.2.5 using modules, not CGI. Next, I updated the httpd configuration file with the following information: # For PHP 5: LoadModule php5_module "c:/php5/php5apache2_2.dll" AddType application/x-httpd-php .php # Configure the path to php.ini PHPIniDir "C:/php5" Next, I updated the php.ini file with the following information: doc_root = "c:\Apache2\htdocs" extension_dir = "c:\php5\ext" Apache 2.2 was tested and it works. When I test phpinfo.php, I get the 404 error in that it cannot find the file, which is unusual since Apache 2.2 can find the localhost/index.html file. Any suggestions? The documentation varies all over the map and no one seems to have a complete manual with instructions. Thanks, Randy Quote Link to comment https://forums.phpfreaks.com/topic/84881-404-error-after-php-525-installation/ Share on other sites More sharing options...
wildteen88 Posted January 7, 2008 Share Posted January 7, 2008 Ok. Clear any documents already in C:/Apache2/htdocs. Now add your test php file there and go to http://localhost/ when you go to that address you should get an Index Of page which will list any files currently within C:/Apache2/htdocs Can you see your test php file? If you can what happens when you click on it? Also if you are creating .php files from within a text editor such as Notepad or Wordpad make sure you select All Files from the File Type pull downmenu (within Save As dialog box) otherwise your file will be saved as filename.php.txt and not filename.php Quote Link to comment https://forums.phpfreaks.com/topic/84881-404-error-after-php-525-installation/#findComment-432855 Share on other sites More sharing options...
vishal99 Posted January 7, 2008 Share Posted January 7, 2008 Hello, Are you successfully also copy the php.ini file to windows folders? And also check the files extension, and it need to save to c:\program files\apache\htdocs folder please make sure. Thanks, Vishal vishalgaurav01@gmail.com http://vishal.benetonfilms.com Quote Link to comment https://forums.phpfreaks.com/topic/84881-404-error-after-php-525-installation/#findComment-433069 Share on other sites More sharing options...
wildteen88 Posted January 8, 2008 Share Posted January 8, 2008 Hello, Are you successfully also copy the php.ini file to windows folders? And also check the files extension, No need to do any of those. Adding PHP to the PATH environment variable would be better IMO rather than copy files out of the PHP's install folder. and it need to save to c:\program files\apache\htdocs folder rbradshaw has installed Apache in C:/Apache2 not C:/Program Files Quote Link to comment https://forums.phpfreaks.com/topic/84881-404-error-after-php-525-installation/#findComment-433753 Share on other sites More sharing options...
vishal99 Posted January 9, 2008 Share Posted January 9, 2008 Hello, Actually "wildteen88" is right. My mean is, That, this perison "rbradshaw" is successfully saved the file in destination apache/ htdocs folder or not? No matter where the folder is located.or they specify where the files are located in httpd.conf file. Yes, no need to copy php.ini in windows folder. but have need to specify in conf folder of apache, in httpd.conf file that "parse the .php extension" And as i already mention in my first post and also by"wildteen88" too. That please make sure, that you have saved the file with .php extension or not? some times win-os hides the file extension.when you save the file form text editor, genrally saved the file with index.php.txt. But server only parse the file as .php not as php.txt. Thanks, Vishal vishalgaurav01@gmail.com http://vishal.benetonfilms.com Quote Link to comment https://forums.phpfreaks.com/topic/84881-404-error-after-php-525-installation/#findComment-434706 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.