[PHP] Suddenly some errors are coming

2004-04-03 Thread Manisha Sathe
I am having a login page which goes to login process file. I have a include
file which connects to database. Till now all was ok suddenly it started
showing following

---
Warning: main(): stream does not support seeking in
/home2/www/members/login-px.php on line 6


This line is nothing but where i included my file for database connection.
My client got very upset, i am also not understanding why suddenly this
popped out when for last 6 months nothing was wrong.

I did not change anything neither my client. I tested db connection
separately - it is ok. Then what can be the problem? The environment is
Apache / MySQL / Linux / PHP.

Thanks in advance,

regards
manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Suddenly some errors are coming

2004-04-03 Thread Manisha Sathe
1)ok, will check out with ISP.
2)Yes but  not for the page i am geting error - for few others. But
previously all was ok,  why suddenly this problem came out ?

what u did in yr case ? pls guide me so that i will try it out the same.

manisha

Kim Steinhaug [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 1) Have your ISP upgraded PHP lately?
 2) Are you including files from another server?
 Meaning, your on www.domain1.com including files from
 www.domain2.com?

 Ive encountered this problem earlier when 1) and 2) was the case.

 --
 --
 Kim Steinhaug
 --
 There are 10 types of people when it comes to binary numbers:
 those who understand them, and those who don't.
 --
 www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
 --



 Manisha Sathe [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I am having a login page which goes to login process file. I have a
 include
  file which connects to database. Till now all was ok suddenly it started
  showing following
 
  ---
  Warning: main(): stream does not support seeking in
  /home2/www/members/login-px.php on line 6
  
 
  This line is nothing but where i included my file for database
connection.
  My client got very upset, i am also not understanding why suddenly this
  popped out when for last 6 months nothing was wrong.
 
  I did not change anything neither my client. I tested db connection
  separately - it is ok. Then what can be the problem? The environment is
  Apache / MySQL / Linux / PHP.
 
  Thanks in advance,
 
  regards
  manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] HTML/PHP page print

2004-03-18 Thread Manisha Sathe
Hello,

I want to print a document. The values are picked up from database and then
PHP displays it is on screen. But I want to print in some predefined format
(Customer has printed stationary) by using Browser's print button.

How can avoid other stuff on my web page ? Also when i print then title of
document / page no / url / date also get displayed. How can i avoid it ?

Thanks in advance

Regards
Manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Do not want Undefined variable message

2004-03-07 Thread Manisha Sathe
I have following code

testinclude.php
%
echo A $color $fruit; // A
include 'vars.php';
echo A $color $fruit; // A green apple
%

vars.php
%
$color = green;
$fruit = Apple;
%

But when i run the testinclude program I always get Undefined variable
errro on very first line. I know it is because vars are not defined yet, but
i remember last time those warnings never used to come. What setting is
needed in php.ini file ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Please please help - very very urgent

2003-12-01 Thread Manisha Sathe
I am developing one site. Initially it was working properly, but later
installed certificate so now instead of http:// now it has become https://

Now all weired things started happenning, it asks whether i want to download
the file ? if i open the file then it shows me all 'Source Codes' instead of
HTML output, but all plain html files are displayed ok, what is missing ?
do i need to change any php settings ?? please give me hints on that,

please please help me - it's very very urgent.

regards,
manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Please please help - very very urgent

2003-12-01 Thread Manisha Sathe
A big thanks to both of you, it got solved,

it was a config problem only and with the help of ISP we could resolve it,

Thanks once again

manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] New line problem - but for Excel

2003-11-28 Thread Manisha Sathe
Just now discussion was going on for new line - the same worked for me (I
used string replace)

Live Server : Linux / MySQL / PHP

There is a field called 'Address' (textarea) -  mysql stores \n for carriage
return. Now from current disussion thread i know i can remove this with
something like br (may be something else also)

I want to export this to csv file. PHPMyAdmin 2.0 version has one option to
convert to csv with delimiter e.g ';' .

On my computer (Windows)

If I do not use string replace command then '\n'  goes as a new row. If i
replace it with br then it appears in the Excel that is also I do not
want.

Is there any better way so that '\n' does not come out as new row - but do
not want to make use of br as this will appear, please suggest,

regards
manisha

When i open it in Excel now that \n becoms a new row which i do not want

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New line problem - but for Excel

