I'm on pset8. I finished implementing search.php and was now testing it with the urls given but this is the result to every url
2 Answers
Here's what I did to (I think) make it work (or at least it displays a blank white page with the info from the database which I hope is what it should be)
chmod 640 config.json
chmod 710 vendor/
chmod 730 includes/
chmod 640 includes/config.php
chmod 710 vendor/library50-php-5/
chmod 731 vendor/library50-php-5/CS50/
chmod 740 vendor/library50-php-5/CS50/CS50.php
EDIT: Had to add
chmod 740 public/search.php too
(not reflected in screenshot) EDIT 2: And
chmod 640 includes/helpers.php
EDIT 3:
Knocked my head against this for a while as there was no blatant error message
chmod 740 public/update.php
Just in case I missed something here's screenshots of my permissions once I got it working as well as a conversion chart between numbers and letters
-
Beautifully formatted post, and I'm very glad that you got things working. However, your suggested permissions are unnecessarily lax. Please follow these instructions instead. Commented Sep 18, 2016 at 1:59
Check the permissions on the search.php
file. Try setting them to chmod 600 search.php
and if that doesn't work, try chmod 640
.
What version of ide50
are you running? (The number in the top bar near the upper right corner.) if it's version 59, try update50
.
EDIT: I clearly answered this question before I wrote 403 Forbidden / permissions / chmod -- the Definitive Guide on the CS50 Reddit. This document should get anyone's permission problems sorted in short order. The permissions suggested by @DovidM are unnecessarily lax.
-
1I'm running version 60 and have the same problem. Changed my permissions to what you said, didn't work. Even changed it to 777 to see if that would work, but it didn't. However when I had the permissions on 777, it showed me a different error, pointing at the line the line that requires config.php (which I'm assuming refers to the second error when permissions are stricter, as in the picture above. Changed permissions on that, but didn't help. (changed permissions back to original after checking)– David MCommented Aug 8, 2016 at 20:08
-
I did exactly the same as Dovid M and got the same errors. And I'm running version 60 Commented Aug 8, 2016 at 20:57