Search the Community
Showing results for tags 'chapter 7'.
Hi Larry, Well your C book finally arrived down here in the antipodes:-) And I'm enjoying going through it a lot. It is helping to clarify some mis-conceptions that I had. On page 146, the first line in fact, you have a signifier %lu but the downloaded code has %llu. Is this a minor errata or am I seeing double?? I checked the book errata but it's not there. Thanks again for a great book. Cheers from Oz.
I've been having trouble understanding what exactly the salt argument and its purpose are. Can someone explain it in context (give an example?)? I've also been having some trouble with step 4 in the example in the book. I'm using phpMyAdmin and when I type in the code, it says that 'nacl' is not identified. Is this normal? If so, is there a way I can get around it or do I have to use the shell? Thanks!
I have been reading through all the URI based posts but I still can’t get the Coffee site example working on my local machine. I have my site located here: C:\apache\htdocs\eCom01\ I have the following setup in my config.php file: define('BASE_URI','C:/apache/htdocs/eCom01/'); define('BASE_URL','http://localhost:8080/ecom01/'); define('MYSQL','includes/mysql.inc.php'); When I view http://localhost:8080/ecom01/shop.php all images display and data is being pulled from the database. Here’s what the relative links look on this shop.php file: require('./includes/config.php'); include('./includes/header.html'); require(MYSQL); Inside my header.html file I have tried to setup the links 2 different ways: <li><a href="/shop/coffee/">Coffee</a></li> <li><a href="./shop/goodies/">Goodies</a></li> When I click the Coffee link, I get a NOT FOUND error (The requested URL /shop/coffee/ was not found on this server.) Somehow it is dropping the “/eCom01/” folder… When I click the Goodies link, the page displays all the content from the database, but does not display the css file or any of the pictures. I have been trying to trouble shoot this, but cannot come up with a fix. I have tried defining the BASE_URI and BASE_URL to many different values, but no matter what I set those to, I get the same results. I also added an echo $_SERVER['DOCUMENT_ROOT'] ; command on the shop.php file. This always displays “C:/apache/htdocs” I am assuming this issue has something to do with setting the BASE_URI and URL items, but I can’t figure it out. Even if I comment out those 2 lines, the mySql connection still works. Is there some setting I have change in my apache configuration file to allow these changes? When I change these URI and URL variables, shouldn’t the $_SERVER[‘DOCUMENT_ROOT’] reflect them? Any and all help is appreciated.