Jump to content
Larry Ullman's Book Forums

garysd

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by garysd

  1. Thanks, Larry! That was simple. It's working now, and I just have to adjust some of the links and the image links.
  2. I'm using MAMP installed on Yosemite 10.10.2 installed at /Applications/MAMP. Everything worked perfectly when I had the files in the web root which is /Applications/MAMP/htdocs/. I then created a subdirectory named gtstore (/Applications/MAMP/htdocs/gtstore) and moved all the files into that directory. The code shown is copy & pasted from the files. I then made the edits shown in the Chapter 7, Server Setup "Using a Subdirectory" sidebar. This is the suggested change I made to .htaccess. The rest of the file was unchanged. <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine on # For the subdirectory of the store: RewriteBase /gtstore/ . . Next I made changes to the index.php file (/Applications/MAMP/htdocs/gtstore/index.php): // Require the configuration before any PHP code: require('./gtstore/includes/config.inc.php'); When I linked to the subdirectory from the web root I get a PHP error, and shown in the php_error.log: php_error.log: [20-Mar-2015 16:33:15 America/Los_Angeles] PHP Fatal error: require(): Failed opening required './gtstore/includes/config.inc.php' (include_path='.:/Applications/MAMP/bin/php/php5.6.2/lib/php') in /Applications/MAMP/htdocs/gtstore/index.php on line 7 This is the where the error is occurring: 6. // Require the configuration before any PHP code: 7. require('./gtstore/includes/config.inc.php'); I tried the .htaccess in two locations; /Applications/MAMP/htdocs/.htaccess and /Applications/MAMP/htdocs/gtstore/.htaccess, but not in both locations at the same time. I've been working on this all day, checking and double-checking my work. Am I missing something simple here? Thank you for any help! BTW, great book!
×
×
  • Create New...