2003-11-28 Thread Manisha Sathe
Actually I do not have phpscript for this. I am using readymade function
from PHPMyAdmin 2.1.0. They are having option to export to csv file with
delimeter ';' (It comes on screen first and then i copy to file manually.)

So my csv fil looks like

22;33;address line1
address line2

What excel does is it shows this as 2 different lines. But this all should
be in one line.

if  replace \n with br then

22;33;address line1braddress line2

Do u mean to say i need to write script only to produce proper '.csv' file ?


Regards,
Manisha






David T-G [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] how to escape '\'

2003-11-28 Thread Manisha Sathe
I have magic_quotes_gpc ON

'Here's is'  - this comes out after HTTP post  as

'Here\'s is'

But i want to get back the original string as it is - how to change ?

manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Date format question

2003-11-25 Thread Manisha Sathe
Thanks to all, it help me a lot

manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Date format question

2003-11-24 Thread Manisha Sathe
I have a date returned from MySQL in '-MM-DD' format, i want to show
this date in 'DD/MM/' format using PHP, date() function does the same if
i pass timestamp in int format, but how to convert  into int timestamp ?

e.g from '2003-11-25' to '20031125' ? and
Then I believe that i can use date (d/m/Y, '20031125' ) to the things done
?

Thanks in advance,

regards,
manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Where can i find error log

2003-11-20 Thread Manisha Sathe
On server display_error is off in php ini, so I do not get the error msgs,
is there anything like error log ? In this case how to find the errors?

regard,
manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Custom Session usind MySQL

2003-11-19 Thread Manisha Sathe
thanks all for your help, will try it out now

manisha

Manisha Sathe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I want the session to be accessed from different websites, so i got the
 answer in this forum only to make use of customised session with mysql.

 I searched the web and came to know that 'session.save_handler' of php.ini
 needs to be as 'user' but instead, on my server it is 'files'. As server
is
 a shared server so i may not be able to change it, what can i do to
resolve
 this ?

 Thanks in advance
 Manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Custom Session usind MySQL

2003-11-18 Thread Manisha Sathe
I want the session to be accessed from different websites, so i got the
answer in this forum only to make use of customised session with mysql.

I searched the web and came to know that 'session.save_handler' of php.ini
needs to be as 'user' but instead, on my server it is 'files'. As server is
a shared server so i may not be able to change it, what can i do to resolve
this ?

Thanks in advance
Manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Custom Session usind MySQL

2003-11-18 Thread Manisha Sathe
yes, website is on same machine, but if there is to and fro from 2 websites,
then for both ways i need to pass it ? what will happen to session time
limit ? if i go website1 then go to another website2 then after 30 mins i
come back to website1 (session timeout 30mins) then what will happen ? Any
sample code would be appreciated.

if at all i decide to go for database then do i need  'session.save_handler'
as 'user' ?

manisha


 Manisha Sathe wrote:

  I want the session to be accessed from different websites, so i got the
  answer in this forum only to make use of customised session with mysql.
 
  I searched the web and came to know that 'session.save_handler' of
php.ini
  needs to be as 'user' but instead, on my server it is 'files'. As server
is
  a shared server so i may not be able to change it, what can i do to
resolve
  this ?

 Are both websites on the same machine? If so, you can just use a common
 session.save_path and pass the session_id when changing servers.

 If the websites are on different machines, then you'll need to use a
 database for sessions and ensure the database is accessible by each site.

 --
 ---John Holmes...

 Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

 php|architect: The Magazine for PHP Professionals – www.phparch.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Single Session for different websites

2003-11-17 Thread Manisha Sathe
I hv physically one single server, but with different websites on it

like www.aaa.com / www.bbb.com / www.ccc.com

Now the problem is about session. What I want is login page at www.aaa.com
only but session  is accessible from www.bbb.com and www.ccc.com

can it be possible, if yes how ? if no any other work around ?

Thanks in advance
manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Single Session for different websites

2003-11-17 Thread Manisha Sathe
thanks for your soln, I searched the web, and got some readymade soln files
too, I have one question regarding this,

if my php.ini is giving me 'session.save_handler' as 'files'  and as server
is a shared server so i may not be able to change it, so what can we do to
resolve this ?

manisha

Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Manisha Sathe wrote:

  I hv physically one single server, but with different websites on it
 
  like www.aaa.com / www.bbb.com / www.ccc.com
 
  Now the problem is about session. What I want is login page at
