Jump to content

Can't seem to get this to update...


zelig

Recommended Posts

Yes, you have to login to get into my website.

 

I'm trying to run the script without logging in, since it's going to be a cron job.

 

But the 'testerzelig' account is logged in on another browser, in the 'rest' state, to see if the cron job is working.

Link to comment
Share on other sites

register_globals should be Off. You should have error_reporting set to -1 (negative one). It may be a good idea to call php_info() and verify the directives are being read properly by php. If that checks out, the next logical step would be to see exactly what the #_SESSION array holds by putting this immediately after include('../lib.php');, which I would change to require_once() instead because it's essential to the functionality of the script that it be included properly.

 

echo '<pre>';
print_r($_SESSION);
echo '</pre>';

Link to comment
Share on other sites

Quick note: I have a typo above, there's no underscore in phpinfo(). My suspicion is that there is a header error not allowing the session to be started, but it isn't being reported for some reason. Add this immediately after the opening <?php tag in your script, and see if any errors show up.

 

ini_set('display_errors', 'On');
error_reporting(-1);

Link to comment
Share on other sites

Hmm... This posted:

 

Strict Standards: main() [function.main]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /home/katarra/public_html/config.php on line 14

Strict Standards: Only variables should be assigned by reference in /home/katarra/public_html/config.php on line 14
Array
(
)
Error: either $_SESSION[userid] or $_SESSION[hash] was not set.

Link to comment
Share on other sites

The queries your running will NOT work unless your logged in, reason being the queries are using $player->id, which is set by your $_SESSION['userid'];

 

for example:

 

$player = check_user($db, $secret_key);
$query = $db->execute("select * from `users` where `id`=?", $player->id);

 

the query is selecting all from users where id = 0

 

 

so when your testing the session_id you need to be logged in.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.