php-windows Digest 15 Aug 2003 02:18:01 -0000 Issue 1871

Topics (messages 21152 through 21158):

Re: Hack Q...
        21152 by: erythros

PHP/Apache installation set up problem
        21153 by: Paul Cullen
        21154 by: Dennis Lee

Re: using PHP to find out windows user name?
        21155 by: Mikey

Re: Apache web server problem
        21156 by: Mikey

Re: RegEx help needed
        21157 by: Adam Zey

email confirmation
        21158 by: Anthony Ritter

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 ---
just google it... paste that sting into google. you'll learn all about what
its trying to do and if you need to worry about it.

"Jon Phipps" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> That is the tell tale sign that either nimda or code red, I for get
> which have been scouting your system. If you run apache server dont
> worry about it as they can only opperate on IIS platforms.
>
> JON
>
> Skate wrote:
> >
> >>Is someone trying to hack my computer?
> >>
> >>  "GET /scripts/..%255c%255c../winnt/system32/cmd.exe?/c+dir"
> >>
> >>Any idea what this means?
> >>
> >
> >
>



--- End Message ---
--- Begin Message ---
I have just installed Apache on my Windows XP machine, quickly followed by
an installation of php-4.2.3. When I add the load module line to the Apache
httpd.conf file the Apache service refuses to restart and gives me an error
message saying that it is an error code 1.

The line I added to httpd.conf is:

LoadModule php4_module c:/php-4.2.3-Win32/sapi/php4apache2.dll

Has anyone any idea what may the problem may be? I would be very grateful
for some help.

Many thanks in advance,

Paul.



--- End Message ---
--- Begin Message ---
"Paul Cullen" <[EMAIL PROTECTED]> дÈëÓʼþ
news:[EMAIL PROTECTED]
> I have just installed Apache on my Windows XP machine, quickly followed by
> an installation of php-4.2.3. When I add the load module line to the
Apache
> httpd.conf file the Apache service refuses to restart and gives me an
error
> message saying that it is an error code 1.
>
> The line I added to httpd.conf is:
>
> LoadModule php4_module c:/php-4.2.3-Win32/sapi/php4apache2.dll
>
> Has anyone any idea what may the problem may be? I would be very grateful
> for some help.
>
> Many thanks in advance,
>
> Paul.
>
>

Hi Paul

try adding " AddType application/x-httpd-php .php " to your httpd.conf .

You have to copy php4ts.dll to c:/php-4.2.3-Win32/sapi .

restart apache and try again .

I hope that helps .


Dennis



--- End Message ---
--- Begin Message ---
If you are running from IIS, you can switch off anonymous access (found in
Directory Security) and then access $_SERVER['AUTH_USER'].  If you are using
Apache, I wouldn't have a clue...

HTH,

Mikey

> -----Original Message-----
> From: Chen, Mao [mailto:[EMAIL PROTECTED]
> Sent: 13 August 2003 23:25
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] using PHP to find out windows user name?
>
>
> Hi Everyone,
>
>
>
> I'm just wondering whether we can use PHP to find out the name of user
> who is currently logging on to local Windows computer and accessing a
> particular .php web page.
>
>
>
> Thanks in advance.
>
>
>
>


--- End Message ---
--- Begin Message ---
In addition to below, have you moved php4ts.dll to your windows system
directory?