www.aaa.com
  only but session  is accessible from www.bbb.com and www.ccc.com
 
  can it be possible, if yes how ? if no any other work around ?

 You can store the session information in a database that can be read
 from all three websites.

 --
 Burhan Khalid
 phplist[at]meidomus[dot]com
 http://www.meidomus.com
 ---
 Documentation is like sex: when it is good,
   it is very, very good; and when it is bad,
   it is better than nothing.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Want to install and link gd extension to PHP

2003-11-14 Thread Manisha Sathe
On Linux / PHP, for one third party software (moregroupware), I need gd PHP
extension. Initially I tried to uncomment the line in php.init as

extension=php_gd2.dll

but it did not work, i tried to find files for gd but only one file php_gd.h
exists, so i tried with that
extension=php_gd.h (I tried with php_gd.so too) But still nothing happened.
The ext dir is as follows

extension_dir=.\

Finally from internet I downloaded gd package and installed on server, but I
do not know how to link to PHP.  phpinfo() command shows config with apx2
and mysql, gd does not appear there. How to install gd and how to link to
PHP ? can anybody help me please ?

Thanks in advance,

manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] silly question about zend

2003-10-27 Thread Manisha Sathe
I wanted some sort of  IDE for PHP, so decided to use Zend (which i believe
quite popular).

I installed it on my redhat linux 8.0- both client and server components.
Instructions was smooth and gave me success msg, but now I do not know how
to open the IDE...

so stupid question.. but still want to know .. how to open Zend so that can
write PHP ?...

regards
manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session problem

2003-10-27 Thread Manisha Sathe
ok, i am putting it the code in both files, now my first.php is as follows


//start the session - in all the pages
session_start();
var_dump(ini_get('variables_order'));
var_dump(isset($_SESSION));
var_dump($_SESSION);

//store it like that
$_SESSION[name]= Rinku;
-
The error msg is

string(5) EGPCS bool(true) array(0) { }

-
second.php is like this

--
?
//start the session - in all the pages
session_start();
var_dump(ini_get('variables_order'));
var_dump(isset($_SESSION));
var_dump($_SESSION);

//use it anywher like this
echo $_SESSION[name];
?

the error msg is

string(5) EGPCS bool(true) array(0) { }
Notice: Undefined index: name in C:\Project
Codes\Vanderveer\www\testPHP\second.php on line 10

--

Please can u help me now in understanding it ?

manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Session problem

2003-10-26 Thread Manisha Sathe
I am trying to use session but it seems it does not work on win2k server,
the same runs on linux.

following is my first php
---
?
session_start();
$_SESSION[name]= Manisha;
?
--
following is the second php

?
session_start();
echo $_SESSION[name];
?

-

but it is always giving me following error msg

Notice: Undefined index: name in C:\Project Codes\www\testPHP\second.php on
line 6



The same thing works well on live Linux server. I checked php.ini options
such as session enable / register global etc - both r same. Please help  me.
Is it a problem with win2k server or did i miss out any thing in php.ini ?

Regards
Manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session problem

2003-10-26 Thread Manisha Sathe
It works well on linux means it shows me o/p as 'Manisha' but on local
Win2kserver, it gives error.

I tried to make use of error_reporting(0); in second.php but then screen
becomes blank, it does not show me the output as Manisha

manisha



Evan Nemerson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Your Linux server probably has error_reporting set to 0, which is usually
a
 good idea for production environments. To supress the error messages
without
 modifying your php.ini, do error_reporting(0). Take a look in your php.ini
 file- the error_reporting directive will have lots of comments around it
 explaining the concept thoroughly.


 On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
  I am trying to use session but it seems it does not work on win2k
server,
  the same runs on linux.
 
  following is my first php
  ---
  ?
  session_start();
  $_SESSION[name]= Manisha;
  ?
  --
  following is the second php
 
  ?
  session_start();
  echo $_SESSION[name];
  ?
 
  -
 
  but it is always giving me following error msg
 
  Notice: Undefined index: name in C:\Project Codes\www\testPHP\second.php
on
  line 6
 
  
 
  The same thing works well on live Linux server. I checked php.ini
options
  such as session enable / register global etc - both r same. Please help
  me. Is it a problem with win2k server or did i miss out any thing in
  php.ini ?
 
  Regards
  Manisha

 --
 Evan Nemerson
 [EMAIL PROTECTED]

 --
 The people are the only sure reliance for preservation of our liberty.

 -Thomas Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session problem

