php-windows Digest 5 Dec 2002 08:04:55 -0000 Issue 1471

Topics (messages 17270 through 17280):

Re: ini function like ini_set and ini_alter
        17270 by: Christoph Grottolo
        17280 by: Franco Pozzer

Re: checking if is FORM is POSTED
        17271 by: Brinkman, Theodore

Re: trouble with update from php 3 to php 4.2.3
        17272 by: Christoph Grottolo

Re: Session Variables
        17273 by: Christoph Grottolo

Re: Fast Web server
        17274 by: Cam Dunstan

PHP sessions in Windows
        17275 by: Juan Rosero

mystery line
        17276 by: jpirtle
        17277 by: Leon
        17278 by: freeman
        17279 by: Dash McElroy

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 ---
Franco Pozzer wrote:
> Thanks for all.
>
> My end it is Apache 1.3.27 and PHP 4.3.2 in Win32 system NT 4.0.
>
> I have the php.ini auto_prepend_file  like this:
> auto_prepend_file="C:\OPENFEDRA\Apache\htdocs\fedra\sv\cfg\"
>
> All work fine with this configuration of the php.ini.
>
> For same reason I must to do not configure php.ini and the directives
> auto_prepend_file must be null like auto_prepend_file =.
>
> I have discovered ini_alter function but I do not be able to work in
> my application.

No, you can't change auto_prepend_file with ini_alter, because the file you
want to prepend should be read before your script, that is, before you call
ini_alter...

Christoph


--- End Message ---
--- Begin Message ---
Thanks Christoph, for the response.

I try to d interpreting what you write to me and hope to make it in the correct
way.

My  file that I like auto_prepend it is under Document_Root of the web_server
Apache in the path like this:
C:\OPENFEDRA\apache\htdocs\sv\cfg\systemVariables.php.

Well. The PHP worh in the Apache as CGI and php.ini are load with any execution
of the script PHP.

Before using the function ini_alter() in script PHP I would have to read the
files systemVariables?

I have made a test in order to see if other directives of php.ini can
dynamically be modified from script always with the function ini_alter() or
ini_set().

I have tried to change the session_path_file directive and are successful to
make this thing.

Of this they are not sure but I have one what little clear one that regards
that some directives of PHP cannot be modified from system the Win32.

The reason of this I have not clearly and I do not  know it.

I hope to have written in clear way and I ask you the courtesy for dirmi if you
there it is  a way in order to resolve the thing.

I have tried to use also the directives of Apache creating a file .htaccess
that he contains the directive of php.ini like this:
php_value auto_prepend_file
"C:/OPENFEDRA/Apache/htdocs/fedra/sv/cfg/systemVariables.php"  and without
modify my script PHP.

But I have not understood where to put these rows and then putting the
directive of Apache AllowOverride to the All value I have a InternalServer
error.

Also on this you can help me?

Ciao e grazie Franco.



Christoph Grottolo wrote:

> Franco Pozzer wrote:
> > Thanks for all.
> >
> > My end it is Apache 1.3.27 and PHP 4.3.2 in Win32 system NT 4.0.
> >
> > I have the php.ini auto_prepend_file  like this:
> > auto_prepend_file="C:\OPENFEDRA\Apache\htdocs\fedra\sv\cfg\"
> >
> > All work fine with this configuration of the php.ini.
> >
> > For same reason I must to do not configure php.ini and the directives
> > auto_prepend_file must be null like auto_prepend_file =.
> >
> > I have discovered ini_alter function but I do not be able to work in
> > my application.
>
> No, you can't change auto_prepend_file with ini_alter, because the file you
> want to prepend should be read before your script, that is, before you call
> ini_alter...
>
> Christoph
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Better (though still theoretically spoofable) would be to include a random
number/string in a hidden field, store that number in the session, and check
to see that the number returned in the form is the same as what is expected
for that session.  It's theoretically possible that someone could hijack the
session and return a forged page with the correct id, but it still ought to
be better than $HTTP_REFERER which can be easily spoofed once the 'attacker'
knows what is expected to be returned.

