php-windows Digest 20 Aug 2002 08:57:53 -0000 Issue 1298

Topics (messages 15352 through 15360):

Redirect
        15352 by: Rodrigo San Martin
        15355 by: Jim Hunter
        15357 by: Jens Habegger

Re: My Scripts are not seeing querystring vars.
        15353 by: Saci

Re: Virtual Domain Security
        15354 by: Brian 'Bex' Huff

fopen(http:...) problems
        15356 by: Syl
        15359 by: php

Re: Apache2.0.40/php4.2.2/Win XP home
        15358 by: Andrew V. Romero
        15360 by: Stuart Hamilton

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 ---
Halo.

I need som help with my script. I need to find a way to redirect my script
to another file. I start with the login file, which is a html file, and send
variables through it to a file I call do_login. This checks if username and
password is correct. On the top of this file I have a if statement that
checks if the user has writen on the username and password box. If not, they
get sent back to the login.html by a header("location:login.html");

Now, if username and password checks out i want to sent them to the start
page. The problem is the I already have sent header information and cant use
Header() anymore.

Can someone tell me an easy way to solve this problem

Thanks...



------------------------------------------
Rodrigo San Martin
Institutt for datateknologi og informatikk

http://www.idi.ntnu.no/~rodrigo



--- End Message ---
--- Begin Message ---
If you don't want to include all of your code on one page (which is what I
would suggest that way they can not bookmark the start page and bypass your
password check), then you could create a Javascript on the page and use it
to redirect the browser. Here is a quick example:

if ($password=='correctPassword') {
  echo '<script> document.location.href="newPage.php";</script>';
}

But I would suggest including the Start page info on the same page that
gathers the password. Set a Post variable and check for it's existence on
the top of the form and if it exists then check to see if it is correct, if
it is then show the start page. if it is not then present the password
screen again. This way there is no way they can get to the start page
without entering a correct password.

Jim

-------Original Message-------

From: Rodrigo San Martin
Date: Monday, August 19, 2002 13:41:41
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect

Halo.

I need som help with my script. I need to find a way to redirect my script
to another file. I start with the login file, which is a html file, and send
variables through it to a file I call do_login. This checks if username and
password is correct. On the top of this file I have a if statement that
checks if the user has writen on the username and password box. If not, they
get sent back to the login.html by a header("location:login.html");

Now, if username and password checks out i want to sent them to the start
page. The problem is the I already have sent header information and cant use
Header() anymore.

Can someone tell me an easy way to solve this problem

Thanks...



------------------------------------------
Rodrigo San Martin
Institutt for datateknologi og informatikk

http://www.idi.ntnu.no/~rodrigo




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

.
--- End Message ---
--- Begin Message ---
G'day

This is a function I use when wanting to redirect to another page while
running a script:

--------------------------------------------------------------------------
function redirect($url) {
 echo '<script> window.location.replace (\''.($url).'\'); </script>';
}
--------------------------------------------------------------------------

or just use

