localhost loading SAME page regardless of typed address

cvwlc

Registered
What is up with this?

Regardless of which file I point localhost to, I keep getting the following:

Parse error: syntax error, unexpected T_VARIABLE in /Applications/MAMP/htdocs/index.php on line 8

No matter which page in my htdocs folder I call in the address bar
(ex. http://localhost:8888/pageone.html
or http://localhost:8888/pagetwo.php)
I get the SAME parse error message?

I tried finding index.php in my php.ini file and the httpd.conf files but didn't. I have no idea where this default page directive is?

PLEASE HELP!!!
 
Hi Edadams & thanks for your feedback.
Not being patient, and having exhausted the possibilities with no success, I trashed MAMP and reinstalled.
Problem fixed.
The problem was not the code in index.php (yes, i know there was a syntax problem within but that wasn't the issue of interest)
The problem was that no matter what I typed into the address bar, index.php was the page the server dished up. So if I requested http://localhost:8888/redpage.html I got http://localhost/index.php - not redpage.html as requested.
Sorry if I wasn't clear.
I knew it was a configuration problem - not always a good idea to follow blog posts regarding this stuff. Whatever I did in following directives - I misconfigured some path and it interfered with the server but it had to be some result of a secondary action since I reversed all the steps I took.
Anyway, I still haven't figured out the Alias directive and Virtual Host but that's for another day.

Have a good weekend.
 
Hi
No problem :) My experience with MAMP is that its not really suited for production use unless you get MAMP pro (are you using pro?) MAMP actually say this on their website. Personally I prefer to use OS X Server, but thats my preference.
Ed
 
Yea, I need to get my OS X Server properly configured. That's why I was hoping to get somewhere with the Alias directive - my hope was to be able to maintain MAMP (which I only use for development and testing - then transfer everything to someone's hosted website) while exploring the OS X server - Ironically, I am trying to figure out my system and server configurations more than the programming stuff (php, mysql, js) and it's proving harder to find good instruction in.
Chris
 
If you use MAMP, the OS X Server config may not be used, depending on how you have it configured. I use the standard MySQL OS X package with Entropy PHP and OS X Server to control the various dynamic/static websites hosted.
We can take this offline if you want help, Im no expert can will provide help where I can (in GUI) :)
Ed
 
Back
Top