What I've done so far:
I've installed MAMP and it works just fine.
I changed the default ports to the default Apache/MySQL ports.
Changed the default folder from /Applications/MAMP/htdocs to /Library/Web Server/Documents (Mac OS X 10.4.11)
Installed current release of Drupal 6
Setup dynDNS / dynDNS Updater and correctly configured. - Everything up to this point works great.

Problem:
•When I am on the server can go to http://localhost/ (or http://10.0.1.199) it displays the Drupal homepage just fine.
•But when I go to the alias.office-on-the.net, it shows the index.html that I placed in there for testing (because before I did that it would display the directory contents of the /Documents folder.
•If I type alias.office-on-the.net/index.php - I get:

<?php
// $Id: index.php,v 1.94 2007/12/26 08:46:48 dries Exp $

/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$return = menu_execute_active_handler();

// Menu status constants are integers; page content is a string.
if (is_int($return)) {
switch ($return) {
case MENU_NOT_FOUND:
drupal_not_found();
break;
case MENU_ACCESS_DENIED:
drupal_access_denied();
break;
case MENU_SITE_OFFLINE:
drupal_site_offline();
break;
}
}
elseif (isset($return)) {
// Print any value (including an empty string) except NULL or undefined:
print theme('page', $return);
}

drupal_page_footer();

Any help would be greatly appreciated.

Thanks and have a happy new year.

Comments

ktleow’s picture

Your PHP is not properly configured.
And make sure you set index.php before index.html.

Look for this line in Apache httpd.conf config.
DirectoryIndex index.php index.html index.htm

-----
Drupal theming services, PSD to Drupal
http://kahthong.com

Anonymous’s picture

I've changed the DirectoryIndex, the .php displays as opposed to the .html, thank you. Unfortunately the

<?php
// $Id: index.php,v 1.94 2007/12/26 08:46:48 dries Exp $

Still appears. Any additional suggestions? Thanks for your help.

http://www.mccammonphotography.com

dnewkerk’s picture

If this ever happens on a shared web host where you don't have access to httpd.conf on the server you can adust the setting in your .htaccess file at the root of your Drupal installation.

-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides

dnewkerk’s picture

Forgot to mention...

On MAMP, personally I like to set up simple Virtual Hosts for my Drupal sites.

In Applications/MAMP/conf/apache/httpd.conf:
Uncomment: # NameVirtualHost *

Add:

<VirtualHost *>
	ServerName drupal.dev
	DocumentRoot "/path/to/htdocs/mysite"
</VirtualHost>

Using Hosts Widget I add the local domain and local IP (for me 127.0.0.1). You can also directly edit /etc/hosts with Terminal if you prefer (need to sudo to write to the file).

Then restart Apache in MAMP, and your new site should be accessible at http://drupal.dev and benefits from the same virtual host separation as a real online site. Only takes a minute or two to setup. You don't need the .dev, I just like to do that to simulate a regular domain.

Lastly, if you're using standard ports for Apache and/or MySQL, then these can conflict with OS X's own copy of Apache if it's running. Personally I leave OS X's web sharing and other built in web serving functions turned off, and give it all to MAMP.

-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides