image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old April 2nd, 2009, 10:16 AM
Registered User
 
Join Date: Apr 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
cvwlc is on a distinguished road
Question 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
(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!!!
Reply With Quote
  #2  
Old April 3rd, 2009, 12:17 PM
edadams's Avatar
MacTech
 
Join Date: Nov 2005
Location: Auckland
Posts: 180
Thanks: 0
Thanked 20 Times in 20 Posts
edadams is on a distinguished road
Hi
Im no expert on php/mysql but found this-
http://www.phpbuilder.com/board/arch...-10296539.html
Looks like an issue in your code? Look at line 8 on your initial php script.
Ed
__________________
MacBook Pro 2.4Ghz 4GB RAM
iPhone 3G 8GB
Xserve G5 2Ghz
http://www.analogueltd.com
http://blog.analogueltd.com
http://www.proof-me.co.nz
Reply With Quote
  #3  
Old April 3rd, 2009, 12:36 PM
Registered User
 
Join Date: Apr 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
cvwlc is on a distinguished road
Smile 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.
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.
Reply With Quote
  #4  
Old April 3rd, 2009, 12:42 PM
edadams's Avatar
MacTech
 
Join Date: Nov 2005
Location: Auckland
Posts: 180
Thanks: 0
Thanked 20 Times in 20 Posts
edadams is on a distinguished road
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
__________________
MacBook Pro 2.4Ghz 4GB RAM
iPhone 3G 8GB
Xserve G5 2Ghz
http://www.analogueltd.com
http://blog.analogueltd.com
http://www.proof-me.co.nz
Reply With Quote
  #5  
Old April 3rd, 2009, 12:48 PM
Registered User
 
Join Date: Apr 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
cvwlc is on a distinguished road
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
Reply With Quote
  #6  
Old April 3rd, 2009, 12:58 PM
edadams's Avatar
MacTech
 
Join Date: Nov 2005
Location: Auckland
Posts: 180
Thanks: 0
Thanked 20 Times in 20 Posts
edadams is on a distinguished road
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
__________________
MacBook Pro 2.4Ghz 4GB RAM
iPhone 3G 8GB
Xserve G5 2Ghz
http://www.analogueltd.com
http://blog.analogueltd.com
http://www.proof-me.co.nz
Reply With Quote
  #7  
Old April 3rd, 2009, 01:09 PM
Registered User
 
Join Date: Apr 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
cvwlc is on a distinguished road
cool.
I'm googling it all now!
Thanks!
No doubt I'll have questions...
Reply With Quote
  #8  
Old April 3rd, 2009, 01:19 PM
edadams's Avatar
MacTech
 
Join Date: Nov 2005
Location: Auckland
Posts: 180
Thanks: 0
Thanked 20 Times in 20 Posts
edadams is on a distinguished road
Great, PM me if you need help?
__________________
MacBook Pro 2.4Ghz 4GB RAM
iPhone 3G 8GB
Xserve G5 2Ghz
http://www.analogueltd.com
http://blog.analogueltd.com
http://www.proof-me.co.nz
Reply With Quote
Reply

Bookmarks

Tags
mamp, same page loading

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 01:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
Copyright 2000-2010 DigitalCrowd, Inc.