| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Munky Designs Join Date: May 2005
Posts: 996
![]() ![]() ![]() | [resolved] php things have suddenly stopped working, and I have no idea why ok, this is crazy, and driving me insane! as of two days ago, everything worked fine. Now, things are messing up for no reason. I have a key check function, it makes a key on one page, and then checks it on the next. here is a bit of it: Code: $keyCheck = $user->checkKey('loginKey');
echo $keyCheck." is keyCheck<br />";
if ($keyCheck != 1){
echo $keyCheck." You are doing something naughty!!!!";
exit();
} Second thing, I have a register function, which sends out a validation email. I haven't touched the code in there for 2 weeks, now though, no email is sent. the data is saved to the db, everything echos ok, just no email being sent (and no, it is not in my junk folder ).The code for it is here: Code: $b = "click this link to validate<br /><a href=\"http://munkydesigns.co.uk/Scripts/validatelogin.php?u=$u&v=$v\">Click here</a>";
$b = @nl2br($b);
$headers = "Content-Type: text/html";
if (!mail($e, "You have registered, click to validate", $b, $headers)) {
echo "something went wrong!";
exit();
}
echo "Welcome ".$u.", you are now registered.<br />However, the account is not yet live, an email has been sent
to the address you supplied, click the link to validate!";
exit(); ????: NamePros.com http://www.namepros.com/programming/393196-resolved-php-things-have-suddenly-stopped.html Please, someone tell me im not going insane, and that there is a really obvious mistake I am making
__________________ Toddish.co.uk - Portfolio/Blog Powcomics.com - Webcomic Hosting/Directory Erant.co.uk - vent your rage!
Last edited by Albino; 11-12-2007 at 03:43 PM.
|
| |
| | THREAD STARTER #3 (permalink) |
| Munky Designs Join Date: May 2005
Posts: 996
![]() ![]() ![]() | I haven't changed anything, which is why this is confusing me so much. I'll ask the host if they have upgraded, but if they have, why would one function which works fine on one page, not work on another (even though they are exactly the same). |
| |
| | #4 (permalink) |
| NamePros Member Join Date: Sep 2006
Posts: 99
![]() ![]() | The most common thing I could suggest is check for globals... eg did you assume $_SESSION['var'] automatically became $var The host may have changed this, so you'd need to use $_SESSION['var'] (Its a huge security risk the first way) The other possibility is something happened to your session().start Bruce |
| |
| | THREAD STARTER #5 (permalink) |
| Munky Designs Join Date: May 2005
Posts: 996
![]() ![]() ![]() | globals are on, but I never assume things like $_SESSION['var'] = $var. also, session_start is in a global file, required_once at the top. its never failed before, I haven't changed anything in it, it just started happening 2 days ago |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |