0

I am almost done with server.c, everything works fine except that hello.php outputs error 404 when the query is submitted from hello.html, if I manually type https://ide50-rafaell12.cs50.io/hello.php?name=Maria it does output hello, Maria

this is my server.c

https://gist.github.com/anonymous/927dcf5f9017abf4ef17

I've been struggling with this issue :(

thank you

3
  • GDB says path value is "0x607480 "/home/ubuntu/workspace/pset6/public/hello.phpl" when the error happens – Rafael Mar 19 '16 at 20:28
  • Only had to add '\0' at index abs_path[i] after copying the contents of target[i] (to overwrite the l). Solved. – Rafael Mar 19 '16 at 20:33
  • It's been hard to debug because GDB loves crashing on me – Rafael Mar 19 '16 at 20:36
0

Only had to add '\0' at index abs_path[i] after copying the contents of target[i] (to overwrite the l).

1
  • Will accept my own answer in 2 days because I can't yet btw – Rafael Mar 19 '16 at 20:34

You must log in to answer this question.

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