Pomax / EasyPageComments

A simple instant-comments-section for pages based on PHP at the server, and _optionally_ JavaScript at the front end
17 stars 11 forks source link

localhost shows an error #7

Closed phatpatt closed 11 years ago

phatpatt commented 11 years ago

when applied to a localhost this will appear... Notice: Undefined index: SCRIPT_URI in C:\xampp\htdocs\MySite\root\EasyPageComments.php on line 84

Pomax commented 11 years ago

SCRIPT_URI is empty on localhost access, https://github.com/Pomax/EasyPageComments/blob/master/EasyPageComments.php#L84 will have to be changed so that it picks the correct location when running in environments that do not populate that variable

Pomax commented 11 years ago

it'll probably also be worth replacing $_SERVER["PHP_SELF"] with $_SERVER["SCRIPT_NAME"], for security reasons.

phatpatt commented 11 years ago

so what would i need to change on that line to run it on a localhost?

Pomax commented 11 years ago

I've updated the .php file on master, it should work now.