Re: [PHP] Share Session Vars on 2 servers

2001-08-01 Thread Paul R. Jackson

Thanks Philip, its all become clear now.

I have actually seen that user session stuff a long time ago but forgot all
about it. I really should have thought of that.

Paul
Philip Murray [EMAIL PROTECTED] wrote in message
004a01c11a48$45a34520$0300a8c0@sparlak">news:004a01c11a48$45a34520$0300a8c0@sparlak...
 Hi Paul,

 If you have a single database between the 2 servers you could implement
your
 own session handlers using PostgreSQL, Mysql or any other db for that
 matter.

 http://php.net/manual/en/function.session-set-save-handler.php


 Shouldn't be to difficult to do at all I imagine.

 Hope this helps!

  -  -- -  -   -
 Philip Murray - [EMAIL PROTECTED]
 http://www.open2view.com - Open2View.com
 - -  -- -   -

 - Original Message -
 From: Paul R. Jackson [EMAIL PROTECTED]
  I have developed a well tested password protection system using session
  vars. We have 2 web servers with half of our pages on each (for reasons
I
  wont go into). What I need to be able to do is have a single login that
  would then work on both servers. Which basically means sharing session
 vars
  on 2 servers.
 
  Yes sure I could use just straight cookies because both servers live
under
  the same main domain but I have the system already in place and I dont
 want
  to change it.
 
  I think it could be done by forcing the 2 servers to use the session
temp
  same directory with 'session.save_path' variable by using a NFS share.
But
  we would prefer not to do that. And in fact if that was the only
solution
 we
  would just do without.
 
  Is there soemthing else I can do.
 
  Paul
 
 
 




-- 
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] Share Session Vars on 2 servers

2001-07-31 Thread Paul R. Jackson

I have developed a well tested password protection system using session
vars. We have 2 web servers with half of our pages on each (for reasons I
wont go into). What I need to be able to do is have a single login that
would then work on both servers. Which basically means sharing session vars
on 2 servers.

Yes sure I could use just straight cookies because both servers live under
the same main domain but I have the system already in place and I dont want
to change it.

I think it could be done by forcing the 2 servers to use the session temp
same directory with 'session.save_path' variable by using a NFS share. But
we would prefer not to do that. And in fact if that was the only solution we
would just do without.

Is there soemthing else I can do.

Paul




-- 
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] Netscape problem with $PHP_SELF?do_something

2001-05-17 Thread Paul R. Jackson

Yeh i have noticed this before. If for example a variable (in your case
$PHP_SELF) is not set and the url just becomes ?blah... instead of
index.html?blah... (for example) ie will work fine but netscape spits the
dummy. Its one of those probs that I recognise straight away now but the
first time I was a bit puzzled.

