Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have this chunk of code:
<?
if (!session_is_registered('count')) {
session_register('count');
$count = 1;
}
else {
$count++;
}
?>
Hello visitor, you have seen this page <?php echo $count; ?> times.<p>
when it runs on a linux machine i get as it says above hello visitor you have seen this page x times
but when it runs on a windoze box i get: Notice: Undefined variable: count in two.php on line 27
Hello visitor, you have seen this page 1 times.
it seems that the session varibles are not working for some reason
any ideas any one?
yep done that ( <?php ) no error messages now but it still does not work
i dont mean the browser when i say on windows i mean the server on windows and the server on linux it works fine when hosted on a linux box and it does not work when hosted on a windows box
as far as i know the session variables do only work with php installed as an apache module. so that canīt work on a doze or if php is installed static.
cheers, jens
so am i correct in thinking that sessions will not work correctly if php is running as a cgi, and for them to work correctly php needs to be installed as a module
i have managed ( i think ) to get php loaded as a module, but the sessions are not working properly still, as above i am using the same chunk of code but now when the session_start(); is issued a new session start every time and i am having the same results as before but it is not giving me any notices this time
any ideas?
p.s. i am using apache 2 with the latest php version
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.