简体   繁体   中英

WAMP installation Apache not parsing PHP code despite it being configured in httpd.conf

I downloaded and installed WampServer 2.5 64 bits. Installation worked fine and my WAMP server status is green. I can connect to localhost and see the admin panel. I can log into the mysql console and it seems to work fine as well.

The big problem is that the server seems to not be parsing PHP code at all. When I click on phpinfo() from the localhost panel I only see the source code. Here are a few lines of what I see when I click on the phpinfo() link. The url it takes me to is

http://localhost/?phpinfo

rder="0" cellpadding="3" width="600">
<tr><td class="e">LDAP Support </td><td class="v">enabled </td></tr>
<tr><td class="e">RCS Version </td><td class="v">$Id$ </td></tr>
<tr><td class="e">Total Links </td><td class="v">0/unlimited </td></tr>
<tr><td class="e">API Version </td><td class="v">3001 </td></tr>
<tr><td class="e">Vendor Name </td><td class="v">OpenLDAP </td></tr>
<tr><td class="e">Vendor Version </td><td class="v">20433 </td></tr>
<tr><td class="e">SASL Support </td><td class="v">Enabled </td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
<tr><td class="e">ldap.max_links</td><td class="v">Unlimited</td><td             vclass="v">Unlimited</td></tr>
</table><br />

I've dug around and most places say to make sure that apache is properly configured but I've checked my httpd.conf file and I have the following lines in there.

AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

Along with the

LoadModule php5_module

which has the appropriate file path following it.

I've tried re-installing wamp several times over several versions and in different directories. I can't seem to figure out what is wrong with it, any help would be appreciated.

EDIT:

A few images that might be able to help.

http://imgur.com/71vHbZ6,7LjlZjl,nH3mn9X,zo45Md6#0 Wamp Server Icon is green.

http://imgur.com/71vHbZ6,7LjlZjl,nH3mn9X,zo45Md6#1 Localhost URL WAMP panel.

http://imgur.com/71vHbZ6,7LjlZjl,nH3mn9X,zo45Md6#2 What happens when I try to navigate to the phpInfo() link on the WAMP panel.

http://imgur.com/71vHbZ6,7LjlZjl,nH3mn9X,zo45Md6#3 What happens when I try to navigate to the phpmyadmin link on the WAMP panel.

If you are seeing the standard WAMPServer home page when you click the wampmanager link

wampmanager -> localhost

And you see this web page, or something similiar

主页

Then PHP is working, because this page is written in PHP

Are you using Explorer and double clicking on the page you are trying to run?

If so DONT, use the browser address bar like you would for any web page. You have to go via Apache so that the PHP interpreter gets involved in the processing.

Also make sure that the script file you are trying to run has the `.php' extension or Apache wont pass the script to PHP anyway.

ADDITIONAL Chrome Issue suggestion

Ah right. Chrome is becoming a real pain to developers lately.

Try this:-

  • Click the triple bar icon ( Customise and control Chrome settings ), top right of Chrome browser.
  • Click advanced settings
  • Under the Network section press the Change proxy settings
  • That should launch a Internet Properties standard windows dialog.
  • Click the Lan Settings button at the bottom of the dialog
  • That should open a Local Area Network (LAN) settings dialog
  • Make sure that 'Use a proxy Server for your lan` checkbox is unchecked.

If its not this it is something very similiar that Chrome is assuming by default that is interfering with normal operations.

Turns out I messed up. I was running a firewall, ZoneAlarm to be specific, and it seems that when certain php functions were called the firewall would block them and mess up the server. I'm sorry I can't present a more technical answer but I'm trying to learn more so I will be able to in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM