Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Php Session Problems When Working With A Windows Client Program


I am currently involved in a project that involves a windows client
program written in delphi and a web application written in php. I
have made several php pages for the delphi program to do requests via
the http component from INDY. the problems I am having are:

1) the first request from delphi app to php web app is the
authenication. In which user sends username + password to the php app.
If authenication is valid, a session is started and the sid is
returned to the client. All subsequent requests from delphi app to
php web app will have this sid as one of the arguments in the POST
form request (this is one of the function in the INDY component for
delphi). Even the sid is passed to the subsequent pages, the session
global array is still undefined. However if I open up a web browser
and create my own string request to the login page then the next page,
the global array would be defined (using var_dump + echo to see the
array) what is the problem?

2) does the above problem has anything to do with the http referer
field?

3) this problem that I am having has been asked before on google
group, but somehow the person who asked it didnt' put down the
solution for it. (this only involves the web only) when I login on a
page and return with a session id, then I log out.. the user is
redirected to the login page again. However if the user login again
(with a different login account), he would be presented with the same
session ID as before. a different sesson id is presented only if the
user restart the browser. why is that happening?




View Complete Forum Thread with Replies

Related Forum Messages:
Session Functions Not Working With Windows XP, Php 4.3.4
i have two simple pages, test.php and test2.php

test.php contains:

<?php
session_start();
$_SESSION['test']="blah";
?>

and test2.php contains:

<?php
session_start();
print $_SESSION['test'];
?>

in the php.ini file, my session save path is set to /tmp. i dont even know
where to look for the tmp folder. also, when i go to test2.php after
accessing test.php, the page is blank and it doesnt print "blah".

as i mentioned in the title, im using windows xp (home edition) with PHP
4.3.4 and apache 1.3

View Replies !
PHP Running Exec() Windows Program Very Slow In Comparison To UNIX Equivalent Program
Does anyone have an explanation or solution for the following.
I have a PHP script that uses exec() to call a program to do certain
calculations.

The UNIX version of this program I call runs in about 4 to 5 seconds.
When I run the same PHP script using exec() to call the Windows equivalent
of this same program on my Windows desktop, it takes about 32 seconds....

View Replies !
Two Sessions: Session A By A Program Destroys Session B By A Program
I have two separate programs that I want to use together on a website
Program A starts first and calls session_start(). Program B is started by the user clicking on a link and it also calls session_start(). The session started by program B blows away the session started by program...

View Replies !
Web Application In Client Server Program
i have a client server program in VC++,i want to provide this client -
server application on web.which program i should use whether PHP or i
can convert VC++ to active X control and then display in html?

View Replies !
How Do I Send Binary Data From To A Client Program (now A Web Browser)?
I have a little client program on a window PC that connects to a HTTP server. The client program send POST command to the server and a PHP script needs to get the data from the client, process it and then return other data to the client program.

View Replies !
Get Windows Client Login
I have to create an intranet website by php, sql server and IIS.
One requirement is to get the user name from the windows client login.
I'd like to know if it is possible, and if yes how?

I think it should be possible by asp, but in php?

View Replies !
Does Anyone Know Of Any Program That Would Be To Windows What CRON Is To Unix.
Does anyone know of any program that would be to Windows what CRON is to Unix.

I Run Apache on XP with PHP 4--and am hoping that I can find something like described above.

View Replies !
Execute A Windows Program From An Anchor Tag
I believe I am close but I have spent several hours investigating this and
can't understand why it won't work. I have tried exec, system, and settled
on popen from reading various notes on the subject. I am wanting to launch
a file editor when I click on a link. This is strictly an internal
application so I don't need to worry about escaping shell/args. This is
what seems as if it should work, however it doesn't. This is on XP, latest
Apache 1.3.29 and PHP. The logic makes it into the "if" test and the file
exists. Thanks.