Paul
Jaeggi David [EMAIL PROTECTED] wrote in message
D1F288E2CBFAD411B5480008C7281B9908B23A@lnminf0a">news:D1F288E2CBFAD411B5480008C7281B9908B23A@lnminf0a...
 Hello everybody!

 I have a problem that a script is not working with netscape. The script is
 shown here:

 echo a href=\$php_self?add\goto add/a;` //Link

 if ($argv[0] == add;//The Link jumps to this point of the script
 [do something]

 It's perfectly working with the internet explorer. with netscape (newest,
 4.75) it's not! does anybody know a syntax which is working with netscape?

 greets
 dave

 --
 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] Expire data from form

2001-03-18 Thread Paul R. Jackson

Sheni,

I needed to do a similar thing as this. When creating the form have a hidden
value which is the current time. The when procesing the form check the time.
If its to old just say page expired.

I found this worked fine. Hope this helps.

Paul

""Sheni R. Meledath"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I have set up a form to register the users to the site. The users are
 allowed to register only once. When the user submits the form the same
 script will check the validity of the form and displays error messages and
 if okay, updates the database.
 I want to set up an option in the form in which when the user once submits
 and after that if they click on the back button (browser back) it should
 say the 'page expired' as I have seen with some Perl scripts. The users
 should not be allowed to go back to the page and resubmit. Can any body
 suggest a way to accomplish this.

 thanks
 Sheni R Meledath
 [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] multiple post what the hey

2001-03-18 Thread Paul R. Jackson

I think its just you

I think its just you

:)

""PHPretard"" [EMAIL PROTECTED] wrote in message
000b01c0afca$8934b000$1983bc18@pixeldesire">news:000b01c0afca$8934b000$1983bc18@pixeldesire...
 Is it just me or are they like double and triple post from everyone?

 whats going on? its iritating having to delete alot of message


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


 --
 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] $REDIRECT_ERROR_NOTES

2001-03-15 Thread Paul R. Jackson

Hello,

This is my first post to the group so go easy on me.

I am using apache httpd.conf file to redirect 404 errors to a page which
basically displays and error message, amongst other things. It all works
fine but...

I want to be able to find out what the document that they attempted to
access was named, so I can display and log the value to a special log that I
am using for othger purposes.

Should the 'not found' url be in $REDIRECT_ERROR_NOTES ???

This value doesn't seem to be set. And its not in any of the HTTP_ENV_VARS
or HTTP_SERVER_VARS.

I know the answer will be something simple but I cant seem to find much help
anywhere. Any help or push in the direction of a useful web page would be
nice.

Paul



-- 
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] $REDIRECT_ERROR_NOTES

2001-03-15 Thread Paul R. Jackson

Check out REQUEST_URI - from that you can build a full URL if you need it.

The REQUEST_URI only has the URI of the error page itself (in my case
/error/404.html) I want the URI of the page that wasn't found.

A php info doesnt show the URI anywhere.

Thanks for the speedy response

Paul

At 12:08 PM 16/3/01 +1030, you wrote:
On Fri, 16 Mar 2001 12:04, Paul R. Jackson wrote:
 Hello,

 This is my first post to the group so go easy on me.

 I am using apache httpd.conf file to redirect 404 errors to a page
 which basically displays and error message, amongst other things. It
 all works fine but...

 I want to be able to find out what the document that they attempted to
 access was named, so I can display and log the value to a special log
 that I am using for othger purposes.

 Should the 'not found' url be in $REDIRECT_ERROR_NOTES ???

 This value doesn't seem to be set. And its not in any of the
 HTTP_ENV_VARS or HTTP_SERVER_VARS.

 I know the answer will be something simple but I cant seem to find much
 help anywhere. Any help or push in the direction of a useful web page
 would be nice.

 Paul

Check out REQUEST_URI - from that you can build a full URL if you need it.

--
David Robley| WEBMASTER  Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA




-- 
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] $REDIRECT_ERROR_NOTES

2001-03-15 Thread Paul R. Jackson

The htaccess option would not really be a great solution for me given we
have many diferent htacces files do lots of different things.

But I did try it just in case it lead me to some answers. I created a new
directory placed a .htaccess file in there with the correct stuff directing
404's to a test error page. The test error page has your exact code except I
dont mail I just displayed and it all worked, BUT the $URL variable as per
you last email just contains the URL of the error document.

I'm thinking maybe some settings in my php.ini file need to be different.
I'm looking into that now.

Paul


"David Robley" [EMAIL PROTECTED] wrote in message
01031612205409.01881@www">news:01031612205409.01881@www...
 On Fri, 16 Mar 2001 12:13, Paul R. Jackson wrote:
  Check out REQUEST_URI - from that you can build a full URL if you
   need it.
 
  The REQUEST_URI only has the URI of the error page itself (in my case
  /error/404.html) I want the URI of the page that wasn't found.
 
  A php info doesnt show the URI anywhere.
 
  Thanks for the speedy response
 
  Paul

 Try moving the errordocument 404 /error/404.html from your httpd.conf
 into .htaccess files.

 Here's what I use and it mails me an error message as well!

 ?php

 $admin_email = "[EMAIL PROTECTED]";
 $from = "From: [EMAIL PROTECTED]";
 $website_url = $SERVER_NAME;
 $subject = "404 Error at $REQUEST_URI";
 $URL = "http://" . getenv("HTTP_HOST");
 $URL .= ereg_replace( "[^!#-9:;=?-Z_a-z~]", "",
 substr(getenv("REQUEST_URI"), 0, 200) );

 $body = "WEBSITE--\n$website_url\n
 BAD LINK--\n$URL\n\n
 PAGE WITH BAD LINK--\n$HTTP_REFERER\n
 TYPE--\n404 File Not Found\n\n
 WHO WAS ACCESSING--\n$REMOTE_ADDR: $REMOTE_HOST\n
 USER AGENT\n$HTTP_USER_AGENT";

 mail($admin_email,$subject,$body,$from);
 ?

 titleCentre for Injury Studies - File Not Found/title
 /head
 table border="0" cellspacing="0" cellpadding="10" align="center"
 BGCOLOR="#70DBDB"
 trtd
 !-- h1 align="center"File Not Found /h1 --
 P ALIGN="CENTER"IMG SRC="/images/404.gif" WIDTH=321 HEIGHT=120/P
 pThe requested URL ?php print($URL) ? was not found on this
 server./p
 ul
 liIf you followed this link form another page on our site, it is
 possible
 that it is inaccurate or outdated. This error has been logged, and we
 will look into it right away. /li
 liIf you entered the requested URL by hand, check and make sure you
 entered it correctly. Remember, URL's are case-sensitive. Index.html
 is not equal to index.html./li
 liIf you followed a link from another web site, try contacting that
 site's webmaster and inform them that their link may be broken./li
 LIAs a result of the upgrade of our web site, some URLs have been
 changed. Try
 using the Quick Search option above or our A
 HREF="/search/search.php"Search Page/A
 to locate the document you are seeking./LI
 ?php
 if(strpos($URL, '3icipc')) {
   echo 'LI STYLE="COLOR:red"';
   }
 else {
   echo 'LI';
 }
 ?
 Program and proceedings of the 3rd International Conference on Injury
 Control and
 Prevention (3ICICP) are no longer available here./LI
 /ul
 h3 align="center"a href="?php echo $HTTP_SERVER?"Back to our main
 page./a/h3
 /TD/tr
 /table

 /html


 --
 David Robley| WEBMASTER  Mail List Admin
 RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
 AusEinet| http://auseinet.flinders.edu.au/
 Flinders University, ADELAIDE, SOUTH AUSTRALIA

 --
 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] I WORKED IT OUT Re: [PHP] $REDIRECT_ERROR_NOTES

2001-03-15 Thread Paul R. Jackson

I figured out what was going on. I knew it would be something simple
(embarrassingly simple too).

We run apache split across 2 servers so I have the error document path in
the httpd.conf as a full URL, i.e. http://www.etc...

This is what was causing it to lose all the Redirect info. When I use a
relative address for the error document it works like you would expect. I
would have expected that the HTTP_REFERER would be set when using the full
http url but its not...thems the breaks!!

Thanks for your help David and Yasuo. Maybe this will all help someone else
in the future too.

Paul



""Paul R. Jackson"" [EMAIL PROTECTED] wrote in message
98rq93$ldg$[EMAIL PROTECTED]">news:98rq93$ldg$[EMAIL PROTECTED]...
 Hello,

 This is my first post to the group so go easy on me.

 I am using apache httpd.conf file to redirect 404 errors to a page which
 basically displays and error message, amongst other things. It all works
 fine but...

 I want to be able to find out what the document that they attempted to
 access was named, so I can display and log the value to a special log that
I
 am using for othger purposes.

 Should the 'not found' url be in $REDIRECT_ERROR_NOTES ???

 This value doesn't seem to be set. And its not in any of the HTTP_ENV_VARS
 or HTTP_SERVER_VARS.

 I know the answer will be something simple but I cant seem to find much
help
 anywhere. Any help or push in the direction of a useful web page would be
 nice.

 Paul



 --
 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]