Problems with chapter 1
I have set up the unmodified source code on a couple of systems running PHP 5.2.5 / MySQL 5.x without any problems. Once I try to run in on my web account, a system running PHP 5.2.6 / MySQL 5.x, problem with the users class occur. First a handful of warnings like:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /<snip>/lib/User.php on line 87
I can get pass these by defining: "IS_ENV_PRODUCTION" as false. I also managed to iron out the second problem, that of an undefined variable: "filter_var($email, FILTER_VALIDATE_EMAIL)". Here I use an ereg().
Then I ran into a halt though. Once I try to register I get a positive: "Thank you for registering. Be sure to verify your account by visiting" but no data is written to the wrox_pending or wrox_user tables. Also, in the accompanying link to verify.php, the UID is always 0. The token is there but: uid=0.
I would be grateful for any pointers, thanks.