if (chdir("C:Program FilesTextPad 4")) {
$cmd = "start "textpad.exe" x:webprogram.php";
pclose(popen($cmd, "r"));
}

View Replies !
Windows Program Command Exists
I can do this so easily in Unix: PHP Code:

$msg = exec('whatis convert 2>&1');
echo $msg;

However, in Windows using MS-DOS, I'm utterly lost. I am having to find out if ImageMagick is installed on a system for a function to operate (ImageMagick is required), and since this is a portable web application, you simply can't install ImageMagick everywhere you go.

Therefore I need to know if the system home has ImageMagick or not, and in Unix, I simply do a "whatis convert" and I can tell, but since MS-DOS has no equivalent to "whatis" I can't figure it out, and just running the "convert" command within a recursive function onto thousands of images is just not a good idea.

View Replies !
MSSQL - Unix Client / Windows Server
I need to access a MSSQL 7.0 database on a Windows NT Server from a Linux PHP Web-server.
I have looked at FreeTDS, unixODBC and iODBC. unixODBC seems the easiest but alas one need to buy licenses. iODBC is a bit slow, apart from the ODBC part containing many connection layers, it also has a request broker/client running on top of the ODBC.

FreeTDS seems like a decent solution. It even has the option of using TDS in conjunction with iODBC. This eliminates the use of the extra request broker/client. Furthermore I've read somewhere that one can use the Sybase functions of PHP to connect to a MSSQL server since both use the TDS (Tabular Data Stream) Protocol. What method would be the easiest and/or could be implemented using the ADOdb database abstraction layer class?

View Replies !
Use Php And Apache To Host My Website On A Windows Client For Others To View?
I use php and apache to host my website on a windows client for others to view? If so, can someone tell me how to publish this for others to view through their internet browser?  We are all on the same network. I dont have to publish it publicly just host it for other users on the same domain as me will work for now.

View Replies !
How To Access And Modify And Add Records In MySQL Table From A Windows Client?
The MySQL table is located in a Linux Server OS, so I need the
information from that table for updating Paradox tables in Windows OS.
If a PHP program in the Linux Server can save a file with the
information I need, can I make a PHP program in Windows OS to get the
saved file or even better, to access the table in the Linus Server OS?...

View Replies !
Working With Different Windows
I have a user in window A pressing a button that makes window B come up, the user enters some data in window B and once done presses a submit button that processes the input. When all is OK, I want to close window B and refresh window A.

View Replies !
Ssh2_exec On Windows Not Working
i can't seem to get the "ssh2_exec" function working on Windows XP. the
example in the manual (which is obviously linux biased) says:

ssh2_exec($connection, '/usr/local/bin/php -i');

i have tried the windows equivalent:

ssh2_exec($connection, 'c:phpphp.exe c:some_file.php');

.... along with many other variations, but nothing seems to be working.
does anyone know what i could be doing wrong?

View Replies !
Ticks Not Working Under Windows
The code at bottom crashes apache when run on a windows. I have tried
both PHP/4.3.9 with Apache/1.3.27 and PHP/5.0.3 with Apache/2.0.49, same
thing happens.

Same code runs fine under Linux (PHP/4.3.4 with Apache/2.0.48)

On http://bugs.php.net/ there is a couple of bug reports on the same,
but 1 is closed and the others has status "bogus".

Does anybody know what that is all about?

/Bent

<?php
header('Content-Type: text/plain');

function tick_function() {
echo "..tick..
";
}

register_tick_function('tick_function');
declare(ticks=1);

echo "line 1
";
echo "line 2
";
echo "line 3
";
?>

View Replies !
Ftp_size Not Working On Windows IIS 6
I am trying to uplaod a file using ftp_put method. It is working fine but when I use ftp_size method to find file size, it always returns -1. I have tried everything but it always returns -1!!!!!!!!!!! I have heard that this function doesn't work on some server so I am confirming if it works on IIS or not!?