> -----Original Message-----
> From: Mikey [mailto:[EMAIL PROTECTED]
> Sent: 11 August 2003 13:46
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Apache web server problem
>
>
> Have you added:
>
> AddType application/x-httpd-php .php
>
> to your httpd.conf?
>
> You will need to restart Apache after doing this for it to take effect.
>
> HTH,
>
> Mikey
>
> >===== Original Message From "Ashish Borkar" <[EMAIL PROTECTED]>
> =====
> >Hello ,
> >      I have installed Apache web server and PHP on a AIX machine.
> >I wrote a test script called test.php which had a call to
> >    phpinfo();
> >Then I added the file php to htdocs folder.
> >Then i went to a windows machine ,opened Internet Explorer and
> tried the URL
> >
> > http://192.200.8.19/test.php
> >where 192.200.8.19 is IP address of the AIX machine.
> >
> >The browser instead of showing PHPINFO  showed me a messagebox
> >      " Do you want to download the file test.php "
> >what can be the problem???
> >Regards
> >Ashish
> >
> >
> >
> >--
> >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 ---
Commenting on the replacing-numbers part, the simplest solution is probably
to do a regex replace to replace 0-9 with a blank string. This would cut the
entire search-replace to one line of code.

Regards, Adam.

"Bob Hall" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, Aug 13, 2003 at 02:48:11PM -0400, Herhuth, Ron wrote:
> > I have an array of a submitted text string (called
$submittedTextString).
> > And I have an array of common words (called $commonWordArray).
> >
> > I'm trying to use Regex to:
>
> These aren't necessarily regex problems.
>
> > 1. Remove any words from $submittedTextString that appear in
> > $commonWordArray (about a hundred words).
>
> My suggestion is to use split() or explode() to split
> $submittedTextString and put the words in an array. Then use
> array_intersection() to return an array of words in both arrays.
> Then you could either loop through the intersection array and
> use str_replace() to replace each word with the empty string, or
> you convert the intersection array to an array that maps each
> word in the array to the empty string, and use that as the map
> argument for strtr()
>
> > 2. Remove any numbers from $submittedTextString.
>
> The brute force method is to loop through 0-9, using str_replace()
> to replace each digit with the emplty string, whether the digit
> exists or not. Another approach is the search for numbers first,
> and use str_replace() only if you find something. str_replace()
> has to do a search anyway, so a seperate search is probably
> redundant, meaning the brute force method is probably faster. If
> your numbers may include non-numeric characters (e.g. decimal
> points), use [0-9]*[.]?[0-9]+([.][0-9]+)?, or something similar,
> in ereg() to return the number, and pass it to str_replace() to
> replace with the empty string.
>
> > 3. Remove any characters from $submittedTextString that aren't
> > alphabetical.
>
> Try searching for [^a-zA-Z] and apply str_replace() to anything
> you find. For non-English alphabets you may need to alter that,
> e.g. [^a-åA-Å]. I've only tried PHP regex with English, so I
> don't know.
>
> > 4. Remove any duplicate words from $submittedTextString
>
> Use split() or explode(), sort the resulting array with asort() so
> you don't change the indices, and delete any element of the array that
> matches the element immediately before. You should be able to do this
> with either a loop or with array_walk(). Resort the remaining elements
> with ksort() to put them back in their original order, and use join()
> or implode() to convert the array back to a string.
>
> I haven't tried writing any code, so you'll have to figure out the
> details yourself.
>
> Bob Hall


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003



--- End Message ---
--- Begin Message ---
Maybe someone can give me a heads up on this code.

Ideally what I am looking for is this:

The user submits their email address for registration.

Before the e-mail gets submitted to a database, if it's bogus the user does
not get an e-mail confirmation sent back to them.

However, If it's a vaild email address, the user gets an e-mail confirmation
with a link that incorporates a md5() hash of the email address for
insertion into a mySQL database.

Problems:

When I submit the form I receive an e-mail with an active link which
encompasses the complete string.

I wanted the users email address and $secret_variable to be concentated and
then passed to a md5 function call to be stored in the $confirmation_ID
variable.  That isn't happening.

Any assistance will be greatly appreciated.  Here's the code...

Thank you.
Tony Ritter
.....................................

/*the .html form which takes a name and an e-mail address */

<html>
<body>
<form action="process_a.php" method="post">
<p>
Your name:<br>
<input type="text" name="name"><br>
Your e-mail address:<br>
<input type="text" name="email"><br>
<input type="submit" name="submit" value="submit">
</body>
</form>
</html>
...............


/*process_a.php: which receives the name and email variables.  The script
then tries to then send the note back to the user with a link - called
CLICK.  When the user hits the link to email_verify.php the email address is
inserted into the database*/

<?
 $msg = "Thank you for registering $name\n\n";
 $msg .= "<a
[EMAIL PROTECTED]/email_verify.php?email=$email&confirma
tion_ID=$confirmation_ID>CLICK</a>";
 $secret_variable = "something_only_you_know";
 $confirmation_ID = md5($email.$secret_variable);
 $to="[EMAIL PROTECTED]";
 $subject="Thank you for registering";
 $mailheaders="From: Us";
 mail($to,$subject,$msg,$mailheaders);
?>
.............

// email_verify.php

<?
if ($_GET['confirmationID'] = md5($_GET['email'].$secret_variable)) {
    // insert the user into the database
} else {
  // display an error message
}
?>




--- End Message ---

Reply via email to