php-windows Digest 25 Jun 2002 14:52:37 -0000 Issue 1210

Topics (messages 14385 through 14396):

Re: PHP and Cookies
        14385 by: Egil Helland

Re: Get/Post and Security Issues
        14386 by: Mikey
        14387 by: Brian Graham

Re: Installing PHP for Apache on Windows XP
        14388 by: Dave
        14389 by: Dash McElroy

Implement Javascript into vB code
        14390 by: Mike
        14391 by: Matt Parlane
        14392 by: Peter
        14393 by: Mike
        14394 by: Matt Parlane
        14395 by: Peter

PHP with IIS 5.0
        14396 by: Alfred

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 ---
Try phpbuilder.com, search for cookies

On Monday, June 24, 2002, at 09:26 PM, James Meers wrote:

> Hi,
>
>              Does anyone know any good PHP reference/learning sites for 
> understanding how to use Cookies with PHP?
>
> Cheers
>
> Jambo
>
--
egil helland / it consultant (mcse, web technology)
web: ikon.as / egil.net

--- End Message ---
--- Begin Message ---
Are those line breaks as they would appear in the function?  I have always
thought it best not to split tags over line breaks... just a thought...

Mikey

> -----Original Message-----
> From: Brian Graham [mailto:[EMAIL PROTECTED]]
> Sent: 24 June 2002 20:01
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Get/Post and Security Issues
>
>
> Here it is. Please note that all of this output from a function; if you
> would like the PHP code that outputs this, please just ask.
>
>
> <form
>         action=<?=$_SERVER["PHP_SELF"]?>
>         method=post
>         name="login"
>       >
>     <tr>
>       <td>
>    <center>
>         <!-- .:Login Table - Name & Pass:. --!>
>        <table>
>          <tr>
>     <td>
>       <span class=text>Name:
>     </td>
>     <td>
>       <input
>         type=text
>         size=10
>         name=usern
>       >
>     </td>
>          </tr>
>          <tr>
>     <td>
>       <span class=text>Pass:
>     </td>
>     <td>
>       <input
>         type=password
>         size=10
>         name=userp
>       >
>     </td>
>          </tr>
>          <tr>
>     <td colspan=2><center>
>       <input
>         type=submit
>         value="Login"
>         class="submit"
>         name="login"
>         onsubmit="document.login.login.disabled='true'"
>       ></center>
>     </td>
>          </tr>
>          </form>
>
> And there we are!
>
> "Mikey" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Can you send a copy of the HTML form that posts to your function?
> >
> > > -----Original Message-----
> > > From: Brian Graham [mailto:[EMAIL PROTECTED]]
> > > Sent: 24 June 2002 08:27
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-WIN] Get/Post and Security Issues
> > >
> > >
> > > Apache 1.3.26
> > > PHP 4.2.1
> > >
> > > When I enter username and password information onto a page, it
> > > uses Get and
> > > puts the session ID along with the username and the password into the
> URL,
> > > despite my saying "method=post" in the form attributes.
> > >
> > > This seems like it would be a common problem, but my research
> > > isn't bringing
> > > up anything even remotely about it.
> > >
> > > I've done very, very little tweaking to my php.ini and httpd.conf to
> give
> > > you an idea of what defaults are in place still. Here is the
> > > function code:
> > >
> > > function user_login() {
> > >  global $usern;
> > >  global $userp;
> > >  global $feedback;
> > >  global $loginswitch;
> > >  if (!isSet($usern) && !isSet($userp))
> > >   return FALSE;
> > >  if ($usern == '' or $userp == '') {
> > >   $loginswitch = FALSE;
> > >   $feedback = "Username and/or password is missing.";
> > >   return FALSE;
> > >  }
> > >  $uname = strtolower($usern);
> > >  $query = "SELECT user_name, user_pass, user_isconfirmed
> > >     FROM user
> > >     WHERE user_name = '$usern'
> > >     AND user_pass = '$userp'";
> > >  $results = mysql_query($query) or die(mysql_error());
> > >  $row = mysql_fetch_row($results);
> > >  if ($usern == $row[0] && $userp == $row[1]) {
> > >   $_SESSION['loginswitch'] = TRUE;
> > >   $_SESSION['username'] = $usern;
> > >   $feedback = "You are now logged in.";
> > >   return TRUE;
> > >  }
> > >  else {
> > >   $_SESSION['loginswitch'] = FALSE;
> > >   $feedback = "Username of password are incorrect.";
> > >   return FALSE;
> > >  }
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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 ---
--- Begin Message ---
Yes, as they appear in the function; however, I don't have any PHP newline
characters. Output to the browser is separated by a series of tabs and
spaces, not line breaks.
"Mikey" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Are those line breaks as they would appear in the function?  I have always
> thought it best not to split tags over line breaks... just a thought...
>
> Mikey
>
> > -----Original Message-----
> > From: Brian Graham [mailto:[EMAIL PROTECTED]]
> > Sent: 24 June 2002 20:01
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] Get/Post and Security Issues
> >
> >
> > Here it is. Please note that all of this output from a function; if you
> > would like the PHP code that outputs this, please just ask.
> >
> >
> > <form
> >         action=<?=$_SERVER["PHP_SELF"]?>
> >         method=post
> >         name="login"
> >       >
> >     <tr>
> >       <td>
> >    <center>
> >         <!-- .:Login Table - Name & Pass:. --!>
> >        <table>
> >          <tr>
> >     <td>
> >       <span class=text>Name:
> >     </td>
> >     <td>
> >       <input
> >         type=text
> >         size=10
> >         name=usern
> >       >
> >     </td>
> >          </tr>
> >          <tr>
> >     <td>
> >       <span class=text>Pass:
> >     </td>
> >     <td>
> >       <input
> >         type=password
> >         size=10
> >         name=userp
> >       >
> >     </td>
> >          </tr>
> >          <tr>
> >     <td colspan=2><center>
> >       <input
> >         type=submit
> >         value="Login"
> >         class="submit"
> >         name="login"
> >         onsubmit="document.login.login.disabled='true'"
> >       ></center>
> >     </td>
> >          </tr>
> >          </form>
> >
> > And there we are!
> >
> > "Mikey" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Can you send a copy of the HTML form that posts to your function?
> > >
> > > > -----Original Message-----
> > > > From: Brian Graham [mailto:[EMAIL PROTECTED]]
> > > > Sent: 24 June 2002 08:27
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP-WIN] Get/Post and Security Issues
> > > >
> > > >
> > > > Apache 1.3.26
> > > > PHP 4.2.1
> > > >
> > > > When I enter username and password information onto a page, it
> > > > uses Get and
> > > > puts the session ID along with the username and the password into
the
> > URL,
> > > > despite my saying "method=post" in the form attributes.
> > > >
> > > > This seems like it would be a common problem, but my research
> > > > isn't bringing
> > > > up anything even remotely about it.
> > > >
> > > > I've done very, very little tweaking to my php.ini and httpd.conf to
> > give
> > > > you an idea of what defaults are in place still. Here is the
> > > > function code:
> > > >
> > > > function user_login() {
> > > >  global $usern;
> > > >  global $userp;
> > > >  global $feedback;
> > > >  global $loginswitch;
> > > >  if (!isSet($usern) && !isSet($userp))
> > > >   return FALSE;
> > > >  if ($usern == '' or $userp == '') {
> > > >   $loginswitch = FALSE;
> > > >   $feedback = "Username and/or password is missing.";
> > > >   return FALSE;
> > > >  }
> > > >  $uname = strtolower($usern);
> > > >  $query = "SELECT user_name, user_pass, user_isconfirmed
> > > >     FROM user
> > > >     WHERE user_name = '$usern'
> > > >     AND user_pass = '$userp'";
> > > >  $results = mysql_query($query) or die(mysql_error());
> > > >  $row = mysql_fetch_row($results);
> > > >  if ($usern == $row[0] && $userp == $row[1]) {
> > > >   $_SESSION['loginswitch'] = TRUE;
> > > >   $_SESSION['username'] = $usern;
> > > >   $feedback = "You are now logged in.";
> > > >   return TRUE;
> > > >  }
> > > >  else {
> > > >   $_SESSION['loginswitch'] = FALSE;
> > > >   $feedback = "Username of password are incorrect.";
> > > >   return FALSE;
> > > >  }
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 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 ---
--- Begin Message ---
Hi.  Thank you for the Help.

I did download the new PHP4apache2.dll and then unmarked the Load Module for
that, and Apache started!  This is a step forward.  But still when I try to
pull up http://localhost/phpinfo.php  I come up with an OBJECT NOT FOUND.
404 ERROR.

Any Ideas???

Thank you again,

Dave



"Steve Parrish" <[EMAIL PROTECTED]> wrote in message
news:p05100301b93be18f57b7@[66.136.32.169]...
> At 7:18 AM -0700 6/23/02, Dave wrote:
> >I have been trying to install PHP for Apache on WinXP.  I have added all
of
> >the necessary lines to the Apache Config file, although when i try to add
> >
> >LoadModule php4_module c:/php4/sapi/php4apache2.dll
> >
> >Apache wont restart.
> >
> >I copied all of the PHP .ini and .dll files into the appropriate
> >directories, but I just wont work.
> >
> >You think they would have made it a little more compatible, even the PHP
> >installer doesnt work properly.
> >
> >Can anyone help?
> >
>
> Are you running Apache 2.0.39? What is the error? It helps to share
> this info when seeking assistance.  :)
>
> I'll guess that you need an updated php4apache2.dll.
>
> You can get a replacement php4apache2.dll here:
> <http://ftp.proventum.net/pub/php/win32/php4.2.x-apache2.zip>
>
> That worked for me. Thanks to Matt Parlane, who recently posted a
> message with this info.
>
> HIH,
>
> Steve Parrish
> --
> <mailto:[EMAIL PROTECTED]>


