Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Page 1 of 2 12 LastLast
Results 1 to 8 of 9
  1. #1
    cvwlc is offline Registered User
    Join Date
    Apr 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!!!

  2. #2
    edadams's Avatar
    edadams is offline Registered User
    Join Date
    Nov 2005
    Location
    Auckland
    Posts
    189
    Thanks
    0
    Thanked 20 Times in 20 Posts
    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

  3. #3
    cvwlc is offline Registered User
    Join Date
    Apr 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  4. #4
    edadams's Avatar
    edadams is offline Registered User
    Join Date
    Nov 2005
    Location
    Auckland
    Posts
    189
    Thanks
    0
    Thanked 20 Times in 20 Posts
    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

  5. #5
    cvwlc is offline Registered User
    Join Date
    Apr 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  6. #6
    edadams's Avatar
    edadams is offline Registered User
    Join Date
    Nov 2005
    Location
    Auckland
    Posts
    189
    Thanks
    0
    Thanked 20 Times in 20 Posts
    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

  7. #7
    cvwlc is offline Registered User
    Join Date
    Apr 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    cool.
    I'm googling it all now!
    Thanks!
    No doubt I'll have questions...

  8. #8
    edadams's Avatar
    edadams is offline Registered User
    Join Date
    Nov 2005
    Location
    Auckland
    Posts
    189
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Great, PM me if you need help?

 

 
Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •