Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Mac Test Server set up issues

Guest
Jan 17, 2010 Jan 17, 2010

first day notes:

I've spent the last two days transitioning into Dreamweaver and setting up my test server MySQL PHP and Apache by following online help, tutorials and recommendations. I've Terminaled MAMPed, and installed more crap than I wanted to fill my hard drive with.  I've done everything I can think of just so I can see what the site I'm working on will look like in reality (using Server Side Includes) before posting as I'm still in the proposal stages of this project. 

All files are relative to the document and not root

preview using temporary file is checked

Testing Server folder is: MacintoshHD:Library:WebServer:Documents:sitename

Testing Server URL Prefix is: http://127.0.0.1/sitename.com/

FF and Safari give me:

Not Found

The requested URL /MarcJanowitz.com/TMPV8Y2WAUZU.shtml was not found on this server.

I'm used to iWeb but it clearly doesn't have the functionality I need, which is why I'm trying to graduate.  I can't use DW if I can't see what i'm creating.  I can't rely on faith when I don't have the experience with this program to have the faith.

I've been all over google and the forums since 5pm yesterday (short nap in the middle) and it looks like i'm doing everything I'm told.

I'm afraid I did something in terminal I shouldn't have or something slightly wrong in my installation/implementation of MySQL PHP and Apache. Or that i'm misunderstanding what I'm supposed to be putting in for "Testing Server URL Prefix" or something.  I need to find out asap whether this is a lost cause or fixable so I know whether to cut my losses.

--------------------------------------------------------------------------------------------------------------------------------------------------------------

the next day i tried:

apache is set to run by setting my web sharing on

i changed the line that said 127.0.0.1 in my config.inc.php. back to localhost so i could try

I'd switched because i was getting "Re: #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)" and I found these:

now that i look at those pages again, perhaps just switching 127.0.0.1 back to local host  in both places isn't enough

i've sort of lost track of the changes i've made now

I switched the line in manage sites to lowercase to match the folder

PHP and MySQL were running last night before i shut down.  How do I make sure they're running now that i've started up again?

as of now, still getting "not found"

--------------------------------------------------------------------------------------------------------------------------------------------------------------

I know there are similar topics but i'm certain i've gotten myself in a unique enough situation that it is worth a new discussion because i can't find one close enough to what i've done

thanks!

TOPICS
Server side applications
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 20, 2010 Jan 20, 2010

Diana Kesselschmidt wrote:

3)don't know where you mean when you say:

simply declare those ports in the call... i.e. localhost:8889 for mysql and to see the website localhost:8888

I explained this before. If you use the default MAMP ports, you need to use http://localhost:8888/ instead of http://locahost/ in the URL prefix of the Testing server definition. Also, when creating a MySQL connection, use localhost:8889 instead of localhost in the Server field.

If you have stopped the preinstalled version

...
Translate
LEGEND ,
Jan 17, 2010 Jan 17, 2010

Diana Kesselschmidt wrote:

i'm certain i've gotten myself in a unique enough situation that it is worth a new discussion because i can't find one close enough to what i've done

No, you haven't.The answer to most testing server problems is the same: undo what you have already done, and follow a decent set of instructions. http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 18, 2010 Jan 18, 2010

those are one of the sets instructions I tried before i got the 2002 error

the last thing i tried was MAMP.  it didn't change anything, but i figured that that was because i might have made so many changes before that

and I have absolutely no idea how to undo what i've done

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2010 Jan 19, 2010

Diana Kesselschmidt wrote:

I have absolutely no idea how to undo what i've done

I'm not sure how you expect anyone else to know, either. You're the only one who knows what you have done. Uninstalling MAMP is easy. Just make sure that Apache and MySQL have been stopped in MAMP, and then drag the MAMP folder to the Trash.

Do you have a Time Machine backup? If so, revert your computer to the way it was before you started.

If not, you're going to have to explain what you did before trying MAMP. It might be a simple thing of just stopping the preinstalled version of Apache (System Preferences > Sharing, deselect Web Sharing).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 19, 2010

