Jump to content
Larry Ullman's Book Forums

Making Exercise1 Work In Mamp


Recommended Posts

Hello,

 

The file config.inc.php is important.

I send you mine because is near yours and he works

 

//config.inc.php extract

 

//base site racineMachine

define('BASE_URI', '/Applications/MAMP/htdocs/aCom/');

//base site browser

define('BASE_URL', 'http://localhost:8888/aCom/');

define('MYSQL','../mysql.inc.php');

define('PDFS_DIR', BASE_URI.'pdfs/');

 

//

So i think certainly you are writting

define('BASE_URL', 'http://localhost:8888/aCom/html/');

the problem is here. /html/

 

cordialy

 

ps. Sorry my english is not fluently->je suis desole mais je ne m'exprime pas tres bien en anglais. bon courage,le livre est vraiment tres bon et instructif.

  • Upvote 1
Link to comment
Share on other sites

Since you've put your files in a subdirectory (if I understand you correctly), you'll need to change the links in the HTML (primarily in the header) to be correct. And you'll need to change the .htaccess file so that it uses a different RewriteBase.

Link to comment
Share on other sites

Hi Larry,

Thank you for personally responding to my questions...

I am using MAMP. The root directory in MAMP is "htdocs"....when I unzipped the file "ecom_scripts_ex1.zip" from your website, Mac creates a folder called "ex1" and puts all the files and folders there.

I then moved that ex1 folder into htdocs, from then I tried to find the index.php file in the hopes of seeing a functional website that implements e-commerce. I however get the error as shown in my previous post.

 

I, just a few minutes ago, tried to make the program run without a subdirectory. That is a copied and pasted everything in the "html" folder within ex1 to htdocs(the root directory) and then copied the rest of the folders and files inside ex1 to the folder containing htdocs. I, however, am still getting the same error.

 

I am pretty much still a newbie with PHP, MYSQL, and Apache technology...so I am lost with your advise about .htaccess, especially since I still get the same error even if I don't use a subdirectory.....

Kindly show me how step by step how to make the ecommerce website work on my MAMP server. Thank you very much....

 

 

 

 

Since you've put your files in a subdirectory (if I understand you correctly), you'll need to change the links in the HTML (primarily in the header) to be correct. And you'll need to change the .htaccess file so that it uses a different RewriteBase.

Link to comment
Share on other sites

You're welcome for the help. I should point out, before going further, that this book does not teach PHP and MySQL. If you don't have a solid understanding of those two technologies, you're going to struggle with the book. In fact, the book does teach some advanced PHP and MySQL, so I worry it may be over your head if you're just getting going. I trust your judgement on that, though.

Link to comment
Share on other sites

Hi Larry,

 

Yes...I see what you mean....

I have decided to read your other book first "PHP6 and MySQL5" instead of jumping to the Effortless E-commerce Site.

I like your style of explaining...

Thank you very much....

 

 

You're welcome for the help. I should point out, before going further, that this book does not teach PHP and MySQL. If you don't have a solid understanding of those two technologies, you're going to struggle with the book. In fact, the book does teach some advanced PHP and MySQL, so I worry it may be over your head if you're just getting going. I trust your judgement on that, though.

Link to comment
Share on other sites

 Share

×
×
  • Create New...