2003-10-26 Thread Manisha Sathe
Hi,

do u mean to say put this codes in php ?
I tried to put it in second.php following is the msg -
--
string(5) EGPCS bool(false)
Notice: Undefined variable: _SESSION in C:\Project
Codes\Vanderveer\www\testPHP\second.php on line 4
NULL
Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at C:\Project Codes\Vanderveer\www\testPHP\second.php:2)
in C:\Project Codes\Vanderveer\www\testPHP\second.php on line 7

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at C:\Project
Codes\Vanderveer\www\testPHP\second.php:2) in C:\Project
Codes\Vanderveer\www\testPHP\second.php on line 7

Notice: Undefined index: name in C:\Project
Codes\Vanderveer\www\testPHP\second.php on line 10
-

I am not that expert in PHP, what all above means ? can u give me a hint
now, what is going wrong ?

regards
manisha

Evan Nemerson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 var_dump(ini_get('variables_order'));
 var_dump(isset($_SESSION));
 var_dump($_SESSION);

 ?


 On Sunday 26 October 2003 01:43 am, Manisha Sathe wrote:
  It works well on linux means it shows me o/p as 'Manisha' but on local
  Win2kserver, it gives error.
 
  I tried to make use of error_reporting(0); in second.php but then screen
  becomes blank, it does not show me the output as Manisha
 
  manisha
 
 
 
  Evan Nemerson [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
   Your Linux server probably has error_reporting set to 0, which is
usually
 
  a
 
   good idea for production environments. To supress the error messages
 
  without
 
   modifying your php.ini, do error_reporting(0). Take a look in your
   php.ini file- the error_reporting directive will have lots of comments
   around it explaining the concept thoroughly.
  
   On Sunday 26 October 2003 01:06 am, Manisha Sathe wrote:
I am trying to use session but it seems it does not work on win2k
 
  server,
 
the same runs on linux.
   
following is my first php
---
?
session_start();
$_SESSION[name]= Manisha;
?
--
following is the second php
   
?
session_start();
echo $_SESSION[name];
?
   
-
   
but it is always giving me following error msg
   
Notice: Undefined index: name in C:\Project
Codes\www\testPHP\second.php
 
  on
 
line 6
   

   
The same thing works well on live Linux server. I checked php.ini
 
  options
 
such as session enable / register global etc - both r same. Please
help
me. Is it a problem with win2k server or did i miss out any thing in
php.ini ?
   
Regards
Manisha
  
   --
   Evan Nemerson
   [EMAIL PROTECTED]
  
   --
   The people are the only sure reliance for preservation of our
liberty.
  
   -Thomas Jefferson

 --
 Evan Nemerson
 [EMAIL PROTECTED]

 --
 A popular government, without popular information, or the means of
acquiring
 it, is but a Prologue to a Farce or a Tragedy - or perhaps both. Knowledge
 will forever govern ignorance, and a people who mean to be their own
 Governors must arm themselves with the power which knowledge gives.

 -James Madison

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] want to restart session after time out

2003-10-09 Thread Manisha Sathe
thanks all,

If session has to time out  then in that case what shall i do in following
case ?

I have a login page, user logins and starts playing (it is a on line game
site), for each action (he tells something to do), i need to check whether
he is login (i.e session on), if yes, then take all session vars and act
accordingly. So do u mean to say that i need to ask for login again if i do
not find any session? Is it a normal practice to do ?

I always wonder what will happen if the user is half way - running some PHP
script at back which calls another script in turn and session ends in
between? May be this question will be very basic, but i always get confuse.

I know bit of ASP. I remember it is having something like 'On Session End'
event hadler. but  PHP does not have some thing like this ?

Regards,
Manisha



Evan Nemerson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Comments inline

 On Wednesday 08 October 2003 10:23 pm, Chris Shiflett wrote:
  --- Evan Nemerson [EMAIL PROTECTED] wrote:
   Well you can change the default from 30 mins to something larger,
   but that has security consequences...
 
  I am speaking to myself as much as anyone, but we should all try to
develop
  the habit of explaining any such consequences that we mention. To do
  otherwise doesn't really educate the many people who read these
responses,
  whether now or in an archive. It only adds to the mystery of certain
topics
  (such as security).

 Well, they _can_ always ask if they don't understand. I agree that it's