--------------------------------------------------------------------------
<script> window.location.replace (\''.(www.your_url_here.com).'\');
</script>
--------------------------------------------------------------------------

hope that helped,

Jens Habegger

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--- End Message ---
--- Begin Message ---
Did you Install 4.21 or 4.22 ?

They have set globals to off.

This means that now you must use a different way to use variables

$_POST['yourvar']   or
$_GET['yourvar']


"Richard Vincent" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I recently installed PHP on my win 2000 server and it appeared to be
working
> great .. but I have recently detected one problem. It's not seeing
> querystring variable info and instatiating variables inside the script
that
> correspond to the querystring....
>
> Any ideas .. Please help.
>
> Richard Vincent
>
>


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

Fear not... you can easily do this with virtual domains in Apache:

<VirtualHost bla.bla.bla.bla>
   ServerName blabla
   DocumentRoot /web/site1
   php_admin_value open_basedir /web/site1
</VirtualHost>

You might also wish to disable the functions 'ini_alter' and 'ini_set' 
so admins cant be too naughty...

-- 

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424

> I would like to run virtual domains, but how do I secure them so those 
> admins will not be able to access the rest of the files on my system...?
> 
> If anyone has had experince with this it would be greatly appreciated...
> 


--- End Message ---
--- Begin Message ---
When I use fopen(http:...) I do not get the latest version of the web page
want to extract some content from. This page is updated at the source once
an hour. How can I issue the equivalent of a Ctrl-F5 to refresh the cache?

Syl

--- End Message ---
--- Begin Message ---
Why don't you try chmoding the file 777.
Next use readfile:
http://www.php.net/manual/en/function.readfile.php


--- End Message ---
--- Begin Message ---
I just got apache2 and php set up on winXP home after 2 two weeks of 
playing with it.  First, take out the addtype application line, you 
don't need this line appartently for apache 2.  See if that fixes the 
problem.
-Andrew V. Romero

Stuart Hamilton wrote:
> I have read lots of info about this problem on the news group however it 
> has not solved my problem!
> 
> I am trying to get PHP 4.2.2 to load up on Apache 2.0.40 as a module but 
> it just ain't working.  I follow the instructions and add the following 
> lines to the http.conf file:-
> 
>        LoadModule php4_module c:/php/sapi/php4apache2.dll
>        AddType application/x-httpd-php .php .phtml
> 
> But when I try and start the server from a command prompt I get the 
> following error:-
> 
>        Syntax error on line 174 of C:/Program Files/Apache 
> Group/Apache2/conf/httpd.conf:
>        Cannot load C:/php/sapi/php4apache2.dll into server: The 
> specified procedure could not be found.
> 
> I have moved the .dll file to the modules directory of the server and 
> still no luck in starting.
> 
> HOWEVER, if I set up apache to load PHP as CGI/BIN the server starts and 
> I can display info through the phpinfo cmd.
> 
> Is there someting I am doing wrong or is there a bug in the system.
> 
> Stewieh
> NZ
> 

--- End Message ---
--- Begin Message ---
Andrew, Thanks for the info.

I managed to get apache to work with a php module after downloading the 
following file and extracting the php4apache2.dll to the sapi dir.

http://snaps.php.net/win32/php4-win32-latest.zip

Check out the latest version 7? of the php manual it has a lot of 
usefull links from other users.  Thats we I found the link.

Stuart


Andrew V. Romero wrote:

> I just got apache2 and php set up on winXP home after 2 two weeks of 
> playing with it.  First, take out the addtype application line, you 
> don't need this line appartently for apache 2.  See if that fixes the 
> problem.
> -Andrew V. Romero
>
> Stuart Hamilton wrote:
>
>> I have read lots of info about this problem on the news group however 
>> it has not solved my problem!
>>
>> I am trying to get PHP 4.2.2 to load up on Apache 2.0.40 as a module 
>> but it just ain't working.  I follow the instructions and add the 
>> following lines to the http.conf file:-
>>
>>        LoadModule php4_module c:/php/sapi/php4apache2.dll
>>        AddType application/x-httpd-php .php .phtml
>>
>> But when I try and start the server from a command prompt I get the 
>> following error:-
>>
>>        Syntax error on line 174 of C:/Program Files/Apache 
>> Group/Apache2/conf/httpd.conf:
>>        Cannot load C:/php/sapi/php4apache2.dll into server: The 
>> specified procedure could not be found.
>>
>> I have moved the .dll file to the modules directory of the server and 
>> still no luck in starting.
>>
>> HOWEVER, if I set up apache to load PHP as CGI/BIN the server starts 
>> and I can display info through the phpinfo cmd.
>>
>> Is there someting I am doing wrong or is there a bug in the system.
>>
>> Stewieh
>> NZ
>>
>
>
>
>
>

--- End Message ---

Reply via email to