Sunday, August 5, 2007

PHP with IIS error: The page cannot be found

Recently, I mangled up my IIS's wwwrooot directory. So I had to create a new one.

Today, I need to install Joomla, one of popular PHP CMS applications. But when I copied the package to my new wwwroot and browse to http://localhost/GearGame ("GearGame" is my project's name) the web server return me the 404 error. I am running PHP 4.40 with IIS 5.1 on Windows XP.



After some experiments, I found that I cannot run any PHP file. So I consult the PHP's readme file and found these lines:

The following steps are optional:

* Edit your new php.ini file. If you plan to use OmniHTTPd, do not
follow the next step. Set the doc_root to point to your web
servers document_root. For example:

doc_root = c:\inetpub\wwwroot // for IIS/PWS

doc_root = c:\apache\htdocs // for Apache

Then, I browse to my php.ini file located at C:\Windows\php.ini and edit the doc_root to my new wwwroot.

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root = C:\wroot

I finally refresh the page, I can setup my Joomla now.

1 comment:

Lavabit Email Support said...

Lavabit is an open-source webmail service which provides corporate and business email services. Users can contact the support team as well if they face any technical problem with an email account. If you too are one of the users who is dealing with any tech glitch, just contact at Lavabit Email Support Number and avail 24*7 assistance at your doorstep. For our users, we are always ready to serve whether day or night. Worry not for more technical issues, simply pick up your phone and dial our Lavabit toll-free number. One of our certified technicians or engineers takes up your call and pays complete attention to your queries. Here, you will get the chance to contact one of our experts who will give you complete solutions with 100% satisfaction.