php-general Digest 19 Feb 2005 19:35:35 -0000 Issue 3295
Topics (messages 209061 through 209068):
Missing $GLOBALS SCRIPT_URI
209061 by: Gary C. New
209063 by: pete M
209066 by: Gary C. New
Re: Destroying the Session Object
209062 by: pete M
209065 by: Jason Barnett
Re: XHTML 1.1 + php sessions = :(
209064 by: Jason Barnett
problems compiling mysqli (on win32)
209067 by: M. Sokolewicz
Re: FOPEN
209068 by: Al
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
I am writing some php code that requires the $GLOBALS['SCRIPT_URI']
variable. When I access the code under its encrypted (https) location
it is available without issue. However, when I try to access the code
under its unencrypted (http) location it is not available. In fact,
phpinfo() shows that there are a lot less $GLOBALS available under the
http location than there are under the https location.
I am using Apache 1.39 with Php 4.2.3.
Your comments are greatly appreciated.
Respectfully,
Gary
--- End Message ---
--- Begin Message ---
try
$_SERVER['SCRIPT_URI'];
Gary C. New wrote:
I am writing some php code that requires the $GLOBALS['SCRIPT_URI']
variable. When I access the code under its encrypted (https) location
it is available without issue. However, when I try to access the code
under its unencrypted (http) location it is not available. In fact,
phpinfo() shows that there are a lot less $GLOBALS available under the
http location than there are under the https location.
I am using Apache 1.39 with Php 4.2.3.
Your comments are greatly appreciated.
Respectfully,
Gary
--- End Message ---
--- Begin Message ---
I am writing some php code that requires the $GLOBALS['SCRIPT_URI']
variable. When I access the code under its encrypted (https) location
it is available without issue. However, when I try to access the code
under its unencrypted (http) location it is not available. In fact,
phpinfo() shows that there are a lot less $GLOBALS available under the
http location than there are under the https location.
I am using Apache 1.39 with Php 4.2.3.
Your comments are greatly appreciated.
Respectfully,
Gary
--- End Message ---
--- Begin Message ---
here's the way I do it
logout.php
<?php
session_start();
$_SESSION = array();
session_destroy();
header('Location: login.php');
?>
Jacques wrote:
I am developing an application. When the user signs in a Session ID is
created (for argument sake: 123). I have a sign out page that has the script
session_destroy() on it. This page directs me to the sign in page. When I
sign the same or any other user in again I get the same session id (123).
However, when I close the browser window and sign in again as any member,
the session id changes.
How does this work and how can I ensure that a unique session id is
allocated to every new user that signs in?
Jacques
--- End Message ---
--- Begin Message ---
pete M wrote:
> here's the way I do it
Depends on what you're going for exactly. Based on what the OP said I
believe he'll also want to destroy the session cookie. If you want to
completely destroy the session you need the extra step that I copied and
pasted from the manual. :)
>
> logout.php
> <?php
> session_start();
> $_SESSION = array();
> session_destroy();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
> header('Location: login.php');
> ?>
>
>
> Jacques wrote:
>
>> I am developing an application. When the user signs in a Session ID is
>> created (for argument sake: 123). I have a sign out page that has the
>> script session_destroy() on it. This page directs me to the sign in
>> page. When I sign the same or any other user in again I get the same
>> session id (123).
>>
>> However, when I close the browser window and sign in again as any
>> member, the session id changes.
>>
>> How does this work and how can I ensure that a unique session id is
>> allocated to every new user that signs in?
>>
>> Jacques
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Your Name wrote:
> Thank you very much for that solution however I need something slitely
> different. This is a CMS for distribution... not everybody that's
> going to use it can go in and edit the config files. I've heard of a
> command called ini_set(); which temporarily changes it just for the
http://www.php.net/manual/en/function.ini-set.php
> script. Would you mind letting me know how to use ini_set(); with the
> use only sessions command? Thank-you very very much!
>
The "only sessions" command? Not exactly sure what you mean there.
*IF* you use sessions then there a few things that you can do to control
the way those sessions work. You should probably read the manual page:
http://www.php.net/manual/en/ref.session.php
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
whenever I try compiling PHP, the mysqli extension gives me trouble.
I've gotten this all from HEAD just a couple of hours ago (again, it
didn't work before either). I'm using MSVC 7.1 (.NET). Here's the error
I'm getting:
ext\mysqli\php_mysqli.h(50) : error C2061: syntax error : identifier
'MYSQL_STMT'
ext\mysqli\php_mysqli.h(54) : error C2059: syntax error : '}'
ext\mysqli\php_mysqli.h(93) : error C2065: 'LOCAL_INFILE_ERROR_LEN' :
undeclared identifier
ext\mysqli\php_mysqli.h(93) : error C2057: expected constant expression
ext\mysqli\php_mysqli.h(94) : error C2229: struct '__unnamed' has an
illegal zero-sized array
ext\mysqli\php_mysqli.h(127) : error C2143: syntax error : missing ')'
before '*'
ext\mysqli\php_mysqli.h(127) : error C2143: syntax error : missing '{'
before '*'
ext\mysqli\php_mysqli.h(127) : error C2059: syntax error : ')'
Since I'm no good at C, I really have no idea what the problem here
is... So, is this a problem with my compiler being stupid? or is this a
real live problem in HEAD?
hope somebody can help me with this,
- M. Sokolewicz
--- End Message ---
--- Begin Message ---
Diana Castillo wrote:
How can I read the contents of a web page that uses basic authentication?
I want to use fopen() but dont know how to do this and also send the
username and password
If the webpage is your script and it is going to check the authentication stuff,
then simply use GET arguments
fopen("http://www.example.com/path/file?user=username&pw=password", 'rb')
Then use....
$user= $_GET['user'];
$pw= $_GET['pw'];
Check the $user and $pw for validity.
If the webpage is not yours, then see if it can accept GET arguments for
authentication, look at your browser's address bar to gain accesss. That will be
your complete URL.
--- End Message ---