[PHP] session_name() - Question
hi i have the following script: Session START"; $HTTP_SESSION_VARS["mctini"] = parse_ini_file("mct.ini", true);; print_r($HTTP_SESSION_VARS["mctini"]); ?> everytime i reload the page, a new session will be generated! i do not want that! when i take out the session_name() and reload the page a few times, NO new session will be generated an the old one will be detecded everytime like i would like to have it! what does this function session_name() indicated that everytime a new session is generated...? how do i use this function correctly? thanx for all answers regards, jürg zgraggen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question about interaction between own state information...
hi question about interaction between own state information... my problem is very simple: i have an object with a class-member-function which writes a file of about 2MB. the duration of this function is quite long. thats why i'd like to have display informations in a pop-up. for that reason i made a member-variable for getting a counter and set the object into a registerd session. the running writefunction will now increase the counter every time it wirtes information to the file. on the other hand, the pop-up should access the same session and read the counter-variable on the object with the running wirtefunction. my problem: i cannot access the session on the pop-up WHILE the writefile function is running. that writefile function is locking the session in some way. that seems logical for me. now, how can solve my problem? my main-window should be able to interact with its pop-up-window. i would like to send state information from a running function on the main-window to its pop-up-window. this is refreshing automatically. Thanx for every hint or answer Regards, Jürg Zgraggen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] exec for EXE with arguments
hi i'd like to call an exe with several parameters like this: the parameter -name= must have quotes from beginning til end because of the Spaces between. C:/Programme/Apache Group/Apache2/htdocs/myexe.exe -action=add -name="My Own Task" so i tried this in PHP... but it dows not work! It only works when i take out the \"... however i can't do this because my exe neeads the parameter like this: // CODE -- $execString = "\"C:/Programme/Apache Group/Apache2/htdocs/myexe.exe\"" // i have to use \" because of the spaces ." -action=add" ." -name=\"My Own Task\""; // i have to use \" because of the spaces exec(escapeshellarg($execString), $arrRes, $iret); print_r($arrRes); // CODE -- $arrRes is empty although the exe ALWAYS gives a return value on www.php.net i found the functions escapeshellarg and escapeshellcmd. could these functions be the solution i'm looking for? i really don't know how to use them for my case. can anybody give me a hint please... Regards, Juerg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session-problem
hi got a big session-problem and i have no idea what i'm doing wrong... i have quite a big web-app and i tried to upgrade the code. ex: $frm_id to$_POST['frm_id'] and$HTTP_SESSION_VAR['myId'] to $_SESSION['myId'] ... ect... i changed the register_globals = Off in the php.ini and tried to browse my webapp. now my problem: i wrote in my navigation-frame this code: after the print_r() i can see my 'testint'-session-variable on the navigation-site. however on the other frame-site. i do NOT see this 'testint'-session-variable when i reload it. and when i reload the navigation-frame the variable does appear but does NOT increase. isset() always return false!!! when i take a look at the session-file on my Computer, i do NOT find the variable 'testint'... now when i make a complete new dummy php-file and copy-paste this session-code on the navigation-site then the session works perfectly. even when i call the navigation-site again AFTER processing this dummy-php-file. the session for this variable works suddenly. what am i doing wrong??? please give me a hint! regards, jazper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: session-problem
Probably i got the problem... but i don't know how to solve it!!! i include one of my class. in the constructor of this class i did a global... global $_SESSION; as soon as i delete that line. my script works perfect... is this not allowed anymore... to access $_SESSION in a constructor?? regards, jazper "Juerg Zgraggen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > hi > > got a big session-problem and i have no idea what i'm doing wrong... > > i have quite a big web-app and i tried to upgrade the code. > ex: $frm_id to$_POST['frm_id'] > and$HTTP_SESSION_VAR['myId'] to $_SESSION['myId'] > ... ect... > > i changed the register_globals = Off in the php.ini and tried to browse my > webapp. > > now my problem: i wrote in my navigation-frame this code: > if( !isset($_SESSION['testint'] ) ) >{ >$_SESSION['testint'] = 1; >} > $_SESSION['testint']++; > print_r($_SESSION); > ?> > > after the print_r() i can see my 'testint'-session-variable on the > navigation-site. however on the other frame-site. i do NOT see this > 'testint'-session-variable when i reload it. and when i reload the > navigation-frame the variable does appear but does NOT increase. isset() > always return false!!! when i take a look at the session-file on my > Computer, i do NOT find the variable 'testint'... > > now when i make a complete new dummy php-file and copy-paste this > session-code on the navigation-site then the session works perfectly. even > when i call the navigation-site again AFTER processing this dummy-php-file. > the session for this variable works suddenly. > > what am i doing wrong??? > please give me a hint! > regards, jazper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session-problem
:-) cool thank you! is any "$_"-variable superglobal? $_REQUEST, $_POST, ...? cheers, jazper "Curt Zirzow" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > * Thus wrote Juerg Zgraggen ([EMAIL PROTECTED]): > > Probably i got the problem... but i don't know how to solve it!!! > > > > i include one of my class. > > in the constructor of this class i did a global... > > global $_SESSION; > > > > as soon as i delete that line. my script works perfect... > > > > is this not allowed anymore... to access $_SESSION in a constructor?? > > $_SESSION is a superglobal meaning you don't need to and shouldn't > (as you found out the hard way :) global it. You can access it > anytime: > > class foo { > function foo { > $this->var = $_SESSION['var']; > } > } > > Curt > -- > "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php