Jump to content
Larry Ullman's Book Forums

All Activity

This stream auto-updates

  1. Yesterday
  2. Last week
  3. Thank you Larry for your help. Your solution worked perfectly in the interim! After changing the storage engine to MyISAM and attempting other workarounds, the problem still incurred. Later I realised for a specified key to be too long, the charset used in the client must be consuming too many bytes and could therefore not be UTF8. The problem was due to my accidental omission of: CHARSET UTF8; I would have expected unusual characters to be stored in the database if the charset were wrong however this was an error thrown before any database population could have ta
  4. Thanks for the nice words. Yeesh on this error message, though! That command creates four keys (or indexes): on user_id, on username, on email, and on the combination of username and pass. None of those seems to be 100 bytes! My hunch is it's the login key that's causing the problem. Try removing that from the command (and delete the comma after `UNIQUE (email)` and try it again.
  5. Hello, I would appreciate any assistance I can receive. While following the instructions provided in chapter 17 to create the users table for the forum2 database (page 553), I had encountered the following error: CREATE TABLE users ( -> user_id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, -> lang_id TINYINT UNSIGNED NOT NULL, -> time_zone VARCHAR(30) NOT NULL, -> username VARCHAR(30) NOT NULL, -> pass VARCHAR(255) NOT NULL, -> email VARCHAR(60) NOT NULL, -> PRIMARY KEY (user_id), -> UNIQUE (username),
  6. Earlier
  7. You're most welcome. I'm glad to hear it and thanks for posting this!
  8. This is now in production. I've attached the code for anyone else who might be in a similar situation. if ($local) { // development echo <<<DD1 <!-- DEVELOPMENT TEST!!!--> <div class="paypal_box"> <!-- right-shifts the div --> <!-- first the PayPal Logo - see: https://www.paypal.com/us/webapps/mpp/logo-center --> <img class="PP_logo" src="./images/PP_logo.jpg" alt="PayPal Logo"> <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <inp
  9. Hi Larry, I just want to say "Thanks" for the guidance from this book and also the E-Commerce book. I followed a lot of the e-commerce guidance for a shopping cart, PayPal and used MySQL joins as per this book and eventually all went well. Cheers from Oz, Necuima
  10. Aside from the use of a cookie, the sessions are an entirely server-side thing, and the method in the book just uses a different cookie. I can't imagine this is messing up Google Analytics. How do you know you can't reach Step 3 without Step 2? Keep in mind that even if Step 3 checks that Step 2 happened and reports an error message if it didn't, that still counts as a page view for Step 3.
  11. I have setup Google Enhanced Analytics on my website to track each stage of the checkout process. I.E. 1) Step 1 - View Cart 2) Step 2 - Add Billing Details (Checkout page in book) 3) Step 3 - Review order, add payment details This triggers when a user loads each page. However the Google analytics is showing more users are reaching Step 3 than are reaching the Step 2 (an impossible event). So I am wondering, as per the book: "The shopping part of the site purposefully does not use sessions (in order to give longevity to the customer’s cart and wish list), but the checkout proce
  12. Yeah...sometimes with free things you get what you pay for! There are alternatives, though, such as: https://rapidapi.com/apidojo/api/yahoo-finance1 That requires signing up for an account and using their SDK. Offhand I don't know of a free comparable to the Yahoo! Finance API.
  13. Yahoo deprecated the API in Oct 2012 so the URL in Script 10.1 (get_quote.php) will not work.
  14. Found a hack that makes it work. In the utilities.inc.php (Script 9.3) changed the class_loader; From: function class_loader($class) { require('classes/' . $class . '.php'); } To: function class_loader($class) { $findme = '_'; $pos = strpos($class, $findme); if ($pos === false) { require('./classes/' . $class . '.php'); } else { $file = str_replace("_", "/", $class); require($file . '.php'); } } This fixes the loading of QuickForm2 classes in PHP 8.0.
  15. Ah, right. Sorry for the confusion and my mistake. Chapters 12 & 13 are the only ones that interact with a database. Chapter 12 has a script that creates the database. Chapter 13 has a single CREATE TABLE command, which is in the book. That's why there's no dedicated SQL file in the download. With 20+ books, I had forgotten which books had what. But the download contains a README file and 13 folders of scripts. There's more than just the .DS_STORE file, correct?
  16. PHP for the Web: Visual QuickStart Guide (4th Edition) only gives me .DS_STORE file and no SQL files in download.
  17. Have determined that it is an issue with spl_autoload_register in the utilities.inc.php include file. QuickForms2\Loader.php loads the Quickform2 classes but doesn't use spl_autoload_register. It is mentioned in the comments of Loader.php (line 96 - 108). When I comment out the spl_autoload_register in utilities.inc.php the form loads but obviously get an error on $USER in the header.html and footer.html since they reference those when loaded.
  18. Made post under B Mann to your question, see above. This morning I uninstalled XAMPP and reinstalled. Also had to do a new pear install (php go-pear.phar) since the pear version in XAMPP still has curly braces for arrays that was eliminated in the current version of PHP that is installed with XAMPP. Reloaded the htdocs and mysql directory and launched localhost/index.php. Got the same error as before.
  19. Larry, since it hasn't been 24 hours from my post I had to sign in with another user ID. In answer to your question: Used xampp shell pear install (pear install QuickForm2-2.2.0). It appears to me that it finds the classes down to HTML/QuickForm2/. I have been struggling with this for over a week. At one point I even went into each source that is called (Node, Rule, etc.) and changed the path reference for the required files in each of the source to the actual path from the root directory down. Still didn't work. Thought that maybe it was a memory issue so changed the name of InputHidden.
  20. Thanks for all the info. This is almost certainly a CSS issue, although there's a small chance there's an HTML problem. Most likely the path to your CSS file is incorrect. What URL are you using for your site? And where did you put the CSS files? And what paths are you using for your CSS files?
  21. Ugh, this is an annoying type of problem! Basically HTML QuickForm can't find the resources it needs, which either means they weren't installed OR they were installed but HTML QuickForm can't find them. If it's the latter, that's normally b/c the files weren't installed in the right location OR PHP isn't looking in the right location. What steps did you take to install HTML QuickForm?
  22. When testing the login.php, get the following error: Warning: require(classes/HTML_QuickForm2_Element_InputHidden.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\includes\utilities.inc.php on line 6 Fatal error: Uncaught Error: Failed opening required 'classes/HTML_QuickForm2_Element_InputHidden.php' (include_path='.;C:\xampp\php\pear;C:/xmapp/php/pear/') in C:\xampp\htdocs\includes\utilities.inc.php:6 Stack trace: #0 [internal function]: class_loader('HTML_QuickForm2...') #1 C:\xampp\php\pear\HTML\QuickForm2\Loader.php(55): class_exists('HTML_QuickForm2...',
  23. Good morning! So I'm working on the expanding of the ex1 site and realized I never actually went through fixing what's going on with the drop down menus not showing up. I realized it was missing some bootstrap files (bootstrap.min.js, bootstrap.min.js.map, and bootstrap.min.css.map for anyone else who may run into this issue.) The console is clear, great! Except, now, below is my new navigation bar. When I log in as a user, the drop downs work as well, fantastic! It just doesn't look the way it's supposed to and I'm confused about that since all I ad
  24. There's no SQL in the .DS_STORE file. That's a remnant from the Mac OS. You can ignore it. All of the SQL commands are found in files with a .sql extension.
  25. Larry Ullman it's not cool putting SQL Scripts in DS_STORE file. I can't access them! Please don't tell me to read a bunch of stuff an amateur don't understand, wasting my time. I bought several of your books because of the ease of working through them. Not a good Idea to depart from that. Don't make getting through the book hard. Keep it super low stress. I need the SQL Scripts in text format. Thanks.
  1. Load more activity
×
×
  • Create New...