--- End Message ---
--- Begin Message ---
You have to create a phpinfo.php file in your htdocs directory first. Fill
it out with this:

  <?php
  phpinfo();
  ?>

and test it.

-Dash
-----Original Message-----
From: Dave [mailto:[EMAIL PROTECTED]] 
Sent: Monday, June 24, 2002 3:29 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Installing PHP for Apache on Windows XP


Hi.  Thank you for the Help.

I did download the new PHP4apache2.dll and then unmarked the Load Module for
that, and Apache started!  This is a step forward.  But still when I try to
pull up http://localhost/phpinfo.php  I come up with an OBJECT NOT FOUND.
404 ERROR.

Any Ideas???

Thank you again,

Dave



"Steve Parrish" <[EMAIL PROTECTED]> wrote in message
news:p05100301b93be18f57b7@[66.136.32.169]...
> At 7:18 AM -0700 6/23/02, Dave wrote:
> >I have been trying to install PHP for Apache on WinXP.  I have added all
of
> >the necessary lines to the Apache Config file, although when i try to add
> >
> >LoadModule php4_module c:/php4/sapi/php4apache2.dll
> >
> >Apache wont restart.
> >
> >I copied all of the PHP .ini and .dll files into the appropriate
> >directories, but I just wont work.
> >
> >You think they would have made it a little more compatible, even the PHP
> >installer doesnt work properly.
> >
> >Can anyone help?
> >
>
> Are you running Apache 2.0.39? What is the error? It helps to share
> this info when seeking assistance.  :)
>
> I'll guess that you need an updated php4apache2.dll.
>
> You can get a replacement php4apache2.dll here:
> <http://ftp.proventum.net/pub/php/win32/php4.2.x-apache2.zip>
>
> That worked for me. Thanks to Matt Parlane, who recently posted a
> message with this info.
>
> HIH,
>
> Steve Parrish
> --
> <mailto:[EMAIL PROTECTED]>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How would I implement Javascript into a vB code?


