Skip to main content
Participating Frequently
August 18, 2006
Question

Dreamweaver & PHP Testing Server Problem

  • August 18, 2006
  • 2 replies
  • 958 views
Hello everyone. I'm a longtime graphic designer, but new to coding. I've installed PHP5, MySQL & phpMyAdmin on my G5 (OS X), and have them running.

I have a client that bought a PHP template that I need to modify. I've downloaded all of the files from the server, but I can't seem to get DW to recognize the PHP code. I assume that I'm supposed to set up the testing server, and the URL I've set as: http://localhost and it doesn't work. I'm uncertain of the path.

I have MySQL and PHP in their default install locations (from binary installs), and phpMyAdmin in:

HD > Library > WebServer > Documents

The actual local site files are located in:

~/Sites/ClientFolder

Can you help me get my head around this?
This topic has been closed for replies.

2 replies

Participating Frequently
August 19, 2006
Well, I think they're working correctly. I was able to create a PHP info test ("test.php" ) file, which I placed in my Sites directory, then in my browser, I point to http://localhost/~QCG5/test.php, and it comes up fine. Does that indicate it's working well? (Now, I did try to connect to MySQL using a test script:

<?php

echo mysql_connect ('localost', 'QCG5', 'password');

?>

But, I just get a blank page. Note that I don't know *anything* about PHP. I found these test suggestions online.

Ideas?
Participating Frequently
August 19, 2006
I'm not getting anywhere. I'm not sure if I should do this, but when I click "Live Data," I get the following error:

HTTP error 404 (file not found) occurred while attempting to request the file http://127.0.0.1/~QCG5/Sites/son/www/catalog/www/catalog/index_1ml0k495gy.php from the testing server.

Notice that the www/catalog directories are duplicated? I don't have them duplicated in my URL prefix. Is this what is causing my problem?

By the way, I have confirmed that Apache/PHP are communicating. I created another small PHP file when checks the time, placed into the /Sites directory, and it works fine when called from http://localhost.

Please help!
August 22, 2006
Hi, don't no much about OSX ( got to OS 9.x at work) but do you have some kind of domain name system set up somewhere? Be it in OSX or Somewhere else? If a record in the DNS system is set up incorrectly,it can give a duplicate entry of the form http://www.example.com/site/example.com/site.This is because of the missing . (dot) at the end of A (?) records
Just my 2 cents worth
axl
support engineer Belgium
Inspiring
August 19, 2006
rhino880 wrote:
> The actual local site files are located in:
>
> ~/Sites/ClientFolder

In the site definition, the Testing Server definition should be as follows:

Server model: PHP MySQL
Access: Local/network
Testing server folder: Macintosh HD:Users:username:Sites:ClientFolder
URL prefix: http://localhost/~username/ClientFolder/

Replace "username" with your Mac username.

--
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Participating Frequently
August 19, 2006
Thank you, David. However, it's still not working for me. The index.php file is actually in:
~username/Sites/ClientSite/www/catalog/index.php (this is the structure that was set-up by the client's template)

So, I changed the URL in Testing Server to match the above (minus the file name), but nothing happens. Also, I get the following warning:

"The site URL prefix [/~QSG5/son/www/catalog] for the testing server does not match the site URL prefix [] specified in HTTP Address for the site. This may cause pages using site relative links to display incorrectly at runtime. Proceed anyway?"

I changed the directories in Site Definition to match where that index.php folder is actually at, but no luck. (I had the root folder previously set to .../ClientFolder because I created a temp splash page for my client, so placed my index.html page there, but the actual site is in that /catalog directory.

Ideas?