Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About artsyL

  • Rank
  1. Thanks! The error was "Call to undefined function password_hash()." I had to call the hosting service to find out why it was reverting to 5.4.
  2. I'm not sure what I'm missing, but the bcrypt code I have been using is generating a blank page, though I have tested for syntax errors and firebug says there are no errors. The php on the server is definitely set to php 5.5.; The db is set to varchar (60); Here is the only code I have changed. I added this: //password hash function $hash = password_hash($pw, PASSWORD_BCRYPT); if (password_verify($pw, $hash)) { // password valid! } else { // wrong password echo "wrong password"; } and I changed $pw: $q = 'INSERT INTO users (fn, ln, username, email, pw) VALUES (?, ?,
  3. I ended up using Plupload, in case anyone is interested. It's pretty good, but the documentation is really sparse.
  4. I'm rebuilding a registration system with the model from your book, but I keep coming across articles that say SHA1, SALT, and SHA256 are not very useful anymore. Therefore, I am thinking of using scrypt, or something like it to handle encryption. Is this an overblown issue? If it is a valid concern, do you have any advice on how to implement it with the code from the book? I am using a hosted server, in case that is important for downloading etc.
  5. Welp, after four days on this, I'm done (for now anyway). Your next book (I have three - just started on the "advanced..." book) really should include a tutorial on this. It seems like it should be reasonably easy to figure out, but with all the loops, counts, and array issues, there are really too many things that could go wrong. It's difficult for a semi-beginner (me) to even identify a problem. Thanks anyway.
  6. I'm officially stumped. Now I'm getting a blank screen. Here is the state of things. I feel like I'm close, but can't quite put my finger on the problem. I thought it was the code at first (and fooled around with it forever), but then I caught a problem with the form (no [] included, duh), then I started from scratch and something went wrong somewhere. The form: <p>Upload images: <input type="file" name="image[]" multiple/></p> The process: //Check for an image if (is_uploaded_file ($_FILES['image']['tmp_name'])){ for($i=0; $i<count($_FILES['image']['na
  7. I'm afraid that I'm barely beyond "monkey see, monkey do" when it comes to query loops and I can't find an adaptable example (did I miss something in the book? I'm not quite all the way through). Would you mind adding an example, please?
  8. I already have three of your books (the most recent being effortless e-commerce...), and I'm looking to add a social media aspect to my current project. I know almost nothing about frameworks because I prefer doing things from scratch and never really looked into it. What I do know is that I would like to have it finished within a year (from scratch would take much more time); and that reviews tend to give Elgg the best reviews for what I want to accomplish. The only reason I am leaning toward Yii is that you are writing a book on it, so my question is: Would Yii be a good choice for an im
  9. This is where I got to since last night (adapted from http://stackoverflow.com/questions/12766035/php-upload-multiple-files): I am getting an error from the insert query("system error"), so I think the multiple upload might actually be working. How do I loop the insert query? Should I include it in the first IF statement, or would this be hackish? Am I getting ahead of myself? //Check for an image if(isset($_POST['image'])){ $count=0; foreach (($_FILES['image']['tmp_name']) as $file){ if (is_uploaded_file ($file)) { //create temporary file name $temp = '../../uploads/'
  10. HTML 5 allows this kind of multiple upload input <p>Upload an image:</b> <input type="file" name="image" multiple/></p> so I'm wondering, has anyone come up with a fancy fix for dealing with the extreme awkwardness of $_FILES arrays? I'm having way too much trouble figuring out a count/foreach method for this. What I have is comically incomplete because I keep trying new things, but I'm also afraid to break what I already have that works. Any suggestions? if(isset($_POST['image'])){ $count=0 foreach (($_FILES['image']['tmp_name']) as $tmp)
  11. This my abridged script with an image instead of a file name, and without the file extensions, in case you are interested. Thanks again! Love the book and the forum site! The Javascript <script language="JavaScript"> <!-- // Hide from old browsers. // Make a pop-up window function: function create_window (image, width, height) { // Add some pixels to the width and height: width = width + 10; height = height + 10; // If the window is already open, // resize it to the new dimensions: if (window.popup && !window.popup.closed) { window.popup.res
  12. Thank you! So, just for fun I stripped the file extension IF, and it now displays everything on my browser. If I decide to be lazy and leave it like this (If I apply this to my project I will have to change and test a bunch of pages to make it work everywhere), is it going to slow down the server/browser? Will it be a huge issue in lesser used browsers (so far it works in FF and Chrome)? By the way, do you have a book that teaches how to include navigation features in the pop-up (like pan, zoom, etc)?
  13. Totally by accident, I discovered that because the image names are id numbers without image extensions, the images will not show. So here's my question. For security, is it best to strip the "make sure there is an image extension" portion of the show_images script, or should I change my upload method to include the extensions? Why?
  14. Here is the test site (I'm a freshly minted digital librarian and not so freshly minted archivist, so I'm learning new skills). (removed by user) It has the scripts from the book and my attempts (prefaced with JS). Thanks!
  • Create New...