Prosper202 Error+Fix with PHP Strict

fawkes

New member
Oct 19, 2010
43
2
0
Code:
Your username or password is incorrect.'; } //check tokens /* ($_POST['token'] != $_SESSION['token']) { $error['token'] = '
You must use theses forms to submit data.
', $error['token']); } ?> ', $error['user']); } ?>

I was getting this error in Prosper202 after upgrading my PHP to a less outdated version. That looked like PHP code which shouldn't render in HTML rather than an error message, so I figured something was malformed. Turns out Prosper uses <? instead of <?php as open tags (which is outdated and bad practice), so all of the code was broken under the current, "strict" parsing setting.

Technically you could change that setting, but I prefer having good code. Use any kind of IDE that has both Regular Expressions and a "Search in Files" feature and, on the prosper directory and its subfiles, find:
Code:
<\?[^p]
And replace it with
Code:
<?php
And you should be good.

If you need a decent IDE with those features, I use Komodo Edit.. it's free. Notepad++ probably does that too.

I also had this error flowing across my screen:
Code:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function.
Which I fixed by adding
Code:
date.timezone = "America/Toronto"
To my php.ini file.

Thank god for being a nerd.