View Replies !
Client-Side Session Data
When you have a session going, I know that PHP stores a session token on the client, but does it keep the session *data* on the client, as well? Or is the session data being stored on the server, and just indexed to the session token data?

View Replies !
Session Is Working Correctly The Files In /var/lib/php/session Are Not 0 Size
I have two server with almost the same environtment, the only difference is on one apache was built from source and another was rpm.

OS: Fedora Core 3
apache 2.0.54
php 5.0.4

On one box session is working correctly the files in /var/lib/php/session are not 0 size when they are expected to hold some session data storing from scripts.

But this is not case for another box. The actual session files are created but they are not filled with data as it is expected and they are always 0 size and session variables are empty. Code:

View Replies !
Newline And Tab Not Working In PHP 5.0.3 | Apache 2.0.52 | Windows XP Pro
The following examples (see PHP 5 for Dummies, p. 82)
do not produce the expected results:

$string = "Hello
World";
echo $string;

and

$string = "Line 1
Line 2";
echo $string;

The first instance is for a line break such that the words are stacked:

Hello
World

The second instance is for a line break with a tabbed second line:

Line 1
Line 2

Do I need to change or add something in one of the configuration files?
Otherwise, is there a known fix for this?

View Replies !
System() Function Is Not Working In Windows
I want to encrypt a text file's content using public key of other user. I'm working in windows NT and running my php in apache server. I've installed my gnupg in c:gnupg.
To encrypt the content I used the following code: PHP Code:

View Replies !
Upload Script On Windows Not Working
I am trying to write an upload script that will upload files to a certain directory. I am testing this on my windows desktop under apache if it makes a difference.

Part of the target path is what the user posts to create a new directory for the uploaded file to be put into: Code:

View Replies !
Why A Session-based Program Behaves Different On Different Computers
I mean not about cookie.
Does it have something to do with operating system or browser plugin?

View Replies !
Registry Operation In PHP(Need To Read Some Windows Registry Key On Client Machine)
Are there any Registry function available in PHP for reading the
registry key on the client machine(WindowsXP,Win2K).(I don't need any
write operation to the registry).

I need to do certain validation for some application on the client
machine by reading the registry entry created by some other external
application(.exe).

View Replies !
Mail() Php Function Not Working In Windows Server 2003
I tried the mail() php function and it ends up with error message. I tried different tests with port configuration and Smtp server, though it ended up in error.

Error: Code: Original - Code Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:program fileseasyphp1-7wwwmailerman.php on line 19 Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:program fileseasyphp1-7wwwmailerman.php on line 19.

View Replies !
UPDATE Command Is Not Working On MySQL, Windows 2000 Server
Hi all,

I encountered mysterious problem with MySQL and PHP.

UPDATE command is not working on MySQL configured on Apache 2 with Windows 2000 Server.

It pulled my hairs for atleast 5 hours.

MySQL says Affected rows: 0 (Query took ~ sec) always?

Now, I've decided to move all PHP files and db to remote server.

Can anyone suggest possible reasons for above errors?

View Replies !
Session In Windows
I am using PHP version 4.3.0, Apache 2.0.44 on Windows XP. I am new to PHP Sessions and need you help with the problem below...Code:

View Replies !
WIndows IE - Session Expired
I have been working on a script for a client and use sessions
variables. Clicking back in Windows IE displays the previous scripted
page as session expired. However, I do not get that error in Mac/PC
Fire Fox or Mac Safari. I am using this header code to prevent caching:

/* no cache */
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");

Is there something I need to do differently for Windows IE to make
this work?

View Replies !
Need Different Session For Different Windows Opened.
I have created a chat application using PHP,Javascript and MySQL which is embedded in my web site. I have created a link to go from that website to chat application in the same browser. I have used a window.open to open a new window for chat application which will show you which users are online. Everytime when i click a user in the list a new window gets opened but the session used for both the windows is the same.

