php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14826 4.1.0 on powerpc doesn't save session variables
Submitted: 2002-01-03 10:12 UTC Modified: 2002-03-06 01:32 UTC
Votes:20
Avg. Score:4.5 ± 0.8
Reproduced:12 of 13 (92.3%)
Same Version:8 (66.7%)
Same OS:9 (75.0%)
From: teixi at 6tems dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.1.0 OS: Debian Linux 2.2.19 ppc
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: teixi at 6tems dot com
New email:
PHP Version: OS:

 

 [2002-01-03 10:12 UTC] teixi at 6tems dot com
4.1.0 on powerpc doesn't save session variables

apache 1.3.22 scripts like this sample doesn't save session varibles, but when run on intel platform with same php.ini, same php and apache versions, it works saving session variables.

---------

<?php
session_start();
// session variable to store the counter.
session_register('counter');
// session variable to store the value when the page was last loaded;
// this value is maintained so that difference can be calculated.
session_register('timeAtLastLoad');
// current time
$timeNow = time();
// increment counter
$counter++;
// calculate the time lapsed from last visit.
$timeLapsed = $timeNow - $timeAtLastLoad;
// display appropriate message
if($counter > 1)
{
        echo "<b>It's been $timeLapsed seconds since you last viewed this
page.</b>";
}
else
{
        echo "<b>First time here? Reload this page to see how the session
works!</b>";
}
$timeAtLastLoad = $timeNow;
?>


-------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-04 12:30 UTC] sander@php.net
Are you sure the session-related paths in your php.ini are correct?
 [2002-01-09 05:28 UTC] teixi at 6tems dot com
yep session related paths and setups are the same on both installs but just ppc doesnt' works with session vars
 [2002-01-09 21:39 UTC] yohgaki@php.net
What about permission of save_path? Is it world writable?
 [2002-01-10 11:18 UTC] teixi at 6tems dot com
umm dosen't seems this here...

teixi@satellite:~$ cat /etc/php4/apache/php.ini | grep -i save.path
session.save_path = /tmp
teixi@satellite:~$ ls -lad /tmp
drwxrwxrwt    6 root     root         1024 Jan 10 15:52 /tmp
teixi@satellite:~$ uname -a
Linux satellite 2.2.19 #1 Sat Apr 14 23:20:24 CDT 2001 ppc unknown

 [2002-01-10 22:34 UTC] yohgaki@php.net
Your httpd may be segfaulting. Run httpd under gdb see if you get segfault or any.
 [2002-01-11 06:52 UTC] teixi at 6tems dot com
I'm sorry but my apache doesn't segfault on any moment it serves both static pages and php pages nicely except for those php apps with session variables that isn't able to save them.

could be the common unsigned char problem ?

what to check?
 [2002-01-11 18:50 UTC] yohgaki@php.net
Just making sure again. You don't get any errors (segfualt, etc) in your apache error log, right?

I just want you to run httpd under gdb to see if you get any signal :)

gdb /usr/sbin/httpd
% run -X

 [2002-01-14 13:37 UTC] teixi at 6tems dot com
sure! only logs page under normal acces.log nothing on error log, then gdb also doesn't shows just nothing! but here's the strace of the session for same script menthioned on begining: the real thing is that it says: 
(Inappropriate ioctl for device)
what to check?
bests.




open("/var/www/auth3/index34.phtml", O_RDONLY|O_LARGEFILE) = 6
getcwd("/var/www/auth3", 4095)          = 15
lstat("/var", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat("/var/www/auth3", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
lstat("/var/www/auth3/index34.phtml", {st_mode=S_IFREG|0644, st_size=684, ...}) = 0
ioctl(6, 0x402c7413, 0x7fffe268)        = -1 ENOTTY (Inappropriate ioctl for device)
fstat(6, {st_mode=S_IFREG|0644, st_size=684, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30016000
read(6, "<?php\n\nsession_start();\n\n// sess"..., 8192) = 684
read(6, "", 4096)                       = 0
read(6, "", 8192)                       = 0
ioctl(6, 0x402c7413, 0x7fffcb68)        = -1 ENOTTY (Inappropriate ioctl for device)
close(6)                                = 0
munmap(0x30016000, 4096)                = 0
open("/tmp/sess_e5e831fb05e5f870e85a1971aee43e77", O_RDWR|O_LARGEFILE) = 6
flock(6, LOCK_EX)                       = 0
fstat(6, {st_mode=S_IFREG|0600, st_size=40, ...}) = 0
pread(6, "", 0, 171798691840)           = 0
time(NULL)                              = 1011029244
chdir("/")                              = 0
pwrite(6, "counter|i:1;timeAtLastLoad|i:101"..., 40, 0) = 40
close(6)                                = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
umask(022)                              = 022
_newselect(0x6, 0x7ffffc68, 0, 0, 0x7ffffce8) = 0
write(5, "HTTP/1.1 200 OK\r\nDate: Mon, 14 J"..., 487) = 487
time(NULL)                              = 1011029244
write(17, "127.0.0.1 - - [14/Jan/2002:18:27"..., 156) = 156
gettimeofday({1011029244, 538769}, NULL) = 0
times({tms_utime=8, tms_stime=4, tms_cutime=0, tms_cstime=0}) = 2276553
rt_sigaction(SIGUSR1, {0x10018530, [], SA_INTERRUPT}, {SIG_IGN}, 8) = 0
read(5, 0x10068218, 4096)               = ? ERESTARTSYS (To be restarted)
--- SIGALRM (Alarm clock) ---
close(5)                                = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGURG, {0x10016e84, [], SA_INTERRUPT}, {0x10016e84, [], SA_INTERRUPT}, 8) = 0
rt_sigaction(SIGALRM, {0x10017148, [], SA_INTERRUPT}, {0x10017148, [], SA_INTERRUPT}, 8) = 0
rt_sigaction(SIGUSR1, {0x10018530, [], SA_INTERRUPT}, {0x10018530, [], SA_INTERRUPT}, 8) = 0
accept(16,  <unfinished ...>

 [2002-03-06 01:32 UTC] yohgaki@php.net
I think you don't have problem with current CVS. (or you'll see error messages. Make sure you use E_ALL for error reporing)

Please reopen if you still have the problem with CVS source.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Feb 06 13:03:40 2023 UTC