[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

PHP is not working

I set up the Apache web server with the php4apache2.dll but when I ejecute a php file (phpinfo.php) is does display a web page is asked me if I want to open or save the file.

I believe I miss some configuration...the Apache is running OK

Regards,
0
rtorresmtz
Asked:
rtorresmtz
  • 6
  • 6
1 Solution
 
rtorresmtzAuthor Commented:
Correction "when I ejecute a php file (phpinfo.php) ITdoes NOT display a web page IT asked me if I want to open or save the file.
0
 
matt_mcswainCommented:
Do you have these two lines in your httpd.conf?

LoadModule php4_module "c:/php/php4apache.dll"
AddType application/x-httpd-php .php

Obviously if your path is different for the first line, change it accordingly.
And restart apache.
0
 
matt_mcswainCommented:
You probably noticed this, but it should be:

LoadModule php4_module "c:/php/php4apache2.dll"
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
rtorresmtzAuthor Commented:
I already add this two lines you mentioned.

LoadModule php4_module "c:/php/php4apache2.dll"
AddType application/x-httpd-php .php

And also I add this line:
PHPIniDir "C:/php"
0
 
rtorresmtzAuthor Commented:
Correction: "add" "added"
0
 
matt_mcswainCommented:
Did you have php working before?
Is php4ts.dll in your system path(i.e. c:\windows\system32)?
Have you tried putting your php.ini in your c:\windows directory?
0
 
matt_mcswainCommented:
You can always try xampp-->http://www.apachefriends.org/en/xampp-windows.html
which is php/apache/mysql, and tons of other optional packages that are all in one easy installer.
0
 
rtorresmtzAuthor Commented:
Yes I have the php4ts.dll in the c:\windows\system32) and
 php.ini in the c:\windows directory?
0
 
matt_mcswainCommented:
Is your document root set properly in php.ini. Something like:

doc_root = c:\apache\apache2\htdocs

If you type

apache -k restart

from the command line, are there any errors? what are they?
Have you tried filemon before-->http://www.sysinternals.com/ntw2k/source/filemon.shtml
You run it when you restart apache, and capture everything any process is trying to access and possibly see where the failing is. Sometimes there are permissions issues any one or more files.

You can also try running as a cgi; you probably just need to uncomment these lines in httpd.conf

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

0
 
rtorresmtzAuthor Commented:
I decide to uninstall every thing and I´m installing with the xammp you recommend..

Thanks
0
 
matt_mcswainCommented:
You chose the hardest for windows; the one I use as well when I'm using Windows.;)
Installing php with IIS is trivial; usually running the installer does it.
Installing php as a cgi with apache is easier because there are less dependencies.
But both are less secure.
Apache is the best web server in the world; it just doesn't always get along with Windows.

Good luck.
0
 
rtorresmtzAuthor Commented:
Matt I didn´t make it with the xammp but I install Apache, PHP and MySQL manully one by one and it appear working

Thank you very much for your help...
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now