best
 to give as much information as possible, but that takes a LOT of time. If
we
 don't assume any prior knowledge, answering anything would be a huge pain.

 That being said, I agree that in this case I should have elaborated...
It's
 probably a reach for a lot of list readers.

 If you have long sessions, the likelyhood that someone will be able to
steal
 the session ID and imitate the user increases drastically. It's called
 session hijacking, and any google search (or archive search, probably)
will
 yield a wealth of information.

 
   Sessions are kind of a hack over HTTP, which is pretty much a
   stateless protocol. There's Connection: keep-alive, but not every
   browser supports it, and I don't think there's a way to hook into it
   from PHP.
 
  Well, persistent connections aren't really intended to provide stateful
  transactions (and they don't).

 They most certainly are not, but if they could _theoretically_ be used
that
 way. Practicality, however, forbids it. IMO it's a Bad Idea, but still
worth
 mentioning. Actually, now I'm thinking about writing a POC just to see if
it
 can be done, even in a laboratory setting.

 
  My favorite example to use is Google, because there are two resources
that
  make up the front page: the HTML and the logo. With previous versions of
  HTTP, unless a persistent connection was specifically requested, a
separate
  TCP connection was established for each transaction. This meant two TCP
  connections would be created and destroyed just to render Google.
Imagine
  more elaborate sites, and you can see how this can really cause
performance
  problems. By making persistent connections the default (HTTP/1.1), a
single
  TCP connection can be established, and until all necessary resources are
  received, the same connection is used. This makes much more sense. The
  Connection header allows you to specify the desired behavior.

 Wow they finally have one image! IIRC, for a long time the logo was
several
 small images that looked like a single image. That way, the whitespace
around
 the letters didn't have to be included in the image. IMHO that was a cool
 solution. They still avoid superfluous line breaks, which makes me
happy...

 
  Oh, and every major browser I am aware of does support it, but hopefully
  you can now see that it is not associated with sessions or even stateful
  transactions.

 Okay well then here's another reason not to rely on keep-alive: Users
can't
 copy a URL and paste as an argument to wget -c (or any of the download
 managers). I'm sure there are many, many more reasons, but I sincerely
doubt
 I'd have to convice anyone not to use keep-alive for sessions.

 
  Hope that helps.
 
  Chris
 
  =
  My Blog
   http://shiflett.org/
  HTTP Developer's Handbook
   http://httphandbook.org/
  RAMP Training Courses
   http://www.nyphp.org/ramp

 --
 Evan Nemerson
 [EMAIL PROTECTED]

 --
 Who controls the past controls the future. Who controls the present
controls
 the past.

 -George Orwell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] want to restart session after time out

2003-10-09 Thread Manisha Sathe
oh god, I was so confused, I was under impression that it is 30 mins in
total, but it is 30  mins inactive time,

Keep in mind that this is 30 minutes of
 inactivity, not 30 minutes total. The user can be logged in for hours, so
 long as they are using the session.

Just this sentence and it solved all my problems, i was making round and
round only because of this wrong impression. It is a  stupid newbie
question, i hope u r used to it. btw, i did not find this in documentation.
Any docs please ?

Any way thanks a lot..lot..lot.

Regards
Manisha


Evan Nemerson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Wednesday 08 October 2003 11:23 pm, Manisha Sathe wrote:
  thanks all,
 
  If session has to time out  then in that case what shall i do in
following
  case ?

 Just have them log-in again.

 
  I have a login page, user logins and starts playing (it is a on line
game
  site), for each action (he tells something to do), i need to check
whether
  he is login (i.e session on), if yes, then take all session vars and act
  accordingly. So do u mean to say that i need to ask for login again if i
do
  not find any session? Is it a normal practice to do ?

 Yes. Users rarely complain about coming back to their computer an hour
later
 and having been logged out. Keep in mind that this is 30 minutes of
 inactivity, not 30 minutes total. The user can be logged in for hours, so
 long as they are using the session.

 
  I always wonder what will happen if the user is half way - running some
PHP
  script at back which calls another script in turn and session ends in
  between? May be this question will be very basic, but i always get
confuse.

 Sorry I don't see what you're asking... could you try to re-phrase it?

 
  I know bit of ASP. I remember it is having something like 'On Session
