RE: [PHP-DB] Session Problem
I`m using PHP 5.0.4 on the new server, the same version with my old one Regards, Anita -Original Message- From: bob plano [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 8:45 AM To: Adman, Nur anita Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php-db@lists.php.net Subject: Re: [PHP-DB] Session Problem what version of php are you using? i ran across a problem with sessions not working for windows in php 5.2 because the directories for the sessions were not created. On 1/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I don't think that the problem is on the browser setting... > > Cause I've tried to browse the other web application (that using session > too) on other server, and its running well... > > > > Forget to tell you, that if I used http://localhost <http://localhost/> > , the session running well... > > But if I change with http://hostname <http://hostname/> , the session > wasn't running... > > I thought the problem was on privileges... > > But I have setting the grant privilege to user root & the hostname... > > Still the session not running.. > > > > Regards, > > > > Anita > > > > -Original Message- > From: Bastien Koert [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 13, 2007 12:21 AM > To: Adman, Nur anita; [EMAIL PROTECTED] > Cc: php-db@lists.php.net > Subject: RE: [PHP-DB] Session Problem > > > > are you sure that the problem is not in the browser settings (not to > accept > > session cookies)? > > > > Bastien > > > > > > >From: <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >CC: > > >Subject: RE: [PHP-DB] Session Problem > > >Date: Fri, 12 Jan 2007 15:34:06 +0900 > > > > > > > > > > > >1. Did you mean that on phpinfo(), the Session Support is enabled? > > >Yes, it wrote so. > > > > > >2. I have check the session.save_files, and its writable. I found > > >some files session in there. > > > > > > > > > > > >Please advice... > > > > > > > > > > > >Thanks & Regards, > > > > > > > > > > > >Anita > > > > > > > > > > > > > > > > > >-Original Message- > > >From: Peter Beckman [mailto:[EMAIL PROTECTED] > > >Sent: Friday, January 12, 2007 2:27 PM > > >To: Adman, Nur anita > > >Cc: php-db@lists.php.net > > >Subject: Re: [PHP-DB] Session Problem > > > > > > > > > > > >1. Is session support compiled into PHP, or if not, is the module there > > >and > > > > > >being loaded? phpinfo() will tell you. > > > > > > > > > > > > If not, recompile PHP or build the dynamic module to support > sessions. > > > > > > > > > > > >2. If so, check the location of session.save_files and make sure it is > > > > > >writable by the web server user/group. If not, you must change this. > > > > > > > > > > > >Beckman > > > > > > > > > > > >On Fri, 12 Jan 2007, [EMAIL PROTECTED] wrote: > > > > > > > > > > > > > Dear All, > > > > > > > > > > > > > > > > > > > > > > > > > > > > I need some help please... > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm developing an web application using PHP/MySQL, and its has been > > > > > > > running on my company. > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm planning to migrate the system on a new server. > > > > > > > > > > > > > > I have installed everything that are needed on the new server to > > >running > > > > > > > the web application. > > > > > > > > > > > > > > But I'm confusing that the session isn't running.
Re: [PHP-DB] Session Problem
what version of php are you using? i ran across a problem with sessions not working for windows in php 5.2 because the directories for the sessions were not created. On 1/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I don't think that the problem is on the browser setting... Cause I've tried to browse the other web application (that using session too) on other server, and its running well... Forget to tell you, that if I used http://localhost <http://localhost/> , the session running well... But if I change with http://hostname <http://hostname/> , the session wasn't running... I thought the problem was on privileges... But I have setting the grant privilege to user root & the hostname... Still the session not running.. Regards, Anita -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Saturday, January 13, 2007 12:21 AM To: Adman, Nur anita; [EMAIL PROTECTED] Cc: php-db@lists.php.net Subject: RE: [PHP-DB] Session Problem are you sure that the problem is not in the browser settings (not to accept session cookies)? Bastien >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >CC: >Subject: RE: [PHP-DB] Session Problem >Date: Fri, 12 Jan 2007 15:34:06 +0900 > > > >1. Did you mean that on phpinfo(), the Session Support is enabled? >Yes, it wrote so. > >2. I have check the session.save_files, and its writable. I found >some files session in there. > > > >Please advice... > > > >Thanks & Regards, > > > >Anita > > > > > >-Original Message- >From: Peter Beckman [mailto:[EMAIL PROTECTED] >Sent: Friday, January 12, 2007 2:27 PM >To: Adman, Nur anita >Cc: php-db@lists.php.net >Subject: Re: [PHP-DB] Session Problem > > > >1. Is session support compiled into PHP, or if not, is the module there >and > >being loaded? phpinfo() will tell you. > > > > If not, recompile PHP or build the dynamic module to support sessions. > > > >2. If so, check the location of session.save_files and make sure it is > >writable by the web server user/group. If not, you must change this. > > > >Beckman > > > >On Fri, 12 Jan 2007, [EMAIL PROTECTED] wrote: > > > > > Dear All, > > > > > > > > > > > > I need some help please... > > > > > > > > > > > > I'm developing an web application using PHP/MySQL, and its has been > > > running on my company. > > > > > > > > > > > > I'm planning to migrate the system on a new server. > > > > > > I have installed everything that are needed on the new server to >running > > > the web application. > > > > > > But I'm confusing that the session isn't running. > > > > > > > > > > > > For your information, I've setting all configurations (MySQL & PHP), > > > included register globals to "Off". > > > > > > I have trying to re-install the web server & MySQL, but it still not > > > running... > > > > > > > > > > > > Please advice... > > > > > > > > > > > > Thanks & Regards, > > > > > > > > > > > > Anita > > > > > > > > > >--- - >--- > >Peter Beckman Internet >Guy > >[EMAIL PROTECTED] >http://www.purplecow.com/ > >--- - >--- > _ Your opinion matters. Please tell us what you think and be entered into a draw for a grand prize of $500 or one of 20 $50 cash prizes. http://www.youthographyinsiders.com/R.aspx?a=116 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Session Problem
I don't think that the problem is on the browser setting... Cause I've tried to browse the other web application (that using session too) on other server, and its running well... Forget to tell you, that if I used http://localhost <http://localhost/> , the session running well... But if I change with http://hostname <http://hostname/> , the session wasn't running... I thought the problem was on privileges... But I have setting the grant privilege to user root & the hostname... Still the session not running.. Regards, Anita -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Saturday, January 13, 2007 12:21 AM To: Adman, Nur anita; [EMAIL PROTECTED] Cc: php-db@lists.php.net Subject: RE: [PHP-DB] Session Problem are you sure that the problem is not in the browser settings (not to accept session cookies)? Bastien >From: <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >CC: >Subject: RE: [PHP-DB] Session Problem >Date: Fri, 12 Jan 2007 15:34:06 +0900 > > > >1. Did you mean that on phpinfo(), the Session Support is enabled? >Yes, it wrote so. > >2. I have check the session.save_files, and its writable. I found >some files session in there. > > > >Please advice... > > > >Thanks & Regards, > > > >Anita > > > > > >-Original Message- >From: Peter Beckman [mailto:[EMAIL PROTECTED] >Sent: Friday, January 12, 2007 2:27 PM >To: Adman, Nur anita >Cc: php-db@lists.php.net >Subject: Re: [PHP-DB] Session Problem > > > >1. Is session support compiled into PHP, or if not, is the module there >and > >being loaded? phpinfo() will tell you. > > > > If not, recompile PHP or build the dynamic module to support sessions. > > > >2. If so, check the location of session.save_files and make sure it is > >writable by the web server user/group. If not, you must change this. > > > >Beckman > > > >On Fri, 12 Jan 2007, [EMAIL PROTECTED] wrote: > > > > > Dear All, > > > > > > > > > > > > I need some help please... > > > > > > > > > > > > I'm developing an web application using PHP/MySQL, and its has been > > > running on my company. > > > > > > > > > > > > I'm planning to migrate the system on a new server. > > > > > > I have installed everything that are needed on the new server to >running > > > the web application. > > > > > > But I'm confusing that the session isn't running. > > > > > > > > > > > > For your information, I've setting all configurations (MySQL & PHP), > > > included register globals to "Off". > > > > > > I have trying to re-install the web server & MySQL, but it still not > > > running... > > > > > > > > > > > > Please advice... > > > > > > > > > > > > Thanks & Regards, > > > > > > > > > > > > Anita > > > > > > > > > >--- - >--- > >Peter Beckman Internet >Guy > >[EMAIL PROTECTED] >http://www.purplecow.com/ > >--- - >--- > _ Your opinion matters. Please tell us what you think and be entered into a draw for a grand prize of $500 or one of 20 $50 cash prizes. http://www.youthographyinsiders.com/R.aspx?a=116
RE: [PHP-DB] Session Problem
are you sure that the problem is not in the browser settings (not to accept session cookies)? Bastien From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> CC: Subject: RE: [PHP-DB] Session Problem Date: Fri, 12 Jan 2007 15:34:06 +0900 1. Did you mean that on phpinfo(), the Session Support is enabled? Yes, it wrote so. 2. I have check the session.save_files, and its writable. I found some files session in there. Please advice... Thanks & Regards, Anita -Original Message- From: Peter Beckman [mailto:[EMAIL PROTECTED] Sent: Friday, January 12, 2007 2:27 PM To: Adman, Nur anita Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Session Problem 1. Is session support compiled into PHP, or if not, is the module there and being loaded? phpinfo() will tell you. If not, recompile PHP or build the dynamic module to support sessions. 2. If so, check the location of session.save_files and make sure it is writable by the web server user/group. If not, you must change this. Beckman On Fri, 12 Jan 2007, [EMAIL PROTECTED] wrote: > Dear All, > > > > I need some help please... > > > > I'm developing an web application using PHP/MySQL, and its has been > running on my company. > > > > I'm planning to migrate the system on a new server. > > I have installed everything that are needed on the new server to running > the web application. > > But I'm confusing that the session isn't running. > > > > For your information, I've setting all configurations (MySQL & PHP), > included register globals to "Off". > > I have trying to re-install the web server & MySQL, but it still not > running... > > > > Please advice... > > > > Thanks & Regards, > > > > Anita > > --- Peter Beckman Internet Guy [EMAIL PROTECTED] http://www.purplecow.com/ --- _ Your opinion matters. Please tell us what you think and be entered into a draw for a grand prize of $500 or one of 20 $50 cash prizes. http://www.youthographyinsiders.com/R.aspx?a=116 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Session Problem
1. Did you mean that on phpinfo(), the Session Support is enabled? Yes, it wrote so. 2. I have check the session.save_files, and its writable. I found some files session in there. Please advice... Thanks & Regards, Anita -Original Message- From: Peter Beckman [mailto:[EMAIL PROTECTED] Sent: Friday, January 12, 2007 2:27 PM To: Adman, Nur anita Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Session Problem 1. Is session support compiled into PHP, or if not, is the module there and being loaded? phpinfo() will tell you. If not, recompile PHP or build the dynamic module to support sessions. 2. If so, check the location of session.save_files and make sure it is writable by the web server user/group. If not, you must change this. Beckman On Fri, 12 Jan 2007, [EMAIL PROTECTED] wrote: > Dear All, > > > > I need some help please... > > > > I'm developing an web application using PHP/MySQL, and its has been > running on my company. > > > > I'm planning to migrate the system on a new server. > > I have installed everything that are needed on the new server to running > the web application. > > But I'm confusing that the session isn't running. > > > > For your information, I've setting all configurations (MySQL & PHP), > included register globals to "Off". > > I have trying to re-install the web server & MySQL, but it still not > running... > > > > Please advice... > > > > Thanks & Regards, > > > > Anita > > --- Peter Beckman Internet Guy [EMAIL PROTECTED] http://www.purplecow.com/ ---
Re: [PHP-DB] Session Problem
1. Is session support compiled into PHP, or if not, is the module there and being loaded? phpinfo() will tell you. If not, recompile PHP or build the dynamic module to support sessions. 2. If so, check the location of session.save_files and make sure it is writable by the web server user/group. If not, you must change this. Beckman On Fri, 12 Jan 2007, [EMAIL PROTECTED] wrote: Dear All, I need some help please... I'm developing an web application using PHP/MySQL, and its has been running on my company. I'm planning to migrate the system on a new server. I have installed everything that are needed on the new server to running the web application. But I'm confusing that the session isn't running. For your information, I've setting all configurations (MySQL & PHP), included register globals to "Off". I have trying to re-install the web server & MySQL, but it still not running... Please advice... Thanks & Regards, Anita --- Peter Beckman Internet Guy [EMAIL PROTECTED] http://www.purplecow.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] session problem
This is advertising a porno site. -Original Message- From: tana dsasa [mailto:[EMAIL PROTECTED] Sent: 23 July 2003 11:11 To: [EMAIL PROTECTED] Subject: [PHP-DB] session problem I have installed an user-login aplication on my website ( http://www.norbertnet.ro ) but i have problems with session controls. I receive all kinds of warnings and i don't know how to interpret them thanks advanced - Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger http://www.cantor.com CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). For further important information, please read the Important Legal Information and Legal Statement at http://www.cantor.com/legal_information.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Session Problem, Please Help.....
I believe it's because $CLIENTID is not set at ALL before you register it. (ie, isset($CLIENTID) would fail) Therefore it cannot register the variable...there's nothing for it to register or track. Try... $CLIENTID = ""; session_register("CLIENTID"); $CLIENTID="SOMEVALUE"; - Original Message - From: "Hayan AL Mamoun" <[EMAIL PROTECTED]> To: "PHPList (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, May 02, 2002 3:15 AM Subject: [PHP-DB] Session Problem, Please Help. > Dear all, I have a strange problem: > I'm using IIS / WINNT4, PHP4 > Please check these two files: > -- > logon.phtml: > session_start(); > session_register("CLIENTID"); > $CLIENTID="SOMEVALUE"; > header("Location: clients/editclient.phtml"); > ?> > -- > clients/editclient.phtml: > session_start(); > echo "CLient ID VALUE IS : $CLIENTID"; > ?> > > When I run logon.phtml, it must create a session variable called CLIENTID > and then move to the second page, which displays this variable. > Each time I test this code I start a new instant of the IE and request > logon.phtml (in order to create a new session), but it never works from the > first time, while if I tested it a second time from the same instance of IE > it works???! > Please could anyone help, why it dosn't work from the first time? > > thnkx > Hayan > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Session problem?
On Sunday 07 April 2002 12:01, Jennifer Downey wrote: > Hi all, > > This code is working greate except for one minor bug. > > If I have 2 or 3 items at different prices buy.php is updating the points > of the user at the last priced item. > > In other words if > item 1 costs 1965 > item 2 costs 564 > item 3 costs 25 > > and item 1 is clicked it only takes away 25 points instead of 1965. > > Any ideas why? and what can I do to fix this. I have read a few tut's on > sessions now but none tell how I might get a fix for this. It looks as if you're going about this the completely wrong way. > This is the shop.php > > session_register("price"); You only have ONE storage space for the price of a item, yet you need to store more than one price, ie impossible. But it's really not needed. Read on. Your best (and secure) approach is to minimise the amount of info given by the client. AFAICS the only info needed from the client is the item ID (and possibly the quantity, but you only seem to allow buying 1 item per click?) > $query = "SELECT * FROM {$config["prefix"]}_items where id = 1"; > $result = mysql_query($query); > $row = mysql_fetch_array($result); > echo (""); > echo " SRC=\"images/blueholo.gif\" border=0 >"; > > echo "$row[name]"; > echo "Quantity $row[quantity]"; > echo "Cost: $row[price] SC"; > > $price=$row[price]; Not needed. > > $query = "SELECT * FROM {$config["prefix"]}_items where id = 2"; > $result = mysql_query($query); > $row = mysql_fetch_array($result); > echo (""); > echo " SRC=\"images/redholo.gif\" border=0 >"; > > echo "$row[name]"; > echo "Quantity $row[quantity]"; > echo "Cost: $row[price] SC"; > > $price=$row[price]; Not needed. This is overwriting your previous $price, thus you only get the last $price. > > This is buyitem.php > > session_start(); > $id = $HTTP_GET_VARS["id"]; Here, you should write some code to retrieve the price of the item directly from the DB. > // Updates the quantity > $query ="UPDATE {$config["prefix"]}_items SET quantity = quantity - 1 where > id = '$id'"; > $ret=mysql_query($query); > $check_points = "SELECT points FROM {$config["prefix"]}_users WHERE > uid={$session["uid"]}"; > $ret=mysql_query($check_points); > > while(list($points)=mysql_fetch_row($ret)) > { $cost=$HTTP_SESSION_VARS['price']; // Gets the price of the item. > replace with $_SESSION['price'] if PHP version >= 4.1.0 > echo $cost; Use the price as gotten from above. > if($points < $cost) { > echo "You don't have enough StarrCredits to purchase this item!"; > }else{ > > $query = "UPDATE {$config["prefix"]}_users SET points = points - $cost > where uid={$session["uid"]}"; > mysql_query($query); > } > } -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I remember when legal used to mean lawful, now it means some kind of loophole. -- Leo Kessler */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php