1

Haven't started my implementation of register but I followed the spec up to creating register.php and copying the contents on the specs over. When I navigate to register.php I get this error:

image

Is this behaviour expected or did something go wrong?

Thanks

2

Do not use chmod 777 views/*. That will probably help you to get your site to load, but it is bad for security, and a terrible habit to get into. It's like taking the front door of your house off of its hinges rather than using a key.

I have written about these permission problems in many places already, but the short version which should get you running is to do the following:

find ~/workspace/pset7/ -type d |xargs chmod 755
find ~/workspace/pset7/ -name *.php |xargs chmod 640
find ~/workspace/pset7/ -name config.json |xargs chmod 640

That should fix everything. If it does not, you might also need to:

sudo find /var/lib/php5 -name sess_* |sudo xargs chown www-data:www-data

The real reason for these errors is that the permissions have changed since version 59 of ide50, and the problem specifications have not been updated to reflect the new permissions. See this post on the CS50 Reddit for more info.

| improve this answer | |
  • 1
    That solved it! And also thanks for the tip about keeping good security habits – Chris Shi Aug 17 '16 at 4:20
-1

navigate to views in the terminal and do ls -all. You will find that your permissions need to be set. Go up one to pset7 (cd ../) then do a chmod 777 views/*. That will set all your permissions to go. You may want to do that for all the other files or wait for the error messages.

| improve this answer | |
  • Do not use chmod 777 views/*. That will probably help you to get your site to load, but it is bad for security, and a terrible habit to get into. It's like taking the front door of your house off of its hinges rather than using a key. – hotwebmatter Aug 17 '16 at 3:24

You must log in to answer this question.

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