I have taken that user's id from $user=$_GET['q]; where q is the userid. and stored the value of user in a session called $_SESSION[user_id]=$user; everytime when it opens a new window. The problem is that i need different session for different windows opened.

View Replies !
Session.save_path For Windows XP
I can't use $_SESSIONS vars in different pages. I think the problem is in the directive:
session.save_path=I:/FoxServ/php/temp;

what should been my path if my hard drive number is 1 and I use windows xp?

View Replies !
Session Problem - IIS Windows 2003 & PHP 5
I am having trouble runnign sessions in php on windows and IIS 6. I have edited the php.ini file with a path to "c:program filesphpsessions" and gave full access to everyone on this. If I look in the folder it DOES actually store files, but still be sessions in PHP wont work. They work fine on another server with Apache et..

View Replies !
Accessing Session Data Over Multiple Windows?
I am using sessions to maintain information read from my database so that it is available to multiple pages in a frameset. I also have another page which opens in a separate window.

When the value of the sessions variable changes, it is reflected immediately on reload of the frames or pages within the same window. When my other page opens in the new window, however, I get intermitent results. Sometimes the new value is there immediately, and sometimes the old value is there.

I have tried some meta tags to try and ensure the page in the second window always refreshes, but even when I click on refresh the old data is still there. Is this something to do with the second page using a cached version of the session data which is different to that used by the first page?

View Replies !
Is Session Variable Valid For Second Explorer Windows.
i am running php script which creates session and stores some value in
session variables. then this file calls the another php script which
displays the values stored in session variables.

as far as i have no problem. but after running above steps, i am
leaving the explorer open. then i am opening new explorer and running
directly the second php script. this script displays the values stored
in session variables. should this happen?

according to me this should not happen because session is related with
opened browser window and not with browser.

View Replies !
Clash Of Session Variables - 2 Windows, Same Or Different Application
I use session_start(). When I open my web-based application in two windows on the same system, there's a definite clash; I can't do two independent sessions because the session variables are shared.

I solved that the easy way, by not opening two windows. But then I went on to write
more applications, and found that if I use the same variable names (for session variables) in different applications I get that same clash. Code:

View Replies !
Nusoap - Array ( [faultcode] =env:Client [faultstring] =Rejected (from Client) )
Using a PHP 4 and Nusoap I get the following errors when attempting to
call a web service

I need to login to the main web service and get a session token to be
able to access the second web service - this part works ok

When I try and call the second web service, I get the following error.

Result
Array ( [faultcode] =env:Client [faultstring] =Rejected (from
client) )

Request

Response

VR array(2) { ["faultcode"]=string(10) "env:Client" ["faultstring"]=>
string(22) "Rejected (from client)" }

Below is my code:

$VendorWsdl =
"https://api.betfair.com/betex-api-public-ws/v1/VendorService.wsdl";
$VendorSoap = new soapclient($VendorWsdl,"wsdl");
$VendorProxy = $VendorSoap->getProxy();

$AddUserParams =
array(request=>array('header'=>$BetfairRequestHeader,'username'=>$tok[3],'vendorSoftwareId'=>342,'expiryDate'=>$expiry));
$VendorAddResult = $VendorProxy->addVendorSubscription($AddUserParams);