I've used a variant on this theme to provide a reasonably secure login to a
web application without using SSL.  Store passwords as md5 hashes in db.
Send random number along with login.  md5 the user's password client-side,
then hash that + the number and return that as the password variable (no
plaintext password over the network).  On the server side, md5 the hashed
password from the database + the random number stored in the session.
Compare this value with the returned value & if they match you've got a
successful login.

        - Theo

-----Original Message-----
From: André Pasold [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 11:12 AM
To: [EMAIL PROTECTED]
Subject: Re: checking if is FORM is POSTED


The variable $HTTP_REFERER will tell you the origin of the request.

So you can check it with:

if (EREG('xxx.php$',$HTTP_REFERER)) { //only look for the name file
    //process data
}

------ or -------

if ($HTTP_REFERER=='www.yyy.com/path/xxx.php') { //look for the entire url
    //process data
}

*** where xxx.php is the url of the form source

Hope it can help you any way.


"Matt Babineau" <[EMAIL PROTECTED]> escreveu na mensagem
000d01c29af0$77e6d400$0210a8c0@webdevx">news:000d01c29af0$77e6d400$0210a8c0@webdevx...
> What  is the best way to check if a form is posted so  people can't post
> to my forms? I want to make sure that the post is coming from the right
> page and that it is indeed a post operation.
>
> Thx,
> Matt
>


--- End Message ---
--- Begin Message ---
Omar wrote:
> I updated php from version 3 to 4.2.3 on a win NT 4 server (with iss
> 4). Everything went ok, but the include() function.
> I have problems when including files.
> I tried to specify a directory in the php.ini file but it still
> didn't work. This is how i have the include line:
> include ('file.inc');

Are you shure the correct php.ini is read by php? Try to find out with
phpinfo(). Delete all other php.ini files on your system or rename them.

Christoph




--- End Message ---
--- Begin Message ---
Jed R. Brubaker wrote:
> I am having a problem with a simple script that uses session
> variables. It is a user authentication script and none of my users
> have had any problems with the exception of one individual. The
> session variables simply don't carry over. I am half convinced that
> it is user error, but have any of you run across a problem like this?
> He is running MSN8 on WXP.
>
> Thanks!

Read http://bugs.php.net/bug.php?id=20449 and vote for it!

Christoph


--- End Message ---
--- Begin Message ---
go to http://www.apache.org Rado Rad rasho matie, half the world runs on it,
you`ll never use IIS again.



----- Original Message -----
From: "Radovan Radic" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 7:05 AM
Subject: [PHP-WIN] Fast Web server


> Hi
>
> Can you tell me your experiences about web servers.
> I need fast web server which runs on Win2000,  compatible with PHP (i mean
> that php works without problems) and is not IIS
>
> Thx
> Radovan
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hello,
I've been trying to run a PHP program called PHPList 1.9.3 available at
http://www.phplist.com/files/. The program does not seem to retain it's
sessions when running on a Windows environment.
The program runs well on my Mac OS X 10.2 "Jaguar".

Here is the info on my Windows machine:
Windows XP with Service Pack 3
Apache 2.0.43
PHP 4.3 RC2 (module)
mySQL 3.23.x

Can anyone give a hint of what's going on?

Thanks in advance.

geo


--- End Message ---
--- Begin Message ---
Please help:

I'm working through PHP Fast & Easy Web Development tutorial book by Julie
C. Meloni.  It's pretty good.  But I've fat-fingered in a script
(Alllinone_form.php) and I get the following error.

Parse error: parse error in c:\program files\apache
group\apache\htdocs\testing\allinone_form.php on line 70

The script has exactly 69 lines.  There is not a line 70.  If I add a junk
line and try again the error reports on line 71 when there are only 70
lines.  If I shorten the script by two or three lines the same error occurs,
just at the last line plus one.

Platform = Win 98 SE, Server = Apache 1.3x, PHP = 4.2x, Browser = Mozilla,
MSIE 5.5, Netscape, and Opera.  I'm using CONTEXT as the editor (Great
Tool!) with the line numbering turned on, so I'm sure about the line count.

Anybody every see anything like this?

God bless us everyone.


--- End Message ---
--- Begin Message ---
Hi

This is probably something very simple like a missing '}'. Check that all
functions are closed! You could even do a count on the '}' character and check
that it returns an even no. though this is not fool-proof.

Cheers

jpirtle wrote:

> Please help:
>
> I'm working through PHP Fast & Easy Web Development tutorial book by Julie
> C. Meloni.  It's pretty good.  But I've fat-fingered in a script
> (Alllinone_form.php) and I get the following error.
>
> Parse error: parse error in c:\program files\apache
> group\apache\htdocs\testing\allinone_form.php on line 70
>
> The script has exactly 69 lines.  There is not a line 70.  If I add a junk
> line and try again the error reports on line 71 when there are only 70
> lines.  If I shorten the script by two or three lines the same error occurs,
> just at the last line plus one.
>
> Platform = Win 98 SE, Server = Apache 1.3x, PHP = 4.2x, Browser = Mozilla,
> MSIE 5.5, Netscape, and Opera.  I'm using CONTEXT as the editor (Great
> Tool!) with the line numbering turned on, so I'm sure about the line count.
>
> Anybody every see anything like this?
>
> God bless us everyone.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--
Leon Jansen van Nieuwenhuizen
Personal Computing Services
Information & Communication Technology Services
University of Cape Town
Email: [EMAIL PROTECTED]
__________________________
__________________________


--- End Message ---
--- Begin Message ---
Can anyone tell me how to make a script return to the prviose page.
like say im doing a insert then i want it to auto return to the previose
page?
----- Original Message -----
From: jpirtle <[EMAIL PROTECTED]>
To: PHP Windows Help List <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 11:36 PM
Subject: [PHP-WIN] mystery line


> Please help:
>
> I'm working through PHP Fast & Easy Web Development tutorial book by Julie
> C. Meloni.  It's pretty good.  But I've fat-fingered in a script
> (Alllinone_form.php) and I get the following error.
>
> Parse error: parse error in c:\program files\apache
> group\apache\htdocs\testing\allinone_form.php on line 70
>
> The script has exactly 69 lines.  There is not a line 70.  If I add a junk
> line and try again the error reports on line 71 when there are only 70
> lines.  If I shorten the script by two or three lines the same error
occurs,
> just at the last line plus one.
>
> Platform = Win 98 SE, Server = Apache 1.3x, PHP = 4.2x, Browser = Mozilla,
> MSIE 5.5, Netscape, and Opera.  I'm using CONTEXT as the editor (Great
> Tool!) with the line numbering turned on, so I'm sure about the line
count.
>
> Anybody every see anything like this?
>
> God bless us everyone.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Here's what I do:

Page1.php submits info to page2.php.

In page2.php:

<?php
//process form krud here
header("Location: page1.php");
exit;
?>

Viola.

-Dash

-----Original Message-----
From: freeman [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 15, 2002 12:56 AM
To: PHP Windows Help List
Subject: Re: [PHP-WIN] mystery line


Can anyone tell me how to make a script return to the prviose page. like say
im doing a insert then i want it to auto return to the previose page?
----- Original Message -----
From: jpirtle <[EMAIL PROTECTED]>
To: PHP Windows Help List <[EMAIL PROTECTED]>
Sent: Wednesday, December 04, 2002 11:36 PM
Subject: [PHP-WIN] mystery line


> Please help:
>
> I'm working through PHP Fast & Easy Web Development tutorial book by 
> Julie C. Meloni.  It's pretty good.  But I've fat-fingered in a script
> (Alllinone_form.php) and I get the following error.
>
> Parse error: parse error in c:\program files\apache 
> group\apache\htdocs\testing\allinone_form.php on line 70
>
> The script has exactly 69 lines.  There is not a line 70.  If I add a 
> junk line and try again the error reports on line 71 when there are 
> only 70 lines.  If I shorten the script by two or three lines the same 
> error
occurs,
> just at the last line plus one.
>
> Platform = Win 98 SE, Server = Apache 1.3x, PHP = 4.2x, Browser = 
> Mozilla, MSIE 5.5, Netscape, and Opera.  I'm using CONTEXT as the 
> editor (Great
> Tool!) with the line numbering turned on, so I'm sure about the line
count.
>
> Anybody every see anything like this?
>
> God bless us everyone.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to