php-general Digest 20 Feb 2005 09:44:38 -0000 Issue 3296

Topics (messages 209069 through 209076):

Re: XHTML 1.1  +  php sessions  =  :(
        209069 by: Christian
        209070 by: b1nary Developement Team
        209071 by: Jason Barnett
        209076 by: b1nary Developement Team

Re: FOPEN
        209072 by: Rasmus Lerdorf

Re: Missing $GLOBALS SCRIPT_URI
        209073 by: Gary C. New

Re: Code Analyzer Needed ..can somebody suggest ?
        209074 by: Zareef Ahmed

Re: MySQL and MySQLi compiling
        209075 by: Chris

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 ---
Your Name schrieb:

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 script. Would you mind letting me know how to use ini_set(); with the use only sessions command? Thank-you very very much!


Sure... you might use
   ini_set("url_rewriter.tags","");

But http://php.net/ini_set would have helped you solving the problem yourself too... :)))

On Wed, 2005-02-16 at 19:07, b1nary Developement Team wrote:


Hi there guys... First time caller here ;).

I'm currently developing a content management system. One of it's features is that it's going to be completely standards compliant

(XHTML

1.1).

I'm having some troubles however, and they come in the form of sessions. When I use session_start(), it throws the PHPSESSID

into the

URL of all of my links and form actions and what not. This is a

problem

because in my forms it throws in a hidden input, which doesn't

validate

right, plus they don't use & insteand of just &. Is there any

way

to stop a session from being passed through the URL?



Sure enable session.use_only_cookies in php.cfg and cookies will be
used. nothing in the page sent to the browser at all as far as I

know.


http://us4.php.net/session

Bret


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


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









--- End Message ---
--- Begin Message --- Oh I'm sorry, that was just a typo, I meant the "use only cookies" one... god I'm an idiot, thank-you.

Jason Barnett wrote:

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




--- End Message ---
--- Begin Message ---
b1nary Developement Team wrote:
> Oh I'm sorry, that was just a typo, I meant the "use only cookies"
> one... god I'm an idiot, thank-you.
> 

Not an idiot... we all had to learn it once.  And some of us a few times
more than that!

You're welcome.

Jason

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Jason Barnett wrote:

Not an idiot... we all had to learn it once.  And some of us a few times
more than that!

You're welcome.

Jason


Okay, back to business... Here's what I've got in the method that goes at the top of the page

   *function headers() {*

       *header("Content-type: text/html; charset=utf-8");*
       *ini_set("session.name","b1naryses");*
       *ini_set("session.use_only_cookies","1");*
       *session_start();*

   *}*

I know I have the ini_set(); syntax correct because it succesfully changes the session name from PHPSESSID to b1naryses, however when I go to validate it, the session ID is still being passed through the URL. I read a whole bunch of stuff on php.net about sessions and ini_set(), however I can't really find anything to solve this. Is it possible that some setting on my host's server is causing this?
--- End Message ---
--- Begin Message --- Al wrote:
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.

The syntax for basic auth is actually:

  http://user:[EMAIL PROTECTED]

-Rasmus
--- End Message ---
--- Begin Message ---
It turns out that SCRIPT_URI is a mod_rewrite global.

I simply had to turn the RewriteEngine On under the unencrypted (http) location and it worked perfectly.

Thank you for the suggestions.

Respectfully,


Gary


pete M wrote:
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 ---
Hi Ramya,

Try Zend Studio from zend.com

zareef ahmed



On Fri, 18 Feb 2005 22:22:34 +0530, Ramya Ramaswamy <[EMAIL PROTECTED]> wrote:
> Hey people,
> 
> Am in the look out for a code analyzer for PHP...can somebody help me
> out with that?Please...
> 
> Many Thankx
> Ramya
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

--- End Message ---
--- Begin Message --- Thanks for all the help, I managed to get it working, though I'm not quite sure the reasoning behind it. I used some info I got off of http://bugs.php.net/bug.php?id=29860 to do it.

I posted my particular resolution to the bug report. It seems to me that *something* isn't right

Chris
--- End Message ---

Reply via email to