1

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

enter image description here

0
0

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 Chmod 1/2 Chmod 2/2 Letters to numbers

1
  • 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. Sep 18 '16 at 1:59
0

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.

2
  • 1
    I'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 M
    Aug 8 '16 at 20:08
  • I did exactly the same as Dovid M and got the same errors. And I'm running version 60 Aug 8 '16 at 20:57

Not the answer you're looking for? Browse other questions tagged .