Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/84881-404-error-after-php-525-installation/
Share on other sites

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

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

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.