April 2nd, 2009, 10:16 AM #1
localhost loading SAME page regardless of typed address
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
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?
April 3rd, 2009, 12:17 PM #2
Im no expert on php/mysql but found this-
Looks like an issue in your code? Look at line 8 on your initial php script.
April 3rd, 2009, 12:36 PM #3
trash mamp fix
Hi Edadams & thanks for your feedback.
Not being patient, and having exhausted the possibilities with no success, I trashed MAMP and reinstalled.
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.
April 3rd, 2009, 12:42 PM #4
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.
April 3rd, 2009, 12:48 PM #5
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.
April 3rd, 2009, 12:58 PM #6
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)
April 3rd, 2009, 01:09 PM #7
I'm googling it all now!
No doubt I'll have questions...
April 3rd, 2009, 01:19 PM #8
Great, PM me if you need help?
Tags for this Thread