I sense that you think I'm stupid because I tell you that I don't know what I've done.  I don't know what I've done because i followed a bunch of instructions in terminal so I don't know what they affected.  I can only use time machine if you can help me to figure out what files to replace as i have done a lot of work since then on other projects that don't want to revert.

I'd very much like to explain what I did but I'm having trouble finding the many many many pages i went through to get to where I ended up.  My history for that day has more than 300 related pages.  It was a frustrating day.

If you tell me that, for example that time machining my macintoshHD/Library/webserver/documnts folder should do it, then that is something i can try.  but after the trouble i may have gotten myself into i really don't want to guess.  do you understand now?  I just need to know what i'm reseting so i don't have to lose the wrong things, just the right ones.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 19, 2010 Jan 19, 2010

No, I don't think you're stupid. I can sense you're extremely frustrated after spending a couple of days and getting nowhere. On the other hand, I can't tell you what to undo since I have no idea what you have actually done.

I use a Mac only for testing, so I have never actually used Time Machine. It sounds as though it works differently from a Windows restore point. In Windows, I can restore my system back to its last working state. Documents are left unchanged.

Over the years, I have helped hundreds of people sort out problems with setting up a PHP/MySQL environment. If you tell me, "I did X and the result was Y", I've got a reasonable chance of identifying the problem. Telling me "I followed a bunch of instructions in Terminal" gets neither of us any closer to a solution.

Having said all that, the whole idea of MAMP is that it's independent. By default, it runs both Apache and MySQL on non-standard ports (8888 and 8889). Normally, I recommend switching to the default Apache and MySQL ports (80 and 3306) because it makes it easier to migrate everything to your remote server. However, if you use the MAMP defaults, the only difference is that instead of http://localhost/, you use http://localhost:8888/ for your URL prefix; and in the MySQL Connection dialog box, you use localhost:8889 instead of plain localhost.

If you use the MAMP defaults, everything should run just fine, regardless of what you did before, unless of course, you are already using the ports that MAMP uses.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 19, 2010

I'm going to restore the files i'm guessing i need to and try again with just MAMP and let you know

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 19, 2010 Jan 19, 2010

i reset the server folder as i mentioned earlier and began your set up as described with MAMP

MAMP had green lights

then i Clicked Set to default Apache and MySQL ports, got 80 for Apache and 3306 for MySQL

entered password

and now it only has red lights,even when i click start servers

and i know i do have Apache running

before i can move forward what do i need to do to get green-lights again?

BTW http://foundationphp.com/tutorials/php_leopard.php is one of the many things i tried on friday, earlier on in the process if that helps to know

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 19, 2010 Jan 19, 2010

you can't have more than one apache and mysql server running on the same ports, which would cause mamp or xampp to not start when you changed the ports to the default ones(80/3306)

mac osx comes with mysql and php built in.  Check system preferences and make sure under sharing you do not have web sharing checked.  This would start apache on the default port on boot.  If mysql is running on boot, open terminal and copy paste this in...

sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop

...to stop mysql from running.   If you've installed additional versions of apache or mysql, uninstall them.

It sounds like you've tried everything, and installed everything, and you've basically dug yourself a little hole of sorts.   once you've got everything you need removed, and the built in apache and mysql not running, you will have no trouble running mamp.

with all that said, you can run mamp on the 8888 8889 ports with dreamweaver without a problem.  simply declare those ports in the call... i.e. localhost:8889 for mysql and to see the website localhost:8888

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 20, 2010 Jan 20, 2010

1) "If you've installed additional versions of apache or mysql, uninstall them."

--don't see how to uninstall, the dmg file didn't come with an uninstall file and i can't locate what the install did since it didn't simply put an app in my Applications folder

2) stopped mysql in terminal, apache in system preferences

3)don't know where you mean when you say:

simply declare those ports in the call... i.e. localhost:8889 for mysql and to see the website localhost:8888

4) in the process of following my instructions to get MAMP going right I got through: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php_07.html

Setting up a PHP development environment for Dreamweaver

8. Click Test.

