PDA

View Full Version : trouble setting up database using php & mysql


robert4442
03-04-2005, 12:03 AM
I am trying to learn how to create a mysql database using macromedia Dreamweaver MX 2004 and php. I am a newbie to php and mysql. I have been using Dreamweaver for many years building static sites.

I need to learn how to build dynamic web sites using Dreamweaver, PHP and mysql.

My plan of attack is to set up on my local computer apache 2.0.50.(win 32) server, php 4.01, and mysql server -mysql 4.0.20d-win.

After I am successful in learn how t do this on my local computer I will then move everything to my remote Linux server.

I have installed apache, mysql and php on my local computer. I also have installed Dreamweaver.

I am having a problem getting php and apache to work together. I have apache info as follows from the conf file:

Server root = C:/Program Files/Apache Group/Apache2/
Server Admin = my email address
Server Name = business-net.com One of my domains
Document Root = C:/Program Files/Apache Group/Apache2/htdocs
Directory = C:/Program Files/Apache Group/Apache2/htdocs
UserDir = My Documents/My Web Sites
Directory Index = index.html index.html.var

I went into Dreamweaver and set up the site definitions for php:

Local Site:
Site name = RU Playing
Local Root Folder = C:\Documents and Settings/Robert/My Documents/My Websites/ruplaying-php/
Default Image Folder = C:\Documents and Settings/Robert/My Documents/My Websites/ruplaying-php/Images/
Remote Site:
http:// address = http://ruplaying.com/ ('http://ruplaying.com/')
Remote Folder = C:\Documents and Settings/Robert/My Documents/My WebSites/ruplaying-php/
Images/

Testing Server:
Server Model = PHP Mysql
Access = Local/Network
Testing Server Folder = C:\Documents and Settings/Robert/My Documents/My Websites/ruplaying-php/
URL Prefix = http://localhost/ruplaying-php/ ('http://localhost/ruplaying-php/')

When I test a piece of php code in index.php I get he following
when I try to display it in live data view I get the following:

http error 2 occurred while attempting to request the file http://localhost/ruplaying-php/index_c967csopq.php ('http://localhost/ruplaying-php/index_c967csopq.php') from the server.

Here are some possible reasons for the problem:
1) Files in the “C:/Documents and Settings/Robert/My Documents/My Web Sites/replaying-php/”
Folder that have “.php” file extensions are not being processed by the Testing Server.
2)The C:/Documents and Settings/Robert/My Documents/My Web Sites/replaying-php/” folder does not map to http://localhost/ruplaying-php/ ('http://localhost/ruplaying-php/') URL on the testing server. Verify that the URL Prefix maps to the root of your site.

If I put http://localhost/ruplaying-php/ ('http://localhost/ruplaying-php/') in a browser, I get the following:

Index of /ruplaying-php
Name Last modified Size Description
________________________________________
Parent Directory -
Images/ 03-Mar-2005 08:55 -
index.php 03-Mar-2005 08:51 377
________________________________________
Apache/2.0.50 (Win32) Server at localhost Port 80


From here I am lost and do not know what to do?

After I confirm that PHP is working on my computer, the next phase is to build the database with mysql
Again using Dreamweaver and php.
Any help in this area would be appreciated