End'
  event hadler. but  PHP does not have some thing like this ?

 I'm assuming that just lets you provide code to execute after the session
 ends. To the best of my knowledge, it doesn't. Then again, I don't think
it
 would be a good idea. Lots of extra overhead, and you shouldn't need a
 cleanup function if you write the code correctly. Data should be written
to
 the DB periodically throughout the session, not at the end. What exactly
 would you have this code do?

 
  Regards,
  Manisha
 
 
 
  Evan Nemerson [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
 
   Comments inline
  
   On Wednesday 08 October 2003 10:23 pm, Chris Shiflett wrote:
--- Evan Nemerson [EMAIL PROTECTED] wrote:
 Well you can change the default from 30 mins to something larger,
 but that has security consequences...
   
I am speaking to myself as much as anyone, but we should all try to
 
  develop
 
the habit of explaining any such consequences that we mention. To
do
otherwise doesn't really educate the many people who read these
 
  responses,
 
whether now or in an archive. It only adds to the mystery of certain
 
  topics
 
(such as security).
  
   Well, they _can_ always ask if they don't understand. I agree that
it's
 
  best
 
   to give as much information as possible, but that takes a LOT of time.
If
 
  we
 
   don't assume any prior knowledge, answering anything would be a huge
   pain.
  
   That being said, I agree that in this case I should have elaborated...
 
  It's
 
   probably a reach for a lot of list readers.
  
   If you have long sessions, the likelyhood that someone will be able to
 
  steal
 
   the session ID and imitate the user increases drastically. It's called
   session hijacking, and any google search (or archive search, probably)
 
  will
 
   yield a wealth of information.
  
 Sessions are kind of a hack over HTTP, which is pretty much a
 stateless protocol. There's Connection: keep-alive, but not every
 browser supports it, and I don't think there's a way to hook into
it
 from PHP.
   
Well, persistent connections aren't really intended to provide
stateful
transactions (and they don't).
  
   They most certainly are not, but if they could _theoretically_ be used
 
  that
 
   way. Practicality, however, forbids it. IMO it's a Bad Idea, but still
 
  worth
 
   mentioning. Actually, now I'm thinking about writing a POC just to see
if
 
  it
 
   can be done, even in a laboratory setting.
  
My favorite example to use is Google, because there are two
resources
 
  that
 
make up the front page: the HTML and the logo. With previous
versions
of HTTP, unless a persistent connection was specifically requested,
a
 
  separate
 
TCP connection was established for each transaction. This meant two
TCP
connections would be created and destroyed just to render Google.
 
  Imagine
 
more elaborate sites, and you can see how this can really cause
 
  performance
 
problems. By making persistent connections the default (HTTP/1.1), a
 
  single
 
TCP connection can be established, and until all necessary resources

[PHP] Need secure login

2003-10-09 Thread Manisha Sathe
Hi,

I have a client. He does not want member login by just giving password and
login id. He says anybody can give this info to his friend and his friend
can access the site.

One way is to make use of cookie on his computer. So only from one computer
he can access the site. But the thing is that user needs to accept it, and i
believe I need to provide some method too in case they delete the cookie.

Is there any other solution for this ?  Is there any third party software
for this ?

Regards
Manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Video Streaming

2003-10-09 Thread Manisha Sathe
Client's site will be on PHP/Linux. They want to add Videos on site. But
they say they want to make use of Video Straming. I am very new to this
part. I searched web, I found some third party softwares (one of this is
videolan which is open source). But not sure how to integrate this with PHP.

Is there any special newgroup for this ?

Regards
Manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Need secure login

2003-10-09 Thread Manisha Sathe
Thanks Justin, actually I was also thinking of the same, but just wanted to
confirm that it is really not a good idea.

Was also wondering if there is any third party solution ?.

Regards
Manisha


Justin French [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 This first rule is never trust the client-side.
 The second rule is never trust the client-side.

 This means that relying on...
 a) the user accepting the cookie
 b) the user always using the same computer
 c) the user not deleting the cookie
 ... is a BAD idea.

 Frankly, if you force me to use a single computer to access your site,
 I'll just leave and never return.  I have 3 desktops and a laptop, all
 of which I use at different times.  Telling me I can only use one of
 them to access your site is like telling me I have to be wearing green
 socks whilst visiting your site.  It should be about MY preference, not
 yours.

 Likewise, you can't tie a member to a mac address, or to an IP address.

 I don't really have a solution to your problem, and anything you DO
 implement will be a pain in the arse to users (otherwise Amazon et al
 would have already implemented it), but here's some thought starters\
 -- all of which are deterrents NOT solutions.

 1.  Make sure that a user can't login from two different places at
 once, if the user does, generate an email report of the problem, so
 that you can keep an eye on users who might be abusing the system.

 2.  Randomly ask the user an additional question on login (DOB, pet's
 name, shoe size, postcode, etc) and compare it to Q's asked earlier.

 3.  Tell them repeatedly that sharing a userid/pass is against your
 acceptable terms, and that any members caught doing so will have their
 account closed without refund -- usually the idea of getting caught is
 a good enough deterrent.

 4.  Perhaps implement a rolling password system -- if this thing needs
 to be bullet proof.  Each time they login, or once a month, or at
 random intervals, you could reset their password.  Again, this ins't a
 solution, but it's a deterrent, because the user would have to keep
 their friends updated.


 Most of the above is guaranteed to frustrate users though.  Is your
 site worth enough to your users to frustrate them?  Is the content your
 protecting really that important?  I doubt it :)


 Justin





 On Friday, October 10, 2003, at 11:44  AM, Manisha Sathe wrote:

  Hi,
 
  I have a client. He does not want member login by just giving password
  and
  login id. He says anybody can give this info to his friend and his
  friend
  can access the site.
 
  One way is to make use of cookie on his computer. So only from one
  computer
  he can access the site. But the thing is that user needs to accept it,
  and i
  believe I need to provide some method too in case they delete the
  cookie.
 
  Is there any other solution for this ?  Is there any third party
  software
  for this ?
 
  Regards
  Manisha
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  ---
  [This E-mail scanned for viruses]
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Any idea how to do this?