--- End Message ---
--- Begin Message ---
errm...  this really isn't the right place to be asking this question - this
is a PHP list.

but - if you're talking about using JScript and VBScript in the same ASP
page, you can do it by using this:
<%
' VBScript code goes here
Response.Write DoSomething("To Me")
%>
<script language="JavaScript" runat="Server">
function DoSomething(str){
    return str;
}
</script>

I think that's how it goes anyway....

Matt


"Mike" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How would I implement Javascript into a vB code?
>
>


--- End Message ---
--- Begin Message ---
dunno this is PHP list not VB :)
try asking a VB list

mmmmmmmmmmmmmmm VicBitter mmmmmmmmmmmmmmmmmm

-----Original Message-----
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 25 June 2002 3:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Implement Javascript into vB code


How would I implement Javascript into a vB code?



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

--- End Message ---
--- Begin Message ---
Sorry guys, let me rephrase my question.

I want to insert some javascript code into the code for my forum (vB) not as
a post, but as a forum post, but as code within the php file.

Sorry about the confusion


"Mike" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How would I implement Javascript into a vB code?
>
>


--- End Message ---
--- Begin Message ---
hmmm...

that's slightly better - in that you used more than one line to explain your
problem.
I'm still having trouble figuring out what you want to do though - try
explaining problems a bit clearer next time.

If you want to be able to use <script> tags in forum posts, then just go
ahead and get rid of all checking you're doing on user input.
Of course, I'd strongly advise against letting anyone just enter random
HTML - you must remember that the majority of people visiting your site will
be using IE >= 5, therefor they will be able to run client-side VBScript -
which can do much nastier things than JavaScript can.

perhaps a good idea would be to implement a system where trusted users (ie
those who have been members for X months, or those with more than Y form
posts) can enter HTML code directly, all others get the strip_tags()
treatment.

You should _always_ _at least_ run mysql_escape_string() or equivalent on
_any_ text you enter into your database which has been entered by a user.

If that's not what you're talking about, then perhaps come back with a bit
more information.

Thanks,

Matt

"Mike" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Sorry guys, let me rephrase my question.
>
> I want to insert some javascript code into the code for my forum (vB) not
as
> a post, but as a forum post, but as code within the php file.
>
> Sorry about the confusion
>
>
> "Mike" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > How would I implement Javascript into a vB code?
> >
> >
>
>


--- End Message ---
--- Begin Message ---
in that case wouldn't u just go 

<?

some php tricks
?>
<script=Javascript>
some javascript tricks
</script> ?

-----Original Message-----
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 25 June 2002 4:13 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Implement Javascript into vB code


Sorry guys, let me rephrase my question.

I want to insert some javascript code into the code for my forum (vB) not as
a post, but as a forum post, but as code within the php file.

Sorry about the confusion


"Mike" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How would I implement Javascript into a vB code?
>
>



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

--- End Message ---
--- Begin Message ---
Hello,
I hope someone can help me.
I have installed the binarys of php on my w2k server, and it seems to work
fine.
When i open a file where i have only ask with phpinfo() there is a good
response.
When i refresh the page some times it comes with a internal server error
(500)
when i look in the event log there is a WAM error that with event id 204
that the http server encountered an unhandled exception while processing the
ISAPI Application ' php4ts!zend_strndup + 0x2B + 0xA05CB1AD'
And then I have to restart the server


--- End Message ---

Reply via email to