[PHP] Re: Emulating a POST

2001-08-10 Thread elias

hope this helps:

///
?php
// simple post method
// version 1.0 by Andrus ([EMAIL PROTECTED])

// Disclaimer:
// everyone can change or use this code however and wherever they want ;)



 // send out browser headers
 function send_headers ($fp) {
  fputs ($fp, Accept: */*\n);
  fputs ($fp, Accept-Language: en\n);
  fputs ($fp, Connection: Keep-Alive\n);
  fputs ($fp, User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows
98)\n);
 }

 // post data and return reply
 function post_data ($host, $url, $data) {
  $fp = @fsockopen ($host, 80, $errno, $errstr, 120);
  $ret = ;
if (strncasecmp ($url, http://;, 7) == 0) $url = substr
($url, 7);
  $p = strpos ($url, '/');
  if (empty ($p)) {
   $req = /;
  } else {
   $req = substr ($url, $p);
  }
  if ($fp) {
   fputs ($fp, POST $req HTTP/1.0\n);
   send_headers ($fp);
   fputs ($fp, Content-type: application/x-www-form-urlencoded\n);
   $out = ;
   while (list ($k, $v) = each ($data)) {
if(strlen($out) != 0) $out .= ;
$out .= rawurlencode($k). = .rawurlencode($v);
   }
   $out = trim ($out);
   fputs ($fp, Content-length: .strlen($out).\n\n);
   fputs ($fp, $out);
   fputs ($fp, \n);
   while(!feof($fp)){
$ret .= fgets($fp,128);
   }
  fclose ($fp);
  }
  return $ret;
 }
// example how to use:

// following code will post variables login and pass to server
www.something.com script /submit.php
$reply = post_data (www.something.com, /submit.php, array (login =
$username, pass = $password));
?
///
Brandon Orther [EMAIL PROTECTED] wrote in message
00cd01c1204b$d5cdb9b0$0a00a8c0@webintel">news:00cd01c1204b$d5cdb9b0$0a00a8c0@webintel...
 Hello,

 I have used perl to emulate a post with LWP:UserAgent   I am looking for
 the same effect in php.  Does anyone know how I can do this?
 Thank you
 Brandon





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Difference between win98 and win2000

2001-08-10 Thread elias

In windows 2000 unless you set permission to write files you can't!
I mean that you have to explicitly specify that a certain folder can be
written to.

... [EMAIL PROTECTED] wrote in message
001d01c1215b$0c7613d0$14794ad3@maidew3qujo5j0">news:001d01c1215b$0c7613d0$14794ad3@maidew3qujo5j0...
My messageboard is working properly in Win98 Apache;
However, it doesn't work properly under Win2000 with the same code.
( Problem: it can save the message but cannot read from file)
I have a questionis there any difference between 98 and 2000?
thx for your help

 ...nick




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Can't display my result yet....

2001-08-10 Thread David Robley

On Fri, 11 Feb 2000 10:14, Ardani Sarjito wrote:
 I'm back again!

 What does this warning mean:
 Supplied argument is not a valid MySQL result resource

 Thanks !

Try this resource :-)

http://au2.php.net/manual/en/faq.using.php#AEN61456

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   The days of the digital watch are numbered

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Printing

2001-08-10 Thread Renze Munnik

On Thu, Aug 09, 2001 at 06:39:59PM +0100, Fernando Avila wrote:
 Hello php-general,
 
   I made a system in php and mysql for a corp.
 This system controls the payment of the customers, so i need to print
 the quote of each payment. Is there anyway to do this with php?
 I mean.. Printing quotes from a web browser, besides that i also need
 something to print from this system, but in this case the monthly
 resume of each customer's account.


Using PHP you can't print client-side. Either the user should press
the print-button (just like elias already mentioned), or you should
use JavaScript (window.print()).

-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] MySQL connection

2001-08-10 Thread B. van Ouwerkerk


If I use extention .inc for including my connection-
variables file then browser attempts to download this file which is
not better then first. I searched the net on this topic and found a
LOT of information about this problem and the best that I found is
here I just want you to be aware of this problem

It's common knowledge that you should NOT put your database user+PW into 
your HTML root. Using .inc means Apache (or whatever kind of server you're 
using) isn't going to parse the file through php.

This has been discussed on this and other php related lists.. just have a 
look in the archive and you'll see..

Don't want to sound nasty harsh or whatever you want to call it but I think 
most tutorials will say something about it. I would suggest you read those 
before you send messages to this or any other list.. The archive is a great 
resource too. Remember.. you're most certainly not the first person who 
uses PHP to connect to MySQL.. most if not all issues you think you have 
found has been seen by others. Searching the archive and reading tutorials 
will keep you from burning bandwith and space for a non-issue.

Have fun.

Bye,



B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] CGI error

2001-08-10 Thread Phil Driscoll

On Thursday 09 August 2001 17:21, [EMAIL PROTECTED] wrote:
 After install PHP when I try to open in a URL the address:
 http://casa/IISSamples/Default/exemplo.php
 I receive the following error:

 Error 403 of HTTP
 403.1 Forbided: forbided execution access


First experiment:

Put a file called test.htm in the same directory which contains any old html.
Try to access that as http://casa/IISSamples/Default/test.htm

If that works OK, then the configuration of pws is wrong. I don't have PWS so 
I'm not sure of the user interface to configuring it, although if you 
installed php using the 'Installer' distribution, it will have configured PWS 
correctly.

Sometimes, PWS seems to get itself into a strage state where you can't get it 
to work no matter what you try. Some people have had success after 
reinstalling PWS. Others just dump it and use Xitami or Apache.

Cheers
-- 
Phil Driscoll

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Determining browser encryption strength

2001-08-10 Thread Sean C. McCarthy

Hi Bolivar,

Ciphering is something done at the network level when the connection is
done. It is done exactly at the negotiation of the SSL session and it is
done by the Server (Apache, IIS, ...). So you can use the information
provided by the CGI Environment Variables of Apache (if it happens that
you are using Apache) to determine the actual SSL enc method.

More precisely you can use the HTTPS_CIPHER, HTTPS_KEYSIZE and
HTTPS_SECRETKEYSIZE to determine the different aspects of the actual
encryption method used by the client. If you want 128bits that means
Triple-DES for simetric encryption. If you do not have a strong know-how
at SSL I recommend you these two links:

Intro to SSL
http://developer.netscape.com/docs/manuals/security/sslin/index.htm

Apache-SSL doc
http://www.apache-ssl.org/docs.html

Hope this helps you.

Sean C. McCarthy
SCI, S.L. (www.sci-spain.com)

Bolivar Shagnasty wrote:
 
 My web site it going to be the starting point with a link to an application
 that only works with browser at 128bit strength.  What I would like to do is
 automatically determine if the user doesn't have a compatible browser and
 then direct them where to get the correct browser.  Does anyone know how I
 might go about doing this?
 
 tia,
 bol
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] charset win1251

2001-08-10 Thread Maxim Derkachev

Hello BRACK,

Thursday, August 09, 2001, 10:19:46 PM, you wrote:
B I finished English version of my site and wanted to start Russian
B part but realized that MySQL server returnes all data in koi-8r 
B charset which is not very comfortable for some of the users, 
B specially I know that A LOT of russians using Opera brawser older 
B versions of which do not support koi-8 Any one knows how to 
B convert koi-8 results of MySQL to win1251? 

It depends. What charset is your data in?
If you DB's data is already in koi-8r, ther only thing you can do at the
database level is to use a query:
SET CHARACTER SET  koi8_cp1251
and then execute your queries.
All the data will be converted to win1251 codepage on the fly.
Alternately, you can place all the data to the database in 1251
charset, and then compile mysqld with option
--with-charset=cp1251 (used in ./configure)
Then you'll have all the data returned in cp1251, and mysql will sort
all the text data using that charset. To have the data returned in
koi-8 in this case you'll have to issue a query
SET CHARACTER SET  cp1251_koi8

By the way, there's not so many russians, if any, using the old Opera browsers
:)


-- 
Best regards,
Maxim Derkachev mailto:[EMAIL PROTECTED]
System administrator  programmer,
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
www.books.ru, www.symbol.ru 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem generating pdf with pdflib. Please help

2001-08-10 Thread Dezider Góra

Hi all,

I'm experiencing strange problem. When I try to use verdana font, all
national characters from codepage 1250 won't appear att all. Has anybody
experienced this behaviour?
I'm using pdflib 4.0.1, Mandrake 8.0, php 4.0.6.
pdflib.upr is updated as required for my machine. I've converted
verdana.ttf to verdana.afm on linux.

tia,
Dezider.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] problem with session start

2001-08-10 Thread Balaji Ankem



Hi! friend,
 i got the following error when i am goint to start a session.

This is the file. and i got the following errors.

Warning: 
open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in 
c:\www\login.php on line 2Warning: 
open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in 
Unknown on line 0
Warning: Failed to write session data (files). Please verify 
that the current setting of session.save_path is correct (/tmp) in 
Unknown on line 0

login.php

?phpsession_start();session_register(emp_id);?

htmlheadSCRIPT 
language="Javascript"

function check(){

 if 
(document.login.emp_id.value=='') 
{ 
alert('Please enter your employee 
number'); 
document.issue.emp_id.focus(); 
return false;

 }

 else 
if(document.login.emp_pass.value=='') 
{ 
alert("Please enter the 
password"); 
document.issue.emp_pass.focus(); 
return false; } 
else 
{document.login.method = 
"POST";document.login.action="http://10.145.2.23/authentication.php";document.login.submit(); 
return true; } 
}/script/head

body text="arial" background="imacbg1.gif" 
font face="arial" 
 center h1 WELCOME TO IMAC TOOL 
/h1/centercenterimg 
SRC="logo.gif" height=100 
width=100/imgpreform name="login" 
bEmployee No:/b input type="text" size="10" 
name="emp_id" maxlength="10" 
value=""brbPassword :/b 
input type="password" size="10" name="emp_pass" maxlength="10" 
value=""br 
input type="button" Value="LOGIN" 
/form/pre/center/font/body/html

---
Information transmitted by this E-MAIL is proprietary to Wipro Limited and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] PHP.exe EAT's my win resources... (!)

2001-08-10 Thread Tribun

Tach!

Is that correct, that my php.exe opens each time when a user access a page
(e.g. on my intranet-page) ??

Is there no way to say php.exe to run only one time and compile the files
through this instance???

I've designed a intranet-platform for LAN-parties and at our last one, there
were 505 guys, and ~30 accessed my pages at the same time, so the 2 gig-ram
high-end-power PC was to slow to return the queries whitin the 180 sec.
timeout...

(excause my bad english ;)

I hope, someone knows an answer...

10x !

Tribun
---
www.mp3o.net


PS: the LAN-Party's HomePage is called: www.lankoeln.com
(may be some other germans from cologne read this ;)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] problem with session start

2001-08-10 Thread Balaji Ankem



Hi Andrew,
 Thankyou now it is working well.
I would like to close the session after clicking logout button.
How to do?

Thanks inadvance.
Regards
-Balaji

  - Original Message - 
  From: 
  Andrew Braund 
  To: Balaji 
  Ankem 
  Sent: Friday, August 10, 2001 1:45 
  PM
  Subject: RE: [PHP] problem with session 
  start
  You need tocreate a c:\tmp 
  directory. 

---
Information transmitted by this E-MAIL is proprietary to Wipro Limited and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] again session doubt

2001-08-10 Thread Balaji Ankem



Hello! boss,
 It started session.
 But i didn't close the session.
I tried to login again. But it is giving authorization required.
It is not allowing for loggin in again because of session.
What i have to do.

Thanks and regards
-Balu


  
- Original Message - 
From: 
Yamin 
Prabudy 
To: Balaji 
Ankem 
Sent: Friday, August 10, 2001 12:38 
PM
Subject: Re: Help required on creating 
session

say you have a form that input the username in 
the top of the file before the html just put the
? 
session_start();
session_register(username);
?
that's goes the first page...
in the next page you can do this

? session_start();
echo $username; ?

you must have you username display 
there

  - Original Message - 
  From: 
  Balaji Ankem 
  To: Yamin 
  Prabudy 
  Cc: [EMAIL PROTECTED] 
  Sent: Friday, August 10, 2001 1:16 
  PM
  Subject: Help required on creating 
  session
  
  Hi! friends,
   i also want this feature.
  
  Can u tell me how to start a session whenever the user 
  logged in and how to end session after logout.
  
  where i have to give these function 
names...
  session_start();session_register(username);
  
  Thanks in advance.
  
  Regards
  -Balaji
  
- Original Message - 
From: 
Yamin 
Prabudy 
To: [EMAIL PROTECTED] 
Sent: Friday, August 10, 2001 10:02 
AM
Subject: [PHP] HELP...session
Hi there I need help about sessionsee i have a 
page (index.php) that used 
thissession_start();session_register(username);and i got 
input username after the submit button is click i move into a 
frame pages..then in the frame i define again 
session_start(); for each frame...i got two frame..i 
intended to parse the username into my frame...but got nothingi 
intended to parse the username all over the pages (in frame) until 
he/she log outcan anyone help me with itThanks in 
AdvanceYamin 
Prabudy

---
Information transmitted by this E-MAIL is proprietary to Wipro Limited and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] Re: how 2 read an non-existing file?! (I need help)

2001-08-10 Thread Tribun

at first:  thank you for your answer.


but I'm not sure what you've meant, with
I'm betting there's code in the code archives to show you how

Have you any ideas to do that

May be through the CURL function???
(http://www.php.net/manual/de/ref.curl.php)

In fact, I realy dont know. If you can, please help me out ;)

10x!

Tribun
---
mp3o.net

Richard Lynch [EMAIL PROTECTED] schrieb im Newsbeitrag
04da01c1211b$ecdb1960$6401a8c0@Lynchux100">news:04da01c1211b$ecdb1960$6401a8c0@Lynchux100...
 Yahoo *might* be detecting that you're not a real browser, since PHP
 probably sends different headers when you attempt to get the file
 dynamically than your browser sends when you type the URL.

 So Yahoo may be denying you access when using PHP, but not from your
 browser.

 There's nothing to stop you from writing some extra code and talking
 directly to their server and lying to them about what browser you are,
 however.  I'm betting there's code in the code archives to show you how.

 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: Tribun [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 09, 2001 4:33 AM
 Subject: how 2 read an non-existing file?! (I need help)


  the following problem:
 
  I want to read out, if the firstname is a boy's name or a girl's name...
 
  therefore I've written this code: (which allready works)
 
  -- snap ---
 
 

$fp=fopen('http://www.vornamenlexikon.de/main/suchen.asp?kriterium=searchB1
  =Suchenaction=searchnowsearchby='.$name,r);
   if($fp){
$daten=fread($fp,10);
fclose($fp);
$male='/m.gif';
$female='/w.gif';
if((strpos($daten,$female)0)(strpos($daten,$male)0)){
 if(strpos($daten,$male)strpos($daten,$female))$result='w';
 else $result='m';
}else if(strpos($daten,$female)0)$result='w';
else if(strpos($daten,$male)0)$result='m';
   }
   if(empty($result)){
 
 

$fp=fopen('http://www.kindername.de/'.strtolower(substr($name,0,1)).'-namen.
  htm',r);
if($fp){
 $namen=array();
 $daten=fread($fp,10);
 fclose($fp);
 
 $daten=strstr($daten,'font size=4 face=Verdana, Arial, Helvetica,
  sans-serifBVORNAMEN MIT');
 for($cnt=0;strpos($daten,'tr')0;$cnt++){
  $daten=substr(strstr($daten,'tr'),4);
  $tag=substr($daten,0,strpos($daten,'/tr'));
  if(strpos($tag,'/td')0){
   $x1=substr(strstr($tag,'td'),4);
   while(strpos($x1,' ')0)$x1=str_replace(' ',' ',$x1);//TAB
   while(strpos($x1,'  ')0)$x1=str_replace('  ',' ',$x1);//DBLSPACE
   $x1=trim($x1);
   for($i=1;strpos($x1,'td')0;$i++){
 
  $field=strtolower(trim(strip_tags(substr($x1,0,strpos($x1,'/td');
if($i==1)$namen[$cnt]=array($field);
else if($i==2)$namen[$cnt]['gender']=trim($field);
else if($i==3){
 while(strpos($field,',')0){
  array_push($namen[$cnt],substr($field,0,strpos($field,',')));
  $field=substr(strstr($field,','),1);
 }
 array_push($namen[$cnt],$field);
}else if($i==4){
 if(in_array($name,$namen[$cnt]))$result=$namen[$cnt]['gender'];
}
$x1=substr(strstr($x1,'td'),4);
   } } } } }
  -- /snap ---
 
  This code works, but I wanted to include another Datebase (Yahoo)
 
  So I included this function:
 
  -- snap ---
 
$fp=@fopen('http://babynames.pregnancy.yahoo.com/bnfname?n='.$name,r);
   if($fp){
$daten=fread($fp,1);
fclose($fp);
$male='boy';
$female='girl';
if((strpos($daten,$female)0)(strpos($daten,$male)0)){
 if(strpos($daten,$male)strpos($daten,$female))$result='w';
 else $result='m';
}else if(strpos($daten,$female)0)$result='w';
else if(strpos($daten,$male)0)$result='m';
   }
  -- /snap ---
 
  But this code has no effect. It returns only an Error (404)
 
  The reason therefore is, that the targetting URL does'nt
  exist:
 
  Try this URL's
 
  http://babynames.pregnancy.yahoo.com/bnfname?n=Patrick
  or
  http://babynames.pregnancy.yahoo.com/bnfname.htm?n=Patrick
  http://babynames.pregnancy.yahoo.com/bnfname.?n=Patrick
  http://babynames.pregnancy.yahoo.com/bnfnameBLABLA?n=Patrick
 
  In a Browser its not nessesary to type in the correct Name
  bnfname. So you can add what ever you want, but the result
  is the same (it works)
 
  But the problem is, to downloading this file, because then the reason
  is an 404-Error (not existing)
 
  Does anybody know an answer to this problem???
 
  How can I download this file anyway... and read out the information
  I want?
 
 
 
  Thanks,
  Tribun (Patrick)
  ---
  www.mp3o.net
 
 
  PS: I know. its not the best english ;)
 
 
 




-- 
PHP General Mailing List 

[PHP] plz check the warning message

2001-08-10 Thread Balaji Ankem




Warning: Cannot send session cache limiter - headers 
already sent (output started at c:\www\authentication.php:2) in 
c:\www\authentication.php on line 38




  - Original Message - 
  From: 
  Yamin Prabudy 
  
  To: Balaji 
  Ankem ; [EMAIL PROTECTED] 
  Sent: Friday, August 10, 2001 2:26 
  PM
  Subject: [PHP] Re: problem with session 
  start
  OK i can see your problemyou are using 
  windows.then in the php.ini you must set where to put the session 
  file.it's somewhere around with line like 
  thissession.save_path = /tmpchange it to something 
  likesession.save_path = c:\tmpof cause you must make the tmp directory 
  firstgood luckYamin Prabudy - Original Message 
  -  From: Balaji Ankem  To: [EMAIL PROTECTED] 
   Cc: Yamin Prabudy  Sent: Friday, August 10, 2001 3:10 
  PM Subject: problem with session start Hi! 
  friend, i got the following error when i am goint to 
  start a session. This is the file. and i got the following 
  errors. Warning: 
  open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in 
  c:\www\login.php on line 2 Warning: 
  open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in 
  Unknown on line 0 Warning: Failed to write session data (files). 
  Please verify that the current setting of session.save_path is correct (/tmp) 
  in Unknown on line 0 login.php 
  ?php session_start(); 
  session_register(emp_id); ? 
  html head SCRIPT 
  language="Javascript" function 
  check(){ if 
  (document.login.emp_id.value=='') 
  { 
  alert('Please enter your employee 
  number'); 
  document.issue.emp_id.focus(); 
  return false; 
  } else 
  if(document.login.emp_pass.value=='') 
  { 
  alert("Please enter the 
  password"); 
  document.issue.emp_pass.focus(); 
  return false; 
  } 
  else 
  { document.login.method = 
  "POST"; 
  document.login.action="http://10.145.2.23/authentication.php"; 
  document.login.submit(); 
  return true; 
  } } /script 
  /head body text="arial" background="imacbg1.gif" 
   font face="arial" 
   center h1 WELCOME TO 
  IMAC TOOL /h1/center 
  center img SRC="logo.gif" height=100 
  width=100/img pre form 
  name="login"  bEmployee No:/b input 
  type="text" size="10" name="emp_id" maxlength="10" 
  value=""br bPassword 
  :/b input type="password" size="10" name="emp_pass" 
  maxlength="10" 
  value=""br 
  input type="button" Value="LOGIN"  
  /form /pre /center 
  /font 
/body/html

---
Information transmitted by this E-MAIL is proprietary to Wipro Limited and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 02:44:09PM +0530, Balaji Ankem wrote:
 
 Warning: Cannot send session cache limiter - headers already sent (output started at 
c:\www\authentication.php:2) in c:\www\authentication.php on line 38
 


I don't know what's in authentication.php, but I do know that -like
the warningmsg says- you try to send headers while on line 2 you've
already sent some output (echo, print, whatever).
You'll have to put the session_start() before your output.

-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP.exe EAT's my win resources... (!)

2001-08-10 Thread Bruin, Bolke de

That is correct, if you dont want it
run it as an ISAPI module.

Bolke

-Oorspronkelijk bericht-
Van: Tribun [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, August 10, 2001 10:24 AM
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] PHP.exe EAT's my win resources... (!)


Tach!

Is that correct, that my php.exe opens each time when a user access a page
(e.g. on my intranet-page) ??

Is there no way to say php.exe to run only one time and compile the files
through this instance???

I've designed a intranet-platform for LAN-parties and at our last one, there
were 505 guys, and ~30 accessed my pages at the same time, so the 2 gig-ram
high-end-power PC was to slow to return the queries whitin the 180 sec.
timeout...

(excause my bad english ;)

I hope, someone knows an answer...

10x !

Tribun
---
www.mp3o.net


PS: the LAN-Party's HomePage is called: www.lankoeln.com
(may be some other germans from cologne read this ;)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Printing

2001-08-10 Thread B. van Ouwerkerk


I made a system in php and mysql for a corp.
  This system controls the payment of the customers, so i need to print
  the quote of each payment. Is there anyway to do this with php?
  I mean.. Printing quotes from a web browser, besides that i also need
  something to print from this system, but in this case the monthly
  resume of each customer's account.


Using PHP you can't print client-side. Either the user should press
the print-button (just like elias already mentioned), or you should
use JavaScript (window.print()).

That's going to be fun if you need to create say 200 reports.. :-)

Lucky you.. a tool exists to pull data out of a MySQL database..

Do a search for.. report or reportgenerator or something like that on the 
mysql list archive. It's found here:http://lists.mysql.com/
Your question has been answered there..

Bye,


B.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Log off

2001-08-10 Thread AJDIN BRANDIC

Hi

I am using HTTP authorisation to allow users to log in to vew specific pages.
What can I use for log off?.

I tried using 
header (HTTP/1.0 401 Unauthorised);
header (Location: http://www.mysite.com/index.php3;);

OR

$PHP_AUTH_USER=0;

but it didn't work.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] plz check the warning message

2001-08-10 Thread karthik

Hi,

What Renze Munnik said is absolutely right. U r trying to send headers after outputing 
something. 

So u either have to write ur code before outputing anything or if u want to keep ur 
code like that only, but still want it to work, go to php.ini and change the settings 
for output_buffering.

Karthik.

- Original Message - 
  From: Balaji Ankem 
  To: Yamin Prabudy 
  Cc: [EMAIL PROTECTED] 
  Sent: Friday, August 10, 2001 2:44 PM
  Subject: [PHP] plz check the warning message


  This document contains frames, which cannot be edited. The original document is 
attached.



--


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP] plz check the warning message

2001-08-10 Thread Balaji Ankem



Hi, munnik,

 thankyou for u'r help.

I am getting the following warning while closing session.


Warning: Trying to destroy uninitialized session in 
c:\www\logout.php on line 3session closed for 85744 





Plz do the needful. I am sending the following files.



logout.php

?phpsession_unregister(emp_id);session_destroy();echo 
"session closed for $emp_id";?!DOCTYPE HTML PUBLIC "-//W3C//DTD 
HTML 3.2 Final//EN"HTMLHEADTITLEThankyou 
/TITLE

 meta http-equiv="Expires" CONTENT="0" 
meta http-equiv="Cache-Control" CONTENT="no-cache" meta 
http-equiv="Pragma" CONTENT="no-cache"



/HEAD

BODY background="nightsky.gif" 
text="white"

p

 centerh1THANKYOU FOR USING IMAC 
TOOL/h1/centerbrbr center 
h3Do you want to login again?/h3a 
href="login.php"clickhere/a /center

/p/BODY/HTML
Authentication.php
?phpheader ("Cache-Control: no-cache, 
must-revalidate");header ("Pragma: no-cache");

 // Connect to MySQL

 mysql_connect( 'localhost', 'balaji', 
'pingpong' ) or die ( 'Unable to 
connect to server.' );

 // Select database on MySQL 
server

 mysql_select_db( 'imac' 
) or die ( 'Unable to select 
database.' );

 // Formulate the query

 $sql = "SELECT * FROM employee 
WHERE 
emp_id = '$emp_id' AND emp_pass = '$emp_pass'";

 // Execute the query and put results in 
$result

 $result = mysql_query( $sql 
) or die ( 'Unable to execute 
query.' );

 // Get number of rows in 
$result.

 $num = mysql_numrows( $result 
);

 if ( $num != 0 ) {

 // A matching row 
was found - the user is authenticated.

 $auth = 
true; 
session_start(); 
session_register(emp_id);

 $row = 
mysql_fetch_object($result);

if 
($row-user_type=='S'){ 
include('super.php');

}else if 
($row-user_type=='O'){include('ordinary.php');

} }

 else { file://User does not exist or not 
authenticated.echo 'centerh1Authorization 
Required./h1/center';header( 
'WWW-Authenticate: Basic realm="Private"' );header( 
'HTTP/1.0 401 Unauthorized' 
);exit; }

?

Thanks in advance

With warm Regards
-Balaji




  - Original Message - 
  From: 
  Renze Munnik 
  
  To: Balaji 
  Ankem ; Yamin 
  Prabudy 
  Cc: [EMAIL PROTECTED] 
  Sent: Friday, August 10, 2001 2:49 
  PM
  Subject: Re: [PHP] plz check the warning 
  message
  On Fri, Aug 10, 2001 at 02:44:09PM +0530, Balaji Ankem 
  wrote:  Warning: Cannot send session cache limiter - headers 
  already sent (output started at c:\www\authentication.php:2) in 
  c:\www\authentication.php on line 38 I don't know what's 
  in authentication.php, but I do know that -likethe warningmsg says- you 
  try to send headers while on line 2 you'vealready sent some output (echo, 
  print, whatever).You'll have to put the session_start() before your 
  output.-- * RzE:-- -- 
  Renze Munnik-- DataLink BV E: [EMAIL PROTECTED]-- W: +31 23 
  5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 
  5516190 Stationsplein 82-- 2011 LM HAARLEM 
  http://www.datalink.nl-- 
  -- PHP General Mailing List (http://www.php.net/)To unsubscribe, 
  e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]To 
  contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Information transmitted by this E-MAIL is proprietary to Wipro Limited and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] php authentication system

2001-08-10 Thread Andras Kende

Hello,

I need to password protect some webpages right now its passwords
everywhere

Probably need some cookie based php authentication system where users login
once 
Where can I find a simple but good script??

Thanks :)
Andras



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 04:08:19PM +0530, Balaji Ankem wrote:
 Hi, munnik,
 
   thankyou for u'r help.
 
 I am getting the following warning while closing session.
 
 
 Warning: Trying to destroy uninitialized session in c:\www\logout.php on line 3
 session closed for 85744 
 
 
 Plz do the needful. I am sending the following files.
 
 
 
 logout.php
 
 ?php
 session_unregister(emp_id);
 session_destroy();
 echo session closed for $emp_id;
 ?
 !DOCTYPE (...)
 (...) /HTML
 


I just gave a quick look, but I think you forgot (or didn't know to)
add session_start() to your code. So it will be:

?php
session_start();/* -- This is it! */
session_unregister(emp_id);
session_destroy();
echo session closed for $emp_id;
?
!DOCTYPE (...)
(...) /HTML

Otherwise you don't have any session to destroy...


-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP.exe EAT's my win resources... (!)

2001-08-10 Thread elias

Hmm...Maybe because you're installing PHP as CGI.
ISAPI runs fast only only once as you want. But it's not really stable.

Tribun [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Tach!

 Is that correct, that my php.exe opens each time when a user access a page
 (e.g. on my intranet-page) ??

 Is there no way to say php.exe to run only one time and compile the files
 through this instance???

 I've designed a intranet-platform for LAN-parties and at our last one,
there
 were 505 guys, and ~30 accessed my pages at the same time, so the 2
gig-ram
 high-end-power PC was to slow to return the queries whitin the 180 sec.
 timeout...

 (excause my bad english ;)

 I hope, someone knows an answer...

 10x !

 Tribun
 ---
 www.mp3o.net


 PS: the LAN-Party's HomePage is called: www.lankoeln.com
 (may be some other germans from cologne read this ;)





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] THIS REALLY DOES WORK.

2001-08-10 Thread Tom Hill

This  mail  is  never  sent  unsolicited.  This  is  a  PostMasterDirect.com  mailing !
You  Have  subscribed  to  receive  this  information  at  ListsUK.
To  unsubscribe  forward  this  message  to  [EMAIL PROTECTED]
( be  sure  to  forward  the  ENTIRE  message,  or  it  will  not  unsubscibe  you ! )


This  Works  Like  the  National  Lottery  Except  It's  Much  More  Fun  
as  you  Are  GUARANTEED  to  WIN !

Dear  Friend.
 My  name  is  Tom,  in  My  2000  my  car  was  repossessed 
and  debt  collectors  were  hounding  me  like  you  would  not  believe !  
I  lost  my  job  when  the  shop  I  worked  in  went  out  of  business.  
I  was  at  my  wits  end  and  findng  it  terribly  hard  to  make  ends  
meet.  I  could  not  even  afford  cat  litter  for  my  poor  cat.  In  June  2000, 
my  friend  recieved  a  letter  from  a  self  made  millionaire  called 
David  Rhodes  from  Norfolk,  telling  her  how  to  
EARN  £37.000.   at  a  Time.

My  friend  was  sceptical  but  I  was  desperate  and  because  I  had  
nothing  to  lose.  I  borrowed  some  money  from  my  Dad  and  gave  
it  a  TRY.

In  August  I  paid  my  Dad  back  and  went  to  Spain  on  hoilday  with  
my  friend, paying  for   both  our  holidays.  In  October  I  brought  a  
brand  new  house  and  will  be  moving  very  shortly  and  I  will  never  
have  to  work  for  any  one  else  again.

I  have  earned  £200.000  to  date  and  will  become  a  millionaire  within  
the  next  few  months.  This  programme  works  perfectly  every  time,  
I  have  never  failed  to  receive  less  than  £37.000  from  each  mailing  
of  200  LETTERS.

This  is  a  Legitimate  Business  Opportunitiy  not  requiring  you  to  sell  
anything  or  come  into  contact  with  people.  Best  of  all  you  only  have  
to  leave  home  to  post  a  few  letters.  This  is  your  lucky  break  simply  
follow  the  instructions  below  
(  estimate  to  take  two  to  three  hours  WORK  )  you  cannot  lose !
Without  casting  a  fishing  line  how  do  you  expect  to  catch  a  fish ?  
Do  It !   Surprise  yourself.  it  really  does  work !

Kindest  regards.

 T.  Roebuck.


Information  and  Instuctions  to  Follow  Carefully.
Follow  these  six  steps  EXACTLY !  What  have  you  got  to  lose ?  
You  have  Everything  to  GAIN.

Step  No.1.
 Send  £1.00  to  each  of  the  five  names  and  addresses  to 
follow.  Sellotape  £1.00  coin  to  a  piece  of  card  and  write  your  name  
and  address  and  these  words :- 
  PLEASE  ADD  MY  NAME  and  ADDRESS  to  YOUR  MAILING  LIST 
on  the  card  oe  letter.  This  is  Legitimate  service  for  which  you  are  
paying.


No.1.  R.  Hill.  The  Flat.  67,  Barlby  Road,   London.   W10 - 6AW. 

No.2.  Fred  Race.  Flat  52.  28a,  Seymour  Place,  London.  W1H - 5WJ.

No.3.  Peter  Bulat.  2a,  Clockhouse  Mansions,  North  Circular  Road,
Palmers  Green,  London.  N13 - 6BG.

No.4.  David  Breard.  118,  Dalgarno  Gardens,  North  Kensington,
London.  W10 - 6AA. 

No.5.  Z.  Pallaris.  18,  Prospero  Close,  Greenstead,  Colchester,, 
Essex.  CO4 - 3SS.



Step  No.2.
  Remove  the  name  that  is  one  on  the  list  and  move  
the  others  up  one  place  so  that  No.2  becomes  No.1  and  then  
No.3  becomes  No.2  and  so  on.  Then  place   your  own  name  
and  address  in  the  No.5  position.  Alternatively  type  or  print  the  
five  names  and  addresses  on  a  slip  of  paper  and  fix  it  over  the  
existing  names  and  addresses  before  either  photocopying  or  
using  a  low  cost  printer  that  can  easily  do  this  or  if  you  have  a  
PC  you  can  do  it  yourself.


Step  No.3.
 Photocopy  or  Print  200  copies  or  more  of  this  letter  
which  by  now  has  your  Name  and  Address  in  Position  No.5.


Step  No.4.
 Buy  a  Mailing  List  of  Business  Opportunity  seekers  
from  a  Mailing  List  Broker  found  in  your  local  newspaper  or  
contact  the  following  Sending  s.a.e  to :-  Lord  R  Hill   Suite  14.  
59,  Crawford  Street,  London.  W1H - 1HS. 0870  120  7932.  
Make  sure  you  ask  for  LIST  of  Business  Opportunitiy  Seekers  
(  buyers  only  )  This  will  cost  you  between  £15.00  to  £19.00  per  
250  names  and  addresses  on  stick  and  peel.


Step  No.5.
  While  waiting  for  your  mailing  list  to  arrive  place  
your  
copies  of  this  letter  in  a  self  sealing  envelope.  Seal  them  and  
attach  a  2nd  class  stamp  (  never  send  1st  class  stamps  ).


Step  No.6.
 When  your  mailing  list  arrives  place  the  gummed  
addressed  labels  onto  the  envelopes  and  post  them  all.  

Re: [PHP] plz check the warning message

2001-08-10 Thread Balaji Ankem



Hi, Munnik,
I am starting the session if 
authentication is successful and i am closing the session whenever user click on 
logout button.
Here in my case authentication is succesfull and session is 
started. And i checked the c:\tmp directory. session file is there.
But it is not closing the session without starting a session 
again before closing.
I did as u told it works perfect. Thanks alot.
Why we have to start again another session before 
closing.

One more doubt..after logging out (it closed the session) and i pressed the 
back button in browser It has given 
Warning.page expired. I pressed Refresh button It asked do u want to repost 
the values again. I pressed retry button. It posted the values again and created 
session again...

Is there anyway to restrict the reposting?? Means after pressing logout 
button we shouldn't allow the user to go back or reposting the data again and 
getting session again.

Thanks and Regards
-Balu



  - Original Message - 
  From: 
  Renze Munnik 
  
  To: Balaji 
  Ankem 
  Cc: [EMAIL PROTECTED] 
  Sent: Friday, August 10, 2001 4:13 
  PM
  Subject: Re: [PHP] plz check the warning 
  message
  On Fri, Aug 10, 2001 at 04:08:19PM +0530, Balaji Ankem 
  wrote: Hi, munnik, 
   thankyou for u'r help. 
   I am getting the following warning while closing session. 
Warning: Trying to destroy uninitialized session in 
  c:\www\logout.php on line 3 session closed for 85744   
   Plz do the needful. I am sending the following files. 
 logout.php  ?php 
  session_unregister(emp_id); session_destroy(); echo "session 
  closed for $emp_id"; ? !DOCTYPE (...) (...) 
  /HTML I just gave a quick look, but I think you 
  forgot (or didn't know to)add session_start() to your code. So it will 
  be:?phpsession_start(); /* -- This is it! 
  */session_unregister(emp_id);session_destroy();echo "session 
  closed for $emp_id";?!DOCTYPE (...)(...) 
  /HTMLOtherwise you don't have any session to 
  destroy...-- * RzE:-- 
  -- Renze Munnik-- DataLink BV E: 
  [EMAIL PROTECTED]-- W: +31 23 
  5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 
  5516190 Stationsplein 82-- 2011 LM HAARLEM 
  http://www.datalink.nl-- 
  -- PHP General Mailing List (http://www.php.net/)To unsubscribe, 
  e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]To 
  contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Information transmitted by this E-MAIL is proprietary to Wipro Limited and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] [PHP-WIN] Php on Windows not running!!! Any help ???

2001-08-10 Thread legal


Hello Everyone

I have installed php on my windows computer running with PWS.
PHP files are in c:\php folder.
I have placed test.php file in c:\inetpub\wwwroot folder on which I have
given execute permission.
When I call it in internet explorer as http://localhost/test.php  it gives
an error as File not found --- Error 500 ?Internal Server Error. However,
my ASP files are running perfectly well.
What does it mean?
However, when run c:\php\php.exe ?i   it shows some html codes which I
presume it is in order.

What should I do to run my PHP files.


Ajay K. Ratra
Ludhiana (INDIA)
[EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 04:42:48PM +0530, Balaji Ankem wrote:
 Hi, Munnik,
 I am starting the session if authentication is successful and i am closing the 
session whenever user click on logout button.
 Here in my case authentication is succesfull and session is started. And i checked 
the c:\tmp directory. session file is there.
 But it is not closing the session without starting a session again before closing.
 I did as u told it works perfect. Thanks alot.
 Why we have to start again another session before closing.

Well... you don't actualy start another session before closing. The
call to session_start() starts a session or resumes one:

=[ PHP Manual ]=

session_start() creates a session (or resumes the current one based on
the session id being passed via a GET variable or a cookie).

=[ end ]=

 
 One more doubt..after logging out (it closed the session) and i pressed the back 
button in browser It has given 
 Warning.page expired. I pressed Refresh button It asked do u want to repost the 
values again. I pressed retry button. It posted the values again and created session 
again...
 
 Is there anyway to restrict the reposting?? Means after pressing logout button we 
shouldn't allow the user to go back or reposting the data again and getting session 
again.

I don't know (yet)... I'm gonna try to find out. I'll let you know.


-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php authentication system

2001-08-10 Thread pierre-yves

http://www.phpbuilder.com/columns/tim2505.php3
py
- Original Message -
From: Andras Kende [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 10, 2001 6:44 AM
Subject: [PHP] php authentication system


 Hello,

 I need to password protect some webpages right now its passwords
 everywhere

 Probably need some cookie based php authentication system where users
login
 once 
 Where can I find a simple but good script??

 Thanks :)
 Andras



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Php on Windows not running!!! Any help ???

2001-08-10 Thread legal

Hello Everyone

I have installed php on my windows computer running with PWS.
PHP files are in c:\php folder.
I have placed test.php file in c:\inetpub\wwwroot folder on which I have
given execute permission.
When I call it in internet explorer as http://localhost/test.php  it gives
an error as File not found --- Error 500 ?Internal Server Error. However,
my ASP files are running perfectly well.
What does it mean?
However, when run c:\php\php.exe ?i   it shows some html codes which I
presume it is in order.

What should I do to run my PHP files.


Ajay K. Ratra
Ludhiana (INDIA)
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Question about security: writing images to a directory (chmod 777)

2001-08-10 Thread Data Driven Design

Using the ftp functions is an alternative

http://www.php.net/manual/en/ref.ftp.php

Data Driven Design
1506 Tuscaloosa Ave
Holly Hill, Florida 32117

http://www.datadrivendesign.com
Phone: (386) 226-8979

Websites That WORK For You
- Original Message -
From: SED [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 9:07 PM
Subject: [PHP] Question about security: writing images to a directory (chmod
777)


 For a job I'm working on I need to let PHP-code write images to a
 directory. To be able to do that I need to make this directory read- and
 writeable. Concerned about the security, is this directory open for
 anyone to write into it? (Let say PHP-code form another server?) If so,
 how can I solve this without this security-risk?

 Thanks,
 SED


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [Re: [PHP] user's ip]

2001-08-10 Thread Dave Freeman

On 7 Aug 01, at 14:02, René Moonen wrote:

 The problem is that REMOTE_ADDR returns the IP address of the proxy (if

 if(getenv(HTTP_X_FORWARDED_FOR))
 {
   $ip=getenv(HTTP_X_FORWARDED_FOR);
 }
 else
 {
   $ip=getenv(REMOTE_ADDR);
 }
 $host = gethostbyaddr($ip);

except, perhaps, when there's also a firewall with NAT/MASQ involved - in
that case you'll probably not get much closer than the firewall's IP
address (at least, that's how it is on my network).

CYA, Dave


---
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au  mailto:[EMAIL PROTECTED]
---

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] plz check the warning message

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 04:42:48PM +0530, Balaji Ankem wrote:
 Is there anyway to restrict the reposting?? Means after pressing
 logout button we shouldn't allow the user to go back or reposting
 the data again and getting session again.


Okay... I've figured out two 'solutions'. But... I must say: They're
not pretty. Actually you can't prevent it. But:

Option 1

You can set a cookie after logging in. The authorization page should
check for that cookie. It should not exist in order to login. The
login page (where one gives his username/password) should remove
that cookie if it exists.
This is, though, a _very_ ugly solution and using cookies for
security isn't realy the best thing to do. So actually I wouldn't
encourage you to use this.

Option 2

Another solution is to redirect to a different page. I created the
following example:

=[ PHP code ]=
// File: login.php
HTML
 HEAD
  TITLELogin Test/TITLE
 /HEAD
  
 BODY
  FORM method=post action=submit-login.php
   INPUT type=text name=firstname
   INPUT type=text name=lastname
   BR
   INPUT type=submit
  /FORM
 /BODY
/HTML


// File: submit-login.php
?
  /* Here you should do things with the provided data...
 For the example I only write it to the log. */
  error_log (Firstname: $firstname, 0);
  error_log (Lastname: $lastname, 0);

  /* Here's where you redirect */
  header (Location: logged-in.php);
?

// File: logged-in.php
/* Whatever you want! */

=[ end of code ]=

After pushing the submit-button, the data will be submitted to
submit-login.php. There you handle the login-procedure. After that,
you automatically redirect to a different page (logged-in.php in my
example). That's you you show eg 'You are logged in now'. If you
reload that page, nothing realy happens. If you push 'Back', you end
up on login.php again.

Uptil now this is the best option I've come up with.

Hope it works for what you had in mind.

-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: PHP.exe EAT's my win resources... (!)

2001-08-10 Thread Bruin, Bolke de

Depends for what you are using it.

I'm having a PHP module as an ISAPI module in production use here for
use as a Quicken OFX server. I haven't had much trouble with it and
its running stable for 6 months now.

Bolke

-Oorspronkelijk bericht-
Van: elias [mailto:[EMAIL PROTECTED]]
Verzonden: Friday, August 10, 2001 1:49 PM
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Re: PHP.exe EAT's my win resources... (!)


Hmm...Maybe because you're installing PHP as CGI.
ISAPI runs fast only only once as you want. But it's not really stable.

Tribun [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Tach!

 Is that correct, that my php.exe opens each time when a user access a page
 (e.g. on my intranet-page) ??

 Is there no way to say php.exe to run only one time and compile the files
 through this instance???

 I've designed a intranet-platform for LAN-parties and at our last one,
there
 were 505 guys, and ~30 accessed my pages at the same time, so the 2
gig-ram
 high-end-power PC was to slow to return the queries whitin the 180 sec.
 timeout...

 (excause my bad english ;)

 I hope, someone knows an answer...

 10x !

 Tribun
 ---
 www.mp3o.net


 PS: the LAN-Party's HomePage is called: www.lankoeln.com
 (may be some other germans from cologne read this ;)





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Php on Windows not running!!! Any help ???

2001-08-10 Thread Data Driven Design

I used to use PWS, but now I use Apache, maybe I can help. Did you:
. move the php.ini and php4ts.dll to your system folder
. put the correct path in the registry editing file and double click it
. check the box for 'Execute' in your PWS administration

Data Driven Design
1506 Tuscaloosa Ave
Holly Hill, Florida 32117

http://www.datadrivendesign.com
Phone: (386) 226-8979

Websites That WORK For You
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 10, 2001 7:43 AM
Subject: [PHP] Php on Windows not running!!! Any help ???


 Hello Everyone

 I have installed php on my windows computer running with PWS.
 PHP files are in c:\php folder.
 I have placed test.php file in c:\inetpub\wwwroot folder on which I have
 given execute permission.
 When I call it in internet explorer as http://localhost/test.php  it gives
 an error as File not found --- Error 500 ?Internal Server Error. However,
 my ASP files are running perfectly well.
 What does it mean?
 However, when run c:\php\php.exe ?i   it shows some html codes which I
 presume it is in order.

 What should I do to run my PHP files.


 Ajay K. Ratra
 Ludhiana (INDIA)
 [EMAIL PROTECTED]


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] RE: help, weird include problem with functions

2001-08-10 Thread Renze Munnik

On Fri, Aug 10, 2001 at 08:22:57AM -0400, Jaxon wrote:
 Renze,
 
 I found that it works if I pass only a variable or a path in, not both.
 
 e.g.  opendir(/path/to/foo) works
   opendir($variable) where variable contains path/to/foo also works
   opendir($somevar/some/path) does NOT work.
 
 go figure.
 
 cheers,
 jaxon


Ehhh Weird!

I really start believing that it's either the directory you use in
$somevar that's wrong, or that the permissions are wrong. I have no
troubles wse with the constructions.
It doesn't matter if I only type the path, or that I put the whole
path in one variable or that I use both a variable and a (part of)
the path. The result is exactly the same.  (as it should btw).

-- 

* RzE:

-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]