2003-10-08 Thread Manisha Sathe
I am a newbie to php specially sessions part. I read a lot about it.

On my site user needs to login. The session will be created and some info
will be stored into it. Session will be ON for some predefined time (given
in ini file e.g 30 mins). The session will die after that time ( according
to what I understood).

 But what if I want system something like - till user closes his browser or
logout - he should remain 'Login', even after 30 mins. Is there any thing
like session_time_out event handler ? -- after time out  again take session
values and restore it ? If user closes his browser or presses 'Logout'
button then only session ends till then he remains 'LogOn'

Manisha



Paul Van Schayck [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello,

 [EMAIL PROTECTED] (Ryan A) wrote in
  So I have decided that I am going to try to make the same thing on our
  site but offer it free to the public...only problem is...I dont know
  where to start and was hopeing someone here can give me tips/urls or
  links to boost me on my way...

 You know PHP? Take a look at the image functions:
 http://www.php.net/manual/en/ref.image.php

 You can do all sort of things with images.

 Polleke

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] want to restart session after time out

2003-10-08 Thread Manisha Sathe
Hi,

I want to make use of sessions. Very new to this part. I read a lot about
it. Now know how to register / start etc.

I understand that session terminates after time out (specified in php.ini
file e.g 30 mins).  But I do not want session to be terminated like this. I
want to terminate session only if user closes the browser or clicks 'LogOut'
button. After 30 mins I still want to keep all session values as it is.

Is there any way out ?

Regards
Manisha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Any idea how to do this?

2003-10-08 Thread Manisha Sathe
sorry, wrong posting



Manisha Sathe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I am a newbie to php specially sessions part. I read a lot about it.

 On my site user needs to login. The session will be created and some info
 will be stored into it. Session will be ON for some predefined time (given
 in ini file e.g 30 mins). The session will die after that time ( according
 to what I understood).

  But what if I want system something like - till user closes his browser
or
 logout - he should remain 'Login', even after 30 mins. Is there any thing
 like session_time_out event handler ? -- after time out  again take
session
 values and restore it ? If user closes his browser or presses 'Logout'
 button then only session ends till then he remains 'LogOn'

 Manisha



 Paul Van Schayck [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hello,
 
  [EMAIL PROTECTED] (Ryan A) wrote in
   So I have decided that I am going to try to make the same thing on our
   site but offer it free to the public...only problem is...I dont know
   where to start and was hopeing someone here can give me tips/urls or
   links to boost me on my way...
 
  You know PHP? Take a look at the image functions:
  http://www.php.net/manual/en/ref.image.php
 
  You can do all sort of things with images.
 
  Polleke

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php