If it is not the proper way, or if I a missing something, please let me know.

I have reviewed your post of most common errors. I will be adding the script and post the results.

Thansk a lot!!

StarLion
—
2012-12-20T13:12:28Z —
#6

Without seeing your code, I cant offer any further opinion.

Sir_Arcturua
—
2012-12-23T18:16:07Z —
#7

Hi StarLion,

Thanks a lot. I have run your script in pages presenting this behavior:<?php ini_set('display_errors',1); error_reporting(E_ALL); ?>

And a very importing result appeared:Notice: Use of undefined constant session_check - assumed 'session_check'

Looking at the code, it was like this: if (is_array($SESSION[sessioncheck])){

And I guess it has to be like this: if (is_array($SESSION['sessioncheck'])){

session_check is a session variable storing a selection of items made in the previous page.Is it possible this syntax missing has been causing this issue? As stated earlier in this post, in most of the cases all works fine, nothing happens and the program runs perfectly. But in a few cases program stops, print_r(session_check) shows nothing and IF sentence does not work.

The undefined constant is a NOTICE level warning - it doesnt stop operation. PHP has recognized you typed something that looks like a string, or it was expecting a string, but you forgot to put quotes around it, so puts quotes around it for you.

Strings should be encapsulated in quotes - either single or double. Double quoted strings will interpret special characters in it -echo 'This is a $single quote' will output This is a $single quoteecho "This is a $double quote' will output This is a <whatever the value of $double is> quote

This shouldnt have caused the issue you're seeing.... the only reason a session should empty itself is if you wait too long (usually 15 minutes) or closed your browser between page loads.

Sir_Arcturua
—
2012-12-23T21:18:40Z —
#9

Hi StarLion,

I see, thanks for your answer.

Just to make my issue clear, a session variable is created in one page, and when in another page, this variable is empty. It happens in a very few cases, normally all works well.I have a print_r($SESSION['sessioncheck']); (now with single quotes). When the problem happens, print_r shows nothing, i.e., the session variable is empty, and this makes the program stops running because it needs this variable.I have made tons of tests, but I have been unable to reproduce the issue, it has always happened in another people's computers. It happens with both MAC and PC.

Any idea?

Best regards,Sir_Arcturus

StarLion
—
2012-12-24T05:16:05Z —
#10

Being unable to reproduce it makes it rather frustrating to try and find;

Did the people reporting the issue leave the page? Close their browser? Not move from page A to page B within 15 minutes? Have they got the site open multiple times?

Sir_Arcturua
—
2012-12-24T12:38:26Z —
#11

According to their answers, they did it normally.

Making further research, I've found some posts with similar behaviors, pointing to some directory permissions related to session variables:
stackoverflow.com

If that were your issue, the session would -never- be created. You're seeing it being created, which means PHP has all the necessary information/permissions to do so. If you've managed to bombard your site with a supremely large number (Trillions+) of sessions in the span of a short time (< 15 minutes), you might see session collisions, but if that were the case you'd be able to reproduce the error....