Dreamweaver attempts to connect to the database. If the connection fails, do the following:

  • Double-check the server name, user name, and password.
  • Check the settings for the folder Dreamweaver uses to process dynamic pages (see Specify a testing server for Dreamweaver).
  • Verify that the web and MySQL servers are both running.
  • Temporarily disable any firewall or security program. If the connection works, you need to configure the security program to permit communication between Dreamweaver and MySQL.

...and i'm still getting an unknown error when i click test and as far as i know i've done all the "If the connection fails, do the following:" things right

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 20, 2010 Jan 20, 2010

Diana Kesselschmidt wrote:

3)don't know where you mean when you say:

simply declare those ports in the call... i.e. localhost:8889 for mysql and to see the website localhost:8888

I explained this before. If you use the default MAMP ports, you need to use http://localhost:8888/ instead of http://locahost/ in the URL prefix of the Testing server definition. Also, when creating a MySQL connection, use localhost:8889 instead of localhost in the Server field.

If you have stopped the preinstalled version of Apache in System Preferences, as well as stopping the version of MySQL that you installed from a dmg, you can change the ports in MAMP. See the following screenshot, which is taken from the tutorial on setting up a PHP development environment:

MAMP_ports.jpg

The screenshot shows the default MAMP ports. If you click the "Set to default Apache and MySQL ports" button, those values will change to 80 and 3306 respectively. If you do that, and you get a green light from both MySQL and Apache, you can use http://localhost/ and localhost in the testing server and MySQL connection dialog boxes.

If you still get errors when trying to test a page in Dreamweaver, please give precise details of the values you have entered in the Testing server folder and URL prefix fields of the Testing Server section of the Site Definition dialog box.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 20, 2010 Jan 20, 2010

By George I think we got it!

All this just to get preview in browser to work!

Maybe since I got this all going I'll actually learn php next.

for anyone trawling the forums like I did before getting started SKIP

TO MAMP AND DON'T SET UP WHAT CAME WITH YOUR MAC. TRUST ME!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 20, 2010 Jan 20, 2010

Hallelujah! I agree about using MAMP. I have set up PHP/MySQL on both Mac and Windows many times. I prefer installing the individual programs on Windows, but doing so an a Mac is a pain. MAMP gets you up and running in a few minutes.

If you're learning PHP in Dreamweaver, you might want to take a look at my book, "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP". The PHP section is approximately 500 pages, and it not only covers all the server behaviors, but also explains the code, so you can start customizing it to your own needs. (End of shameless plug.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 20, 2010 Jan 20, 2010

which one do you recommend for CS3?

you don't use too much technical speak do you?--most of the trouble i'm having learning comes from too much technical speak at the start up and not enough time to get used to what it all means, it starts to sound like charlie brown's mom, and the dictionaries are filled with technical speak explanations
i can't seem to find the beginning of the string to untangle it all, and really that is all i want to do.  learn and make progress

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 21, 2010 Jan 21, 2010

There's also a CS3 edition of the same book. However, if it's the PHP stuff that you're interested in, I think the CS4 edition is better. I have improved and expanded a lot of the PHP material, which works exactly the same in both CS3 and CS4.

No, I don't use a lot of technobabble. I'm originally a journalist, and try to write in clear, straightforward terms. However, I do expect readers to be able to follow instructions. Working with PHP (or any other programming language) requires a higher degree of discipline than HTML. Browsers automatically compensate for mistakes in HTML code. Get a comma, semicolon, quote, or other character out of place in PHP, and everything comes to a grinding halt. It's also case-sensitive. Having said that, PHP is not difficult to learn.

Take a look at the reviews of my books on Amazon.com to see what others have to say.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 21, 2010 Jan 21, 2010

not to keeeeeep dragging this out, but if you say yes, that the CS4 book will still make sense in CS3 then i'll go for it.  am I going to get lost in the version differences?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 21, 2010 Jan 21, 2010
LATEST

No, you shouldn't get lost in version differences in the PHP chapters. The main differences between CS3 and CS4 lie in the HTML/CSS split of the Property inspector, the New CSS Rule dialog box, Live View, and a few other things, none of which affect PHP. There's also a big difference in the Dreamweaver user interface. However, all the screenshots in the book use the Classic workspace, which is virtually identical to the way the program looks in CS3.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines