close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Set up your MySQL database with MAMP

Thread began 1/08/2010 9:59 am by keithlogan347721 | Last modified 1/13/2010 9:34 am by keithlogan347721 | 2623 views | 8 replies |

keithlogan347721

Set up your MySQL database with MAMP

Hi

I've just bought PowerStore 2. I've download and installed MAMP running on Mac OSX 10.4.1.1 so that I can test my development on my local machine.

I'm reading through the PowerStore getting started guide. Step 1 is about 'Set up your MySQL database' But I'm not sure on the steps I need to take in order to import the supplied PowerStore Database file into MAMP?

Any help would be much appreciated in getting this setup.

Thanks

Sign in to reply to this post

keithlogan347721

Hi,

I'm new to PowerStore and MAMP and need some assistance in setting up a test environment.

Can someone from WA give me some help here please?

Thanks

Sign in to reply to this post

Eric Mittman

You should use a MySQL GUI tool to import the .sql file for the database. On OSX I think the best tool to use is sequel pro. This tool will allow you to interact with your local MySQL server visually rather than on the command line. Once you use this tool to load the .sql file you will be able to proceed to the next step.

Sign in to reply to this post

keithlogan347721

Hi Eric,

Thanks for your reply. I have now managed to get a database created in MAMP and have imported the provided database table. I've also established a Database connection in DreamWeaver.

When I open the index.php file in a browser window I see the following code above the header logo:

GetContent(); ?> redirStr != "") { header("Location: ".$WA_Store_Cart->redirStr); } ?>

Is this a problem with the WA_Globals file? I'm not sure I have server details correct in this file. I've basically installed MAMP into my 'Applications folder'. Inside that I have an 'htdocs' folder and then I have a 'test_store' folder with all the PowerStore files.

So, at the top of my WA_Globals files I have:

$WAGLOBAL_Root_URL = "http://localhost/test_store/" ;

and then

$WAGLOBAL_localRoot = "/";
$WAGLOBAL_remoteRoot = "/";

Do I have the correct paths here?

Many thanks

Sign in to reply to this post

keithlogan347721

Hi,

I still can't get PowerStore to run for the first time. Can someone help please? I think its a problem with my paths in the WA_Globals file but I'm not 100% sure.

Also, I read in another post that you need to fill out info in the localhost.php file. I didn't see this mentioned in the help guide, but I tried filling out the database details but still can't get this to work.

Any help would be much appreciated!

Sign in to reply to this post

Eric Mittman

So you have your db created properly and are linking to it within DW correct? Also, do you have your php site defined in DW? I will need some more details about what is specifically not working for you in order to help determine what you need to do next.

Sign in to reply to this post

keithlogan347721

Hi Eric,

To be honest this is my first time in setting up MAMP, creating the database etc

As far as I can tell the database is correct, if I use phpMyAdmin I can see the database that I created and also the tables that I copied in from PowerStore database. I then followed the instructions on how to link it with DW, I can then see that the database and the included tables with the database dialog in DW.

So, if I open a browser (FireFox) and navigate to the test_store directory. I choose the index.php and hit open. The page opens but at the very top I see the following code:

GetContent(); ?> redirStr != "") { header("Location: ".$WA_Store_Cart->redirStr); } ?>

If I click on the Login link in the top right hand corner I get the following error:

Firefox can't find the file at /Applications/MAMP/htdocs/test_store/<?php echo($assumedRoot); ?>users_LogIn.php.

I'm not sure I have the info correct in the WA_Globals file. Here is what I have:

<?php
$WAGLOBAL_Root_URL = "http://localhost/test_store/" ;
$WAGLOBAL_Site_Name = "My Store" ;
$WAGLOBAL_Address = "8899 University Center Ln Suite 330";
$WAGLOBAL_City = "San Diego";
$WAGLOBAL_State = "CA";
$WAGLOBAL_Zip = "92122";
$WAGLOBAL_Country = "US";
$WAGLOBAL_GoogleAPIKey = "ABQIAAAAXafbUiGiRYj0bogExLhVCRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxT5czkOfeMRZCjwJ7_QG4gFmJ1OGQ";
$WAGLOBAL_localRoot = "/test_store/";
$WAGLOBAL_remoteRoot = "/";

Does this help?

Sign in to reply to this post

Eric Mittman

It seems that you have the db and site setup correctly and the globals setting look fine also. What does not seem rite though is the message you are getting at the top of the page, I think the message you are getting with the link to the login page is the same issue. It seems that your php server is not running or turned on. If php were running you should not see the php code, you should only see the output of this code in your page. The only way you should be able to see the php code on your page is if you are viewing the .php page in DW or another editor or through the file protocol in a browser.

To do a test of the php server you will need to make a php info page. You can do this by having any php page with this as the first line:

php:
<?php phpinfo(); ?>



You can have a page that has only this line of code on it, you just need to ensure that it is a .php page. Test this page out and it should give you all the details for you PHP server.

Someone else looking at this thinks that your testing server URL may not be set correctly in your testing server, what do you have for the URL prefix in your testing server settings in DW? The testing server url prefix should be like you have here in the globals file:

test_store/

Please check these things and let us know what you discover, also let us know what is present in the address bar when you attempt to preview one of these pages.

Sign in to reply to this post

keithlogan347721

Hi Eric,

Sorted! The problem was down to the URL prefix in DW, I've corrected this and it now loads!

Thanks!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...