$VendorSessionToken =
$VendorAddResult['Result']['header']['sessionToken'];
print("VST "); print($VendorSessionToken); print("<br>
");
if ($VendorSoap->fault)
{
print_r($VendorAddResult);
echo "";
}
else
{
$VendorError = $VendorSoap->getError();
if ($VendorError)
{
echo "<h2>Error</h2>" . $VendorError . "";
}
else
{
echo "<h2>Result</h2>";
print_r($VendorAddResult);
echo "";
}
}
echo "<h2>Request</h2>";
print_r($VendorSoap->request); print("<br>
");
echo "" . htmlspecialchars($VendorSoap->request, ENT_QUOTES) . "";
echo "<h2>Response</h2>";
echo($VendorSoap->response); print("<br>
");
echo "" . htmlspecialchars($VendorSoap->response, ENT_QUOTES) . "";

print("VR "); var_dump($VendorAddResult);

View Replies !
Session Not Working
For some reason this code is not working, it's worked fine with newer versions of php but now i'm on 4.1.2 and it's not, I've already done some tests and $_SESSION is working fine on the server and there's nothing wrong with the form the page is getting the variables and everything but something is wrong in the script and it's not registering the sessions.

The index page just calls the verify function which keeps sending me back to the login in page because for some reason $_SESSION[username] is not getting registered

The login page is just a basic form with the username and password fields. login2.php calls the login function, i tested and it is recieving the vars from the form just fine just not registering them so that when it redirects me to the index page and verify() is run it redirects me to the login page because the var is not found. PHP Code:

View Replies !
No Cookie Sent When Starting A Session - Windows Server 2003
I got PHP installed and running via IIS. When I call a start_session(); I can see the session file created in the c:mp directory (specified in php.ini). However, no cookie is sent to the browser. php.ini is set to use session cookies.

Cookies are for certain not being blocked by the brower. I am accessing the site via its own IP (i.e. http://23.64.18.112/test.php) The result is that every time I refresh the page, I get a new session data file in the temp directory because it is unable to associate the user with the session data since there is no session cookie on their system.

Passing session IDs via URL is not an option. I need session cookies to work.

View Replies !
MySql Session Not Working
This is my first time using php and sessions. I am trying to follow
what I recently read, but it isn't working as I was expecting. Please
tell me what I'm doing wrong?

I have defined my session handlers in a session handler include file,
sessions.php. This file calls session_set_save_handler() and also calls
session_start(). Each handler function operates correctly when I login
- the data is put into the session table.

After successful login, the user is redirected to /path/index.php, which
includes sessions.php. session_start() is called again, but the
$_SESSION global has no data.

I know the individual pieces of code are working properly, because at
one point in the process they individually worked. But when I put it
all together, it just keeps going back to the login page.



View Replies !
Working With Session Variables
I have this code:

$itemCode["$basketCount"] = $id ;

Both of the variables on the left are session variables.

So this now has to become:

$_SESSION['itemCode']["$_SESSION['basketCount']"] = $id;

if register_globals are turned off.

however that doesnt compile, so how should it be done properly?



View Replies !
Register_globals Is On Just Because Session Was Not Working
I am using Ubuntu hoary, kernel 2.6.10-5-386, apache 2, php 4 with the
following configuraton:

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 1
session.cookie_path = /tmp
session.cookie_domain =
session.serialize_handler = php
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=,fieldse t="
register_globals = On

Apache is running on port 2139.

register_globals is on just because session was not working, but when I
changed, when i access my server from it self (localhost) the session
worked.

View Replies !
Session Not Working In Folders
We just moved a script to a clients server.

We developed in PHP 4 and everything worked fine. The clients server is PHP 5.

Sessions work perfect when its in the main public_html directory.

When a user goes to a folder ie oursite.com/folder/ the session is no longer there.

Is there any changes in the versions that would cause a session to no longer be valid when you enter a folder?

View Replies !
Session Check Is Not Working
I have a session which bounce's out the user if the session doesn't contain their UserID. I aint even changed the code in any way the only substantial change i have done is copy n pasted the script to a different pc and now it won't work at this pc. But it still does on the other computer even though they are 100% the same. Code:

View Replies !
Session Stop Working
I have problem in session and i dont know why it stop working without any reason
so i have to close the broswer and open it again to make it work.

View Replies !
Session Not Working Change In Php.ini?
i do a lot of coding on a development box, and then i just push stuff onto a server when i get a big chunk of it done. well, i recently redid my server just installed xampp on it to get php, apache, mysql working easily.

my problem is, on my development machine, which is also running php, mysql, and apache on linux, ive programmed using SESSION's, and things are working great on this box, but when i pushed it all onto the server, the SESSION stuff doesnt seem to be working the same.

is there something i need to change in php.ini?

i built my development machine so long ago, i dont remember everything i did.

i can try something on my development machine and it works fine, and then when i try it on my server, my error checking is telling me that the SESSION's arent set.

View Replies !
Session Not Working On Page 3
session ..cant get it to work on page 3 it will not display anyhting on page 3
whhat i do wrong Code:

View Replies !
Session Variable Has Been Set To 0 Not Working
I just want a very simple way to log on to a site. When you have been logged in a session variable ($_SESSION['acces']) is set to 1. You can now visited different pages while the variable still stays on 1. When you are logged in it is possible to log out again. Once you have been logged out the $_SESSION['acces'] variable is set to 0 and it isn't possible to log out any more. The weird thing now is that when you go back to pages where you were before (when you were still logged in) you SOMETIMES get a page where you can log out again. Haven't got a clue how this is possible since the same variable has been set to 0 just earlier.

View Replies !
Session In Function Not Working
The function works great, but on the following pages the session does not get set to the right value (or any value at all). Here is my code: Code:

$_SESSION['totalCost'] = $totalCost;

session_start() is set on both pages and other $_SESSION array variables are being read just fine, but none of those is set inside a function.

View Replies !
Mini Session Script Not Working
why this script is not working correctly. 

<?php
session_start();
if (isset($_SESSION['record_number'])) {
  $_SESSION['record_number'] = 0;
}
?>
The error I am getting is this...

Parse error: syntax error, unexpected '{' in /home/carlos/web/my-program/test.php on line 3

I have beat my proverbial head against the wall on this one.  I just don't get it. 

View Replies !
Server SESSION Not Working Properly.
i have wrote the following script but , it works 100% ok in my WAMP, but when i have uploaded it in server then its not working properly though it dosent shows any warning or error but sesson is not working.

ithe path and of the session save folder is also correct and i foxed CHMOD 777 for the folder. Code:

View Replies !
Login Session Code Not Working
im trying to get the sessions working for my login page the code doesnt give me any error messages but it doesnt seem to restrict any access either this is wot i have so far: Code:

View Replies !
System(); Command Not Working On Remote System. Windows.
My server is a windows machine, on the same domain as python(also a windows machine). Apache is running as a service as an administrator. This is a test only environment to whom it may concern(I hate people telling me how insecure my system is) I'm just trying to run:

$last_line = exec('dir pythonc$', $retval, $g);
print_r($retval);
echo '<br>'.$g.'<br>';
echo '$last_line= '.$last_line.'<br>';
Which outputs:

Array ( )
1
$last_line=

The command from the command line works fine. And apache can access directories that only administrators can access on the local machine.

View Replies !
Session Variable Is Created And Set To True Not Working
I have a private area in my site. The user enters the username and password, then clicks "enter" and the session is created and also a session variable is created and set to true. Every page of the private area, checks whether this session variable is set to true and then if so, it gives you access, otherwise it redirects to a noaccess page.
The user moves arround the private area, do whatever he/she has to do and then logs out. Then the session is destroyed and the session variable also.

Now if the user clicks the back button of the explorer, is redirected to a noaccess page, fine, and so on as long as the user navigates back in the session, but when the user gets to the log on page, it recovers the POSTDATA and sets againg the session variable to true and anyone can see then the private area. I have set the page not to be cached, but it does not work. how to solve this problem?

View Replies !
Working With Sessions And Storing Credit Card Info Inside A Session
have a security concern working with sessions and storing credit card info inside a session, going to the payment gateway, redirecting back to my page and doing a soap connection and processing the order with the session variables, and then destroying the session afterwards.

is it safe enough to store credit card information in this manner, can hackers get to this? cause its possible to view POST variables with a firefox plugin.

or is it safer to write it to a temporary database table, do what i need to do and then delete the row?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved