Programming :: Php Session Not Working?
Apr 21, 2011I try to learn using session. I created sess1.php with the following code:
<?php
session_start();
// makes an array
[code]...
I try to learn using session. I created sess1.php with the following code:
<?php
session_start();
// makes an array
[code]...
I have a very bad attempt at hashing the components of an tcp session to assign/locate the session in a hash table bucket. I am pretty sure that it has a very high collision rate and when there are a very large number of tcp sessions my application is having to search a long linked list to find the session within the bucket.
All the hashing functions I have found take a single string input where I need to input several integers and hash them into a single result. My guess is that any real hashing function is going to produce better results than what I am currently doing.
[Code]...
What is the Failsafe Session Type that you can select from the KDM login screen supposed to do ? With Squeeze RC1, if I attempt to log in to a failsafe session, I am returned to the KDM login screen. This does not seem very failsafe to me but then I am not a desktop expert. With Lenny (5.0.7), I get a single console window, which, I guess, at least gives one a chance of fixing whatever may be stopping the normal KDE session from starting.
View 8 Replies View RelatedIm a fresher in PHP.Actually i wanted to know that whether there will be time delay while using session variables in PHP.By using some 10-20 session variables in my code will it affect the speed of the loading of the page.If so then can u suuggest any other method to pass the varaibles which will not slow down the speed?
View 4 Replies View RelatedI have done some tcp stream multiplexer. I'm using it as independent login proxy (user is once authenticated and then switched to hidden device (cisco)). But I need to reset session (no connection) configuration, because cisco supports xterm, ctr-c, etc... Am I able to do? Just restart negotiation? Using IAC codes?
View 2 Replies View RelatedUbuntu 10.10 x64.It's been a little over a week since I *rebuilt my system after a gdm or gnome issue and now I'm having an issue with the guest session not working and I'm unable to add a new user. It says "incorrect data" or something like that. This is more than annoying. Why is my system decaying so rapidly? I'm not adding anything to the system that isn't approved by Ubuntu. it's virtually a stock build, minus some changes to the look and feel category. Is this possibly a security issue? My routers up and running and I turned on UFW.
.1) Can't add new users
.2) Guest session will not start.
.3) Should I be concerned about my security?
I need a way to have screen (or dbus, whatever) to spit out a list of windows (title and number) that are active in a screen session.I'm writing a wrapper for common work tasks. Part of the functionality will check if a certain window exists, and if so let me know. The idea here is to prevent accessing the same machine twice. (although, and override option would probably be needed, just in case, but I digress...) I've searched through the screen man page and don't see anything that'll work. I'm not beyond forking screen and ending up with a custom version. However, I'd like to avoid that if I can.
Edit: I'd like to see something like "screen -S screen_name -window-list" or similar.
Page.php -- has a special division thats empty and on Link Click calls Javascript to change inner.html to an IFRAME call So the user clicks the link and then it shows the division and loads the IFRAME The IFRAME Source is iframe.php in IFRAME.PHP I need to take the Session Variables that were set already in Page.php all sessions work fine when not using Iframe (open iframe.php in its own window) but doesnt work when its Iframed and sadly I have to use Iframe on this page NOW the CATCH is -- I CANNOT use any POST or GET Values the iframe src MUST be straight url to the page [URL] cannot use variables in the url [URL] etc..
IS it possible to do what I need Without passing variables via the url? Page1 has all session variables set, calls the iframe command when users presses a button, Iframe loads but DOES not have the Session data that was saved on Page1 -- and IFRAME cannot pass variables via the URL it must be a direct url to the page only Page1.php java used to set the HTML / IFRAME into its Div
Code:
<script>
function changeText(){
document.getElementById('iframediv').innerHTML = "<iframe scrolling='no' frameborder='0' margin='0' src='http://mypage.blah/iframe.php'></iframe>";
[code]....
Is any way to detect a keypress event in a console session? Preferebly without needing the application to be running in the foreground
View 2 Replies View RelatedAfter finally getting libptp2 to compile I find that ptpcam does not work. This has worked perfectly fine before with the same camera using Slackware 12.0, I am now using Slackware 13.1 and ptpcam will simply not work. The error is as follows:
Code:
x86_1# ptpcam -l
Listing devices...
bus/dev vendorID/prodID device model
ERROR: Could not open session!
Try to reset the camera.
I have tried to reset with "ptpcam -r", I have also tried to disconnect and reconnect the camera to the USB system, I have tried to reboot the computer, I have tried to use different versions of libptp2 -- all to no avail. The strace shows the issue is apparently a failed ioctl(), although I have no idea why it fails:
Code:
open("/dev/bus/usb/002/004", O_RDWR) = 6
write(4, "1"..., 1) = 1
read(3, "1"..., 1) = 1
[code]....
I have verified that the camera is working in Windows 7 on the same physical computer and I can see the camera from lsusb and dmesg output when I connect it to the USB system. This system is Slackware 13.1, Linux x86_1 2.6.33.4-smp #2 SMP Wed May 12 22:47:36 CDT 2010 i686 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GenuineIntel GNU/Linux.
Want to return current LINES=, tryng to avoid the "hacky" backticks and string manipulation way
ie: my $somevar = `set | grep LINES`
I tried using the env command and it returns a empty value?
my $lines = $ENV{'LINES'};
$= doesnt work well for putty sessions...
my $lines = $=;
hypothetically speaking, can i write a script in which a telnet session is opened and then some more commands are forwarded to that session?
View 4 Replies View RelatedI have a TCL expect script that spawns a telnet session to a Nortel DMS100 to execute some commands. The strange thing is that the response in expect_out is not consistent. It sometimes contains a extra enter or newline. This results in differences in the expect out buffer. Here is a part of the script:
send "time
"
sleep 1
expect -re ">"
[code]...
This command displays the time. The correct output should be (with log_user=1):
>time
Time is 11:44:04
>
But sometimes the output is:
>timeTime is 11:45:04
>
As you can see here the is missing on the command that expect sends , or at least in the echo that is comming back. I use a split command to filter out the response in the expect_out buffer, but this fails when the is missing. Here is a example with the debug enabled:
[code]....
I suspect it has something to do with a slow response of the switch. I tried to send the time command slow and with the send_human but the result is the same. A timeout between the send and expect also doesn't help.
Is there a session manager I can use with 10.10? I would like to try Openbox but am not sure how to select it as a startup session. I would like to be able to choose between kde, gnome and openbox.
View 1 Replies View RelatedI am trying to write a perl script which will give an interactive session to a user to execute command on the server. I have written a small script to do this :
Code: !/usr/bin/perl -w
use strict;
use Net::SSH::Perl;
my $host = '192.168.1.1';
my $username = 'user';
my $login_passwd = 'test123';
[Code]...
I am putting together some new systems for my customer and I'm having some trouble with a script that we use to back up files to a DVD R. The problem is that I can't write a 2nd session to the DVD unless I eject the disk and reload it. The drives are slimline type drives, Sony BD-5730S and Teac DV-W28S-V93, so they won't reload without human intervention. Opsys is CentOS 5.4 or RHEL 5.4. I've tried both AMD and Intel based mother boards. If i try this on Fedora 11 or 12 it works fine. This works on IDE attached drives but not a SATA attached drives. Fedora appears to use something called genisoimage instead of mkisofs. I can't get genisoimage to run on CentOS or RHEL.
Here's the code to setup the test files:
rm -f /tmp/BDtest/*
mkdir /tmp/BDtest
dd if=/dev/zero of=/tmp/BDtest/blank.iso bs=10M count=1
for NUM in {1..160}
[Code].....
After some updates I can't get indicator applet and session management applet working, I get these instead:
I tried to pull back any updates, but it changed nothing. I installed older (lucid) versions of these packages:
Code:
indicator-applet
indicator-applet-complete
indicator-sound
indicator-applet-session
[Code]....
I got this script that backs up a server and then keeps only the last 10 backups and removes the rest.Problem is, the part where it deletes any backups older than the last 10, it never reaches that. I'm guessing it is because the ftp session somehow exits the script entirely, especially if there is a problem with the ftp session. But just to make sure, I'm wondering if you all can look at the code to see if I am making it exit accidentally.Here's the code. I left out data like ip address and directory/file names for my security purposes.
Code:
#ftp in and grab the file
ftp -in xx.xx.xx.xx << EOF
[code]...
I am currently in a project to set up an LTSP server with 10 thin clients. I am using Ubuntu 9.10 (Karmic).
Installing server and booting clients are working fine. Now, according to the need, I have to restrict user session numbers and allow resuming previous user session.
I have achieved to do the first one, but still could not able to setup the second one. As per requirement, if some thin can have power failure, the same session should be restored back. I am confused here, if I need to focus on saving xsessions or saving gnome sessions. I am looking for a concrete solution as I am running out of time.
The following message comes up when I boot up: Logging in user Warning: Cannot open ConsoleKit session: Unable to open session: Launch helper exited with unknown return code 0. When I press OK, the system completes the start up and everything looks normal. But when I try to connect to internet, I get the following message:
KNetworkManager cannot start because the installation is misconfigured. System DBUS policy does not allow it to provide user settings; contact your system administrator or distribution. KNetworkManager will not start automatically in future. If I reboot the system, I logg in successfully. So far the problem has appeared approximately upon every second time I boot up. Rebooting the system seems to take care of it.
Don't know what info is of interest. I'm using
Opensuse 11.2
KDE 4.4.2 (Factory)
After upgrade from 4.4.1 to 4.4.2 it worked fine for a week or so.
Info about session timeout.
I use tmout = 15 min in my /etc/profile (along with readonly tmout). i have some issues i need to address, looking for ideas.
1. what is considered a idle "session" ?
2. if i & a process to the background and do nothing is this a idle session?
3. if user uses su to a higher level, are there now two sessions? is the tmout for user suspended until su user time outs or leaves su session?
4. i have some users who will run long sql queries. is there a workaround to have the session remain active until process has finished?
I do a clean install of slackware64 13.1 beta1 with KDE and switch default runlevel to 4 in /etc/inittab.
I try to login in kdm, I always come back to the login....
I try this with default runlevel 3 and an .xinitrc with "ck-launch-session startkde" .. works without problems, so I switch back to default runlevel 4, now i can login and only get the error "Cannot open ConsoleKit session: Unable to open session..."
Here are some logs
syslog
Code:
Code:
when i start my pc i have an error: Consolekit session error, unknown return code 0 when i click Ok it then starts my session
View 7 Replies View RelatedThe below script takes a date and table name from the user. It unzips and untar a file from archive folder based on date. Then select the required file based on the tablename provided and copy it to ../posextract folder.The folder posextract contains already extracted files for the user.
Code: echo "Enter date
"
read lookdate
[code]....
I really would like Perl Qt4 bindings. The best I could find is this:[URL]The problem is that the sources would not compile, and the RPMs are for 32-bit machines.Is there really no such thing as good Perl Qt4 bindings?
View 8 Replies View RelatedI'm trying to create my own version of the printf function. I'm using the following code:
Code:
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
[code]....
The following script keeps telling me: Notice: Undefined index: name in /usr/files/www/rage.php on line 6 Name:
PHP Code:
<html>
<?php
[code]...
I jus found that #include<stdio.h> is not working with gcc and neither any function from the library like clrscr(); i found due to <stdio.h> is a windows lobrary file so its not come with linux. But I want to to know if I have to call any function from that library what should I do? Is there any way to install <stdio.h> in linux?
View 5 Replies View RelatedI have some strange behavior in Latex. I have added labels to all of my tables (currently there are 3) and my figure (currently there is only 1). So far I only notice this behavior with tables, though it may happen with figures as well...I will have to add another figure to test that.However, what is happening is that my list of tables is correctly generating the numbers of the tables (which are 3.1, 3.2, and 4.1). In the resulting PDF document, the tables have the correct numbers in the captions as well. The odd thing is that when I attempt to reference them using ef, it is printing the Chapter.Section[.Subsection] number the table is located in instead of the table's number itself.Right now I have two tables inside of Chapter 3 Section 3. They are as follows:
Code:
egin{table}[htdp]
egin{center}
[code]....
I've just started using gdb at my new job, and I'm having a small issue debugging C++ with it. After I execute "continue" or "run" through gdb, I'm not able to return control to gdb. Based on the documentation I read, I should be able to use Control-C to interrupt the program, and have control return to gdb.
This does not work on my setup. Not sure if it's related, but I'm debugging on a remote machine. I tried through PuTTY and xterm using Exceed XServer. In both cases, gdb does not respond to Control-C. This is quite annoying because I have to restart my program every time I want to set a breakpoint.