BYO DB Driven Website...PHP...Ch.7

I took a month off from Kevin’s book and took a couple of PHP course’s on a site named after some lady. :blush: My bad! Now, I review the first 6 chapters of this book and started having problems! I’m sure I’ve made some typical noob errorz but I’m flummoxed and very frustrated right now.(:

The very first attempt to run the code in chapter 7 sends Safari to open a directory/Finder view instead of actually running the “index.php” file in the “author,” “categories” or “jokes” directories. The links in the “chapter7->admin” directory has a simple “index.html” file:

<li><a href="jokes/">Manage Jokes</a></li>
<li><a href="authors/">Manage Authors</a></li>
<li><a href="categories/">Manage Joke Categories</a></li>...

According to Mr. Yanks, this should automatically cause the “index.php” file in each of those three directories to do some error checking, DB opening and end up using the “jokes|authors|categories.html.php” file to display the appropriate info/options.

Instead, what I get if the dialog showing that Safari has downloaded the directory/folder! Adding the “index.php” to the reference just displays the raw php source.

Mac OS 10.6.7, Web Sharing enabled, PHP 5.3.4, mySQL…I now find I cannot log into phpMyAdmin :thinking: I’ll shutdown & startup in Single user and run some cache cleaners…

Be glad to listen to any suggestions after the laughing dies down.:lol:

Are both MySQL and Apache shown as running in whatever the Mac version of Windows Task Manager is called?

Are both MySQL and Apache shown as running in whatever the Mac version of Windows Task Manager is called?
Yes. And I ran some cleaning procedures finding many, many screens full of corrections…had a power drop earlier this PM…may have screwed up several files. At any rate, I can now open phpMyAdmin. That and a Preference Panel confirm those two apps are running.

However, it made no difference with the html file mentioned above. Clicking the link simply brings up a Finder window (a window showing any or all directories on internal and external devices…Windows Explorer?) showing the directory with the index.php file in it.

BTW, I went back to the files written for the on-line courses I mentioned (used php and mySQL) and they ran just fine. The style of coding is different, using more OOP methods, but the bottom line is that all the apps/systems are working.

UPDATE: I may be jumping the gun! At least my latest use of the html file is not doing anything with the OS. There may just be more info/editing to be done with the three “index.php” files a few pages on in the book. I was surprised and frustrated at the abnormal behavior I was getting which may all go back to the screwed up preference and/or cache files. If this turns out to be ‘egg on my face,’ I’ll come back and apologize profusely!!! :x Maybe fifty laps around the forums?! :eek: