Wamp is Windows Apache MySQL and PHP, will not work with MAC 'cause it is a different OS.
Why Can't I Open PHP Files on My New Mac?
Devious Designs wrote:I downloaded mamp, but I'd like to know what's up with access denied.
OK:
1) Open up the MAMP application.
2) When it is open, click the OPEN START PAGE button
3) Click PhpMyAdmin link at the top
4) Click priveledges
5) Add A New User
6) Create a new user, and assign a USERNAME and PASSWORD
7) Assign what tasks you would like that user to be allowed to perform...
And bob's your uncle, you should be able to do whatever you want.........
THEN, you can create the database and tables within PhpMyAdmin, or you can write PHP scripts to do it. If you are more comfortable with SQL, you can click the SQL link after the db has been created and run your lines / scripts from there.
Hope that helps.
Doesn't a new default MySQL install come with a default of username 'root' and password '' or nothing? Maybe it is the MAMP way of doing it I guess, I'm a Wimmers user.
Houdini, yes, it does have the default "root". You are 100% correct.
I was just trying to elimate that as a possible problem for him.
Hopefully, what I said above will help..................
Guys...this dude has posted the same thing on at least 2 other forums, probably more. And isn't heeding the advice given in any of them.
He's caught up in mysql not working - using dreamweaver's help to try all this stuff which is irrelevant.
I doubt he even has a webserver installed. He stated himself he doesn't have OSX Server installed (I'm assuming thats a webserver? ) and I doubt he even attempted to install MAMP. That would explain
He should try a simple phpinfo() script and load it from his browser aimed at localhost.
Addionally I know of NO operating system which will allow you to double click on a php file and have it open in the browser displaying its output. The "Save file as" message is a dead give away - he doesn't have a webserver installed.
Yeah, something is fishy...
Reading the DW help files for a PHP / MySQL problem is like reading a cook book, when there is a problem with the stove....
Rodney,
I tried Mamp and it's throwing me off, for I am intentively following a Deamweaver tutorial and I'm not sure how to incorporate Mamp with Dreamweaver MX.
On one hand the Mamp Read Me file tells me to put HTML files in their folder, while Dreamweaver is telling me to put my files on another.
Then I have this SITES folder on my Mac that Apple specified to use and I think I need to connect to my database through Dreamweaver.
Understand that everyone (on other forums too) is telling me to "go download this" but no one tells me why.
Like Dreamweaver, the Mamp instalation instructions prove to be just as incompitent.
Last login: Wed Mar 29 02:50:49 on ttyp1
Welcome to Darwin!
mac:~ albert$ /Applications/MAMP/bin/mysql4/bin/mysqladmin -u root -p password albert
Enter password:
/Applications/MAMP/bin/mysql4/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
mac:~ albert$
---please delete---
No, you are posting loads of irrelevant info, ignoring people's advice and blaming the software because you cant use it. Oh and insulting the people who are trying to help you.
khendar wrote:No, you are posting loads of irrelevant info, ignoring people's advice and blaming the software because you cant use it. Oh and insulting the people who are trying to help you.
No...
It's YOU who is set in your ways.
It is YOU who does not listen. YOU!
I wrote this:
"Understand that everyone (on other forums too) is telling me to "go download this" but no one tells me why."
And that is what you do. It is YOU who is not listening to me.
I listen intentively. I download 20 programs and my computer runs slow.
I am on the phone with Apple 5 hours a day and they tell me not to download any 3rd party software or they will not give me support. Do you care? No. Without considering what I am doing YOU say "this is how it is" and expect it to be law. But there is more than one way to skin a cat.
On top of it, YOU are the one of whom started the insults. YOU!
If your help comes with the price of talking down to me, I don't want it. I don't want to hear your elitist sneers. You need a break from the internet.
Show me where I insulted you please...
Right here: http://phpbuilder.com/board/showpost.php?p=10711122&postcount=18
You question my integrity when you say "his dude has posted the same thing on at least 2 other forums, probably more."
But now it is I who questions you and I will take you to school...
First of all, how old are you? Because you come accross like you know everything.
Secondly, I see nothing helpful in your comment when you say "And isn't heeding the advice given in any of them." Why would you say something like that?
You want links to other forums where you insulted me? I'll gladly waste more time with you. Always a pleasure.
I'm 24, a hold a double degree in Computer Science and Multimedia, and work as a PHP Developer. I'm also a Sagittarius and allergic to walnuts.
Why would you say something like that?
Because I read the threads. I see the advice people are giving and you going off on a tangent rather than answering our questions about what your problem is.
khendar wrote:He should try a simple phpinfo() script and load it from his browser aimed at localhost.
Addionally I know of NO operating system which will allow you to double click on a php file and have it open in the browser displaying its output. The "Save file as" message is a dead give away - he doesn't have a webserver installed.
Looks like helpful advice to me. Which you seem to have ignored.
My friend,
Threads are like timelimes and you have jumped WAY into the future.
I am right here.
Last login: Wed Mar 29 02:50:49 on ttyp1
Welcome to Darwin!
mac:~ albert$ /Applications/MAMP/bin/mysql4/bin/mysqladmin -u root -p password albert
Enter password:
/Applications/MAMP/bin/mysql4/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
mac:~ albert$
That is where I am.
Don't tell me I cannot run software. I know this. But I can follow step by step manuals. and the Mamp manal told me to type exactly that. And when the steps don't work, that opens me up to say that the company made a crappy manual.
After you download MAMP, you have to put any PHP file into the MAMP/htdocs directory
SO, if you are working on a site called "test", appropriately enough, then create a new folder and drop it into:
MAMP/htdocs/test
Then, put a file into it called "info.php" and write the following lines of code:
<?php
phpinfo();
?>
That is it, just THREE lines of code. Nothing else. Save it as "info.php"
Now, open up dreamweaver and define your site as usual.
BUT, make sure you set up the testing server, too. This tells dreamweaver not to open it as the file, but to let it be parsed from the server and PHP engine, if need be... OK? Understand that?
1) If you do not set up the TEST server in Dreamweaver, you won't see squat.
2) If you don not set up your web site folders in MAMP/htdocs you won't see squat.
3) If MAMP servers are not on, you won't see squat
4) see 1 & 2 & 3 above ^
NOTE: It may take a bit of tinkering at first to figure out what to set the testing location to be. Don't give up. Just experiment. Open the MAMP opening page to help you figure it out...
Rodney H. wrote:After you download MAMP, you have to put any PHP file into the MAMP/htdocs directory
SO, if you are working on a site called "test", appropriately enough, then create a new folder and drop it into:
MAMP/htdocs/test
Then, put a file into it called "info.php" and write the following lines of code:
<?php
phpinfo();
?>That is it, just THREE lines of code. Nothing else. Save it as "info.php"
Now, open up dreamweaver and define your site as usual.
BUT, make sure you set up the testing server, too. This tells dreamweaver not to open it as the file, but to let it be parsed from the server and PHP engine, if need be... OK? Understand that?1) If you do not set up the TEST server in Dreamweaver, you won't see squat.
2) If you don not set up your web site folders in MAMP/htdocs you won't see squat.
3) If MAMP servers are not on, you won't see squat
4) see 1 & 2 & 3 above ^NOTE: It may take a bit of tinkering at first to figure out what to set the testing location to be. Don't give up. Just experiment. Open the MAMP opening page to help you figure it out...
Thanks, that helped a lot, but I still have a few problems configuring.
Dreamweaver keeps giving me this message in the site configuration: "This site's testing and remote servers are different"
I don't know where all the files and folders should point to. (See attachment)
Sometimes I save a file, but it does not change when I preview. And I still do not know how to connect to a MySql database through dreamweaver.
Devious Designs wrote:Thanks, that helped a lot, but I still have a few problems configuring.
Dreamweaver keeps giving me this message in the site configuration: "This site's testing and remote servers are different"
I don't know where all the files and folders should point to. (See attachment)
Sometimes I save a file, but it does not change when I preview. And I still do not know how to connect to a MySql database through dreamweaver.
Well, your TESTING and REMOTE servers SHOULD be different.
Also, it doesn't look like you are saving your website in the correct directory. It should be something like:
[INDENT]
Testing Sever Folder: Macintosh HD:Applications:MAMP:htdocs:lYour-Folder-Name-Here:
[/INDENT]
And, your URL prefix should be something like this:
[INDENT]
http://localhost:8888/lYour-Folder-Name-Here/
[/INDENT]
MAMP runs on port 8888 so as not to interfere with the other servers that OS-X has installed already. Also allows you to easily start and stop the MYSQL and APACHE servers as needed...
PS: When defining a site in Dreamweaver I always use the Advanced TAB.
Copy this code name it mysql.php then put it into your htdocs folder or if you have a test folder there then put it into htdocs/test. Then open your browser, not Dreamweaver and type either http://localhost/mysql.php or if you put it into the test folder then type http://localhost/test/mysql.php and you will know if you are connecting to MySQL because it will print a table of all sorts of the server
data.
<html>
<head>
<title>Test MySQL</title>
<body>
<!-- mysql_up.php -->
<?php
$host="localhost";
$user="root";
$pass="";
mysql_connect($host,$user,$pass);
$sql="show status";
$result=mysql_query($sql);
if($result==0)
echo("<b>Error ".mysql_errno().":" . mysql_error() ."</b>");
elseif(mysql_num_rows($result)==0)
echo("<b>Query executed sucessfully!</b>");
else{
?>
<!-- Table that displays the results -->
<table border ="1">
<tr><td><b>Variable name</b></td><td><b>Value</b></td></tr>
<?php
for($i=0;$i < mysql_num_rows($result);$i++){
echo("<tr>");
$row_array = mysql_fetch_row($result);
for($j=0;$j < mysql_num_fields($result); $j++){
echo("<td>".$row_array[$j]."</td>");
}
echo("</tr>");
}
?>
</table>
<?php
}
?>
</body>
Houdini, The G5 is at home. I'll have the results tomorrow.
Rodney H,
That covers TESTING and REMOTE, but what about LOCAL?
And which mode am I supposed to be working in?