Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by armlocker

  1. Thanks Larry, I have managed to set up the mod_rewrite working within the site, but fluke - I don't know what I did except play around in hosting and viola, the Goodies link now works too Fix mod_rewrite and you fix the Goodies link (www...../shop/goodies) and the other thing found out in the forum is making all links begin with a /, as opposed to .. (like in the beginers php). PS: everything after page 210 is falling into place really easily for once and the whole shop is nearly up!! Cheers
  2. Hi there. Problem: The Goodies link doesn't; but the Coffee link works. I appreciate there could be various possibilities as to why this is happening, thus not sure how to tell you what I think should be done. One question on page 175 I don't understand is: How to turn on mod_rewrite? How do you know its working? (I'm only up to page 209, so anything after that is above me) Guidance much appreciated!
  3. (Maybe I'm wrong) Is there an error on page 213, top paragraph "....results shown in Figure 8.5" There is no Figure 8.5 in the book?? Or is there??
  4. All sorted. My web hosting company didn't support Stored Procedures so I found a alternative php script written by the one and only LU is some of his blogs; here are the links for future references: CHAPTER 8 ALTERNATIVE TO STORED PROCEDURES = shop.php / browse.php / sales.php / index.php http://www.larryullm...dard-php-mysql/ CHAPTER 9 ALTERNATIVE TO STORED PROCEDURES = cart.php / wishlist.php http://www.larryullm...ql-2-chapter-9/ CHAPTER 10 ALTERNATIVE TO STORED PROCEDURES = checkout.php / billing.php / final.php http://www.larryullm...l-3-chapter-10/
  5. Dear All -- last nights support was awesome! I have found the questions to my answers and here they are: CHAPTER 8 ALTERNATIVE TO STORED PROCEDURES = shop.php / browse.php / sales.php / index.php http://www.larryullman.com/2010/12/07/rewriting-the-e-commerce-stored-procedures-with-standard-php-mysql/ CHAPTER 9 ALTERNATIVE TO STORED PROCEDURES = cart.php / wishlist.php http://www.larryullman.com/2010/12/18/rewriting-the-e-commerce-stored-procedures-with-standard-php-mysql-2-chapter-9/ CHAPTER 10 ALTERNATIVE TO STORED PROCEDURES = checkout.php / billing.php / final.php http://w
  6. PROBLEM SOLVED: insofar as the Jedi Master of PHP has foreseen such problems arising. visit: http://www.larryullman.com/2010/12/18/rewriting-the-e-commerce-stored-procedures-with-standard-php-mysql-2-chapter-9/ and therein lies the golden egg to circumventing stored procedures!!!
  7. Ohio Gozaimasu!!! I will take your inspiration and start looking into prepared statements. The question is, without guidance from a book I'm not sure how to enter anything I learning into the set of scripts in Larry's ecommerce book - did you have to do this? Arigatou
  8. Anotonio, are Nowegians always this kind? I really appreciate your call, and if you were in London I would pat you on the back and buy a Heineken. I do want to learn this thoroughly with a view to designing a really cool website. So what I want to do in this case is research another host: (HostGator; iPage; DreamHost; Go Daddy, etc) and at the same time find out how to convert stored procedures to standard PHP MySql, which I will set up a new post for, because my original problem has now escalated to level 10!! Thanks, Best Regards, London, UK
  9. I can't believe it but my hosting provider Fatcow doesn't support stored procedures! I am truly snookered because I can't proceed further with the exercises in the book and a quick trawl online shows it will cost an arm and a leg to join a hosting company that supports stored procedures. There must be another way around this, I should reall post this under a different heading really.
  10. ...not at all. It's part of the process of elimination. Lets see what happens next, and thanks for your time.
  11. nope - that didn't work either Please see this: in the meantime I am still waiting for my hosting provider to get me about this "Create Routines" permissions as mentioned in the "big man's" book. ErrorSQL query: DELIMITER $$; MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$' at line 1
  12. Well well, I have been going round the blocks trying work out how to put this Stored Procedure into PHPMYaDMIN, and have been at loggerheads as to what is "Create Routines" permissions with the hosting company. For example, I am trying to do this (page 201) in the SQL box: DELIMITER $$ CREATE PROCEDURE remove_from_wish_list (uid CHAR(32), type VARCHAR(6), pid MEDIUMINT) BEGIN DELETE FROM wish_lists WHERE user_session_id=uid AND product_type=type AND product_id=pid; END$$ DELIMITER ; But all I keep getting is this error: ErrorSQL query: DELIMITER $$ CREATE PROC
  13. I also have another theory.... basically, I am not able to put through any of the Stored Procedures in PHPMYADMIN. Would you think this has anything to do with it?
  14. Hello Again Antonio - what would I do without you. The variable: $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); seems to be the only thing returning an error. Will you cast an expert eye over the error message printed out at: www.wolfcut.co.uk
  15. Hi there - the most hated problem has occurred (for amateurs at least) can't connect to database message An error occurred in script '/hermes/waloraweb004/b1384/moo.laissezfairelondonco/wolfcut.co.uk/views/home.html' on line 14: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given index.php line 14 // Require the database connection: require ('../mysql.inc.php'); folder structure mysql.inc.php (outside web root) beans (folder) --------- > index.php (with the error message) --------- > billing.php
  16. Dear All - can anyone see what the syntax error is in the following stored procedure error? Thanks SQL query: DELIMITER $$ CREATE PROCEDURE select_categories( TYPE VARCHAR( 6 ) ) BEGIN IF TYPE = 'coffee' THEN SELECT * FROM general_coffees ORDER BY category; MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER $$ CREATE PROCEDURE select_categories (type VARCHAR(6)) BEGIN IF ty' at line 1
  17. ah yes -- I just contacted the hosting server and I had the wrong password in the database to what I had in the mysql_connect script. School Boy Error. Thanks dude
  18. Hiya all I'm using a hosted server (FatCow). Folder Layout ecommerce (folder) ----> admin (folder) ----> add_print.php / add_artist.php mysqli_connect.php Add_print.php // This page allows the administrator to add a print (product). require ('../../mysqli_connect.php'); // Create a temporary file name: $temp = '../../uploads/' . md5($_FILES['image']['name']); Error message: Could not connect to MySQL: Access denied for user 'tango'@'cgi1801.int.bizland.net' (using password: YES)
  19. Can anyone see why PHPMYADMIN is spitting out this error message: MySQL said: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL, price DECIMAL(6,2) UNSIGNED NOT NULL, size VARCHAR(60) DEFAULT NULL,' at line 5 Error SQL query: CREATE TABLE prints( print_id INT UNSIGNED NOT NULL AUTO_INCREMENT , artist_id INT UNSIGNED NOT NULL , print_name VARCHAR( 60 ) DEFAULT NOT NULL , price DECIMAL( 6, 2 ) UNSIGNED NOT NULL , size VARCHAR( 60 ) DEFAULT NULL , description VARCHAR( 255 ) DEFAULT NU
  20. I dont know what value is supposed to appear in the $dest variable.... or how to make [tmp_name] => /tmp/php2WBJyB get transferred to the $dest
  21. I've amended the config fig to take care of that missing '/'. values now read like this: [HTTP_POST_FILES] => Array ( [pdf] => Array ( [name] => transformers 2 poster.PDF.pdf [type] => application/pdf [tmp_name] => /tmp/phpumhDHE [error] => 0 [size] => 971389 ) ) [_REQUEST] => Array ( [MAX_FILE_SIZE] => 1048576 [title] => tra [description] => sdfasdf [submit_button] => Add This PDF
  22. (please see below) [tmp_name] => /tmp/php2WBJyB [tmp_name] => 7ac2b0088160002e300ee1fdb8fc44557def0b29 [dest] => ./pdfs7ac2b0088160002e300ee1fdb8fc44557def0b29_tmp
  23. yep slowly but surely.... I didn't know I had to give these guys values: $tmp_name = sha1($file['name'] . uniqid('',true)); // Move the file to its proper folder but add _tmp, just in case: $dest = PDFS_DIR . $tmp_name . '_tmp'; if (move_uploaded_file($file['tmp_name'], $dest)) { // Store the data in the session for later use: $_SESSION['pdf']['tmp_name'] = $tmp_name; $_SESSION['pdf']['size'] = $size; $_SESSION['pdf']['file_name'] = $file['name']; =================== On a brighter note, I've complete everything else on knowledge is power, including the
  • Create New...