localhost loading SAME page regardless of typed address

cvwlc

Registered
Regardless of what address I type into localhost it always calls index.php?

(I'm on a MacOSx Tiger 10.4.11)

Read on for the sad history...

I had MAMP running just fine.
BUT wanted to work with the Zend_Framework so I installed it.
Following an online video to learn the proper directory structure, I saw that the author was not running it through MAMP but the local Sites Directory.

So, I asked some webdev people if anyone knew how to get the localhost to run from two different locations which for me would have been:

Users/****/Applications/MAMP/htdocs
and Users/****/Sites

Someone suggested the Alias Directive.
So a google search took me here with directions for MacOSX Tiger!
http://www.paulruffle.com/osx.htm (scroll to bottom right on page to see the directions I followed)

This meant playing with the settings in NetInfoManager and the apache httpd.conf file.

So, I did as directed and had no luck. So i decided to undo what I had done in following the directions...
deleted the copy of the localhost I created in Net Info
deleted the code I'd added to the httpd.conf file

I restarted the computer but MAMP was not working properly anymore...
by that I mean: regardless of what I typed into the local address bar, the same page was called.
So, if I typed:
http://localhost:8888/peanuts.html
or
http://localhost:8888/takemetojapan.hmtl
or
http://localhost:8888/thisisnuts.php

I ALWAYS get this parse error code:
Parse error: syntax error, unexpected T_VARIABLE in /Applications/MAMP/htdocs/index.php on line 8

So, the SAME page is being sought (/MAMP/htdocs/index.php) and generating this error, regardless of the request. So, I'm thinking there's some configuration that's off but since I'm not familiar enough with how it ought to look, I don't know where to look for this.

I did check my php.ini file to see that the directory root was set to /Applications/MAMP/htdocs - it is.

I deleted my MAMP folder and reinstalled.
The MAMP start page works and indicates the server is working properly but the misdirect problem remains.

I have restarted the computer several times.

Out of curiosity, I decided to delete index.php from the htdocs folder.

Then I typed:
http://localhost:8888/indexplaypage.php into the address bar and here's the new, more succinct error

The requested URL /index.php was not found on this server.

WHERE should i be looking for this stubborn path conf?

Can anyone help?
 
Do you, perchance, have Mac OS X's "Web Sharing" enabled? It could be conflicting with your MAMP install, since MAMP uses it's own Apache web server... or is that why you have it configured on port 8888?
 
Hi,

I thought about that too; no - it's not enabled.

localhost:8888 is the MAMP port and it usually works just fine for MAMP.
The directions I followed called for apache to be 'listening' on :80 so I tried that but with no success.

Thanks though,
Chris
 
Back
Top