4
votes
Accepted
PSET7: web server permissions problem
403 Forbidden / permissions / chmod: the Definitive Guide
TL;DR:
PHP files and config.json need to be set to chmod 640 despite what it says in the Problem Specification.
Hope this helps!
2
votes
Accepted
Problem Set 8 / Web Track - Finance (RuntimeError: UNIQUE constraint failed)
A problem is here: if rows == 1:. Remember, execute returns a list of dictionaries, therefore that conditional is never true.
1
vote
Accepted
Blocked on C$50 Finance suggested personal touch feature - adapting index page to enable transactions in situ
The proximate cause of the error is id is not submitted with the form. There may be an easier way that would eliminate the code that is presumably duplicated between index and buy/sell.
The button ...
1
vote
Accepted
Week 8 - Finance - Buy - Getting Error Message Missing Shares
The name for shares is "symbol". It is in this line:
<input autocomplete="off" autofocus class="form-control" name="symbol" placeholder="Shares" ...
1
vote
Accepted
finance cosntraint syntax error
The SQLite does not support adding constraints to existing tables.
The use of an unique index shall deliver the same effect.
CREATE UNIQUE INDEX example ON illustrations (reference)
The documentation ...
1
vote
Accepted
Finance sql doubt
Sure. Use the UPDATE sql command, It'll take the form of "UPDATE table SET some value WHERE some_condition". Google sql update
For example:
UPDATE users SET firstname = "Fred", ...
1
vote
Accepted
Web track finance error
The "sequence" in the error message is shares, which is a string. From MDN doc on sending form data:
Whichever HTTP method you choose, the server receives a string that will be parsed in ...
1
vote
Accepted
Finance Register Checking for Duplicate Username Not Working
Iirc the users table in the db was provided for us, so while Cliff's solution would work it's not the issue.
I'm not sure if the SQL in the below function is calling anything, so nothing will be ...
1
vote
Accepted
PSET Tracks Flask and JS
The name of the attribute is 'disabled' (past tense), not 'disable'. And, of course, "submit" is enabled by default, so the toggle will not work if nothing is entered in the "task" input before the "...
1
vote
Why can I not open my website in HTML?
"open index.html" is not the appropriate command to open the browser, if we are in the appropriate directory, this command will open a file like this name in the IDE editor, if the file does not exist ...
1
vote
Connection to the server problems
I've finally got the message. You were right. The 2015 and the 2016 versions of the instructions are different. I thought I was reading the 2016 version which in fact was the 2015 version. In the 2016 ...
1
vote
Connection to the server problems
server gives the "Stopping server" message when it cannot find the "/path/to/root". So, there is no "public" folder in your current working directory when you execute ~cs50/pset6/server public. Either ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
web × 27finance × 15
pset8 × 6
server × 6
pset6 × 4
html × 3
buy × 3
tracks × 3
final-project × 2
flask × 2
cs50-web-programming-with-python × 2
register × 2
index.html × 2
cs50x × 1
pset7 × 1
segmentation-fault × 1
cs50-ide × 1
check × 1
for-loop × 1
similarities × 1
query × 1
cs50x2020 × 1
project1 × 1
webserver × 1
cs50web × 1