php-general Digest 4 Jul 2004 04:13:11 -0000 Issue 2856

Topics (messages 189628 through 189656):

Re: PHP Bug ?
        189628 by: Curt Zirzow
        189629 by: John W. Holmes

Handling MySQL errors
        189630 by: Shaun
        189632 by: John W. Holmes

PHP doesnt work!
        189631 by: Gmo Baez
        189656 by: Jason Barnett

connection parameters to db's
        189633 by: Dennis Gearon
        189636 by: John W. Holmes

Re: frames compatibility
        189634 by: raditha dissanayake

MySQL Results Not Being Commited To Database
        189635 by: Harlequin
        189637 by: Torsten Roehr
        189638 by: John W. Holmes
        189642 by: Harlequin

Re: MySQL Results Not Being Committed To Database
        189639 by: Torsten Roehr
        189640 by: John W. Holmes
        189641 by: Torsten Roehr

Problem with strcasecmp() function
        189643 by: Rosen
        189644 by: Scot L. Harris
        189645 by: Rosen
        189646 by: Scot L. Harris
        189647 by: Rosen

Sending Mail Using PHP & MySQL
        189648 by: Harlequin
        189649 by: Jason Everett
        189650 by: Harlequin

Obtain NT Logon
        189651 by: Martin Wilmore
        189652 by: Manuel Lemos
        189653 by: John W. Holmes

Re: Protecting database passwords
        189654 by: Jason Wong

Re: Mail Processing - Bounce
        189655 by: Jason Wong

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 ---
* Thus wrote Dennis Freise:
> On Fri, 2 Jul 2004 11:08:38 +0200
> "Pierre" <[EMAIL PROTECTED]> wrote:
> 
> BTW: $array[$second_array['key']] works fine for me... php 5.0.0rc3

This behaviour has worked since around version 3

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

--- End Message ---
--- Begin Message --- Siddharth Hegde wrote:
While we are on this topic, I have noticed that for only some keys,
the following does not work
$arr[KEY_NAME] but when I change this to $arr['KEY_NAME'] it works.

That's because KEY_NAME is a constant and 'KEY_NAME' is a string. So unless you really have a constant called KEY_NAME, that's what's causing the trouble.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Hi,

Is there a way to handle MySQL errors gracefully such as a duplicate entry
into a UNIQUE field, the method I've been using seems a little laborious...

//see if user exists
  $query = "SELECT *
        FROM users
        WHERE Username = '".$_POST[username]."'";
  $result = @mysql_query($query);
  $num = @mysql_num_rows($result);
  if($num > 0){
   $error = "Username already exists, please choose a another one";
   header("Location: add_user.php?error=$error");
   exit;
  }

Thanks for your help

--- End Message ---
--- Begin Message ---
Shaun wrote:

Is there a way to handle MySQL errors gracefully such as a duplicate entry
into a UNIQUE field, the method I've been using seems a little laborious...

//see if user exists
  $query = "SELECT *
        FROM users
        WHERE Username = '".$_POST[username]."'";
  $result = @mysql_query($query);
  $num = @mysql_num_rows($result);
  if($num > 0){
   $error = "Username already exists, please choose a another one";
   header("Location: add_user.php?error=$error");
   exit;
  }

What would be a graceful way to handle it, in your opinion? You have the mysql_error() and mysql_errno() functions. You can just do you're INSERT and then check for errno 1062 for a duplicate key and act accordingly. Define "graceful" for us.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Hello, I have a Freebsd server 5.2.1 with Apache 2.0.48 and PHP 4.3.4.

After the installation everything looks normal, but after i created some PHP
web files to test it, I found that  PHP is not working.
When i open de PHP document with the browser i only receive a blank page.
But if i check the source code, all the PHP code is in there.

I did search a lot around documents, news, etc.. and i followed all
instructions like:

I did some modifications on httpd.conf. Basically i added this lines:

AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
LoadModule php4_module        libexec/libphp4.so

This line was added after a looooot ot test, and is the full path to the
libphp4.so
LoadModule php4_module        usr/local/libexec/libphp4.so

Also, i checked the httpd log errors and i found:

[notice] Apache/2.0.48 (Unix) PHP/4.3.4 configured -- resuming normal
operations

I think i need help!!!...

Greetings...

Guillermo

--- End Message ---
--- Begin Message --- Gmo Baez wrote:
Hello, I have a Freebsd server 5.2.1 with Apache 2.0.48 and PHP 4.3.4.

After the installation everything looks normal, but after i created some PHP
web files to test it, I found that  PHP is not working.
When i open de PHP document with the browser i only receive a blank page.
But if i check the source code, all the PHP code is in there.

What kind of code are you using to test the script? Not every script outputs html... have you tried phpinfo()? It is unclear what your problem may be from what you've given us.

Jason
--- End Message ---
--- Begin Message ---
Please CC me.

When I connect to a database on the same machine as the apache server us running under, that's server name "localhost", right?
--- End Message ---
--- Begin Message ---
Dennis Gearon wrote:

When I connect to a database on the same machine as the apache server us running under, that's server name "localhost", right?

Yes. You can also use the IP address or computer name.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Jason Barnett wrote:

Hey all, I'm working on a project and considering splitting up the pages into frames. I'm mostly wondering are the frames implementations across browsers relatively similar?



might want to try this in an html list.

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

--- End Message ---
--- Begin Message ---
I've managed with a lot of help to get the PHP pages to echo the results of
what a user put into a "User Registration" page. However, I'm still having
trouble getting the code right to actually commit the data on the
"Registered" page that the "Register" page points to.

Can anyone help...?

Code attached...

-- 
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------


begin 666 Commit.txt
M/#]P:' -"B\J($UY4U%,($-O;FYE8W1I;[EMAIL PROTECTED]:6%B;&5S("HO#0H))&AO
M<W0](FQO8V%L:&]S="([#0H))'5S97(](F%R<F%S7U=E8DUA<W1E<B([#0H)
M)'!A<W-W;W)D/2)Q=V5R='DB.PT*"21D8F%S93TB87)R87-?365M8F5R<R([
M#0H-"B\J($UY4U%,($-O;FYE8W1I;[EMAIL PROTECTED]:6YG("HO#0H))$-O;FYE8W1I
M;VX];7ES<6Q?8V]N;F5C=" H(B1H;W-T(BP@(B1U<V5R(BP@(B1P87-S=V]R
M9"(I#0H);W(@9&EE("@G22!C86YN;[EMAIL PROTECTED];F5C="!T;R!T:&[EMAIL PROTECTED]&%T86)A
M<[EMAIL PROTECTED]@)R N(&UY<W%L7V5R<F]R*"DI.PT*"6UY<W%L7W-E;&5C
M=%]D8B H(B1D8F%S92(I.PT*#0H)96-H;R B/&)R/B([#0H)96-H;R B/&@Q
M/FUE;6)E<G,@87)E83PO:#$^(CL-"@T*"65C:&\@(CQH,SY5<V5R($-R96%T
[EMAIL PROTECTED]/B([#0H)96-H;R B/&)R/CQB<CX\8G(^(CL-"@[EMAIL PROTECTED]&%T82!)
M;G-E<G1I;[EMAIL PROTECTED]"B @)$YE=U5S97))1#T@(" @(" @(" @(" @)%]03U-4
M6R=46%1?57-E<DE$)UT[#0H@("1.97=5<V5R4&%S<W=O<F0](" @(" @("1?
M4$]35%LG5%A47U5S97)087-S=V]R9"==.PT*(" D3F5W57-E<D-O;6UE;G1S
M/2 @(" @(" D7U!/4U1;)U185%]#;VUM96YT<R==.PT*(" D3F5W57-E<D9U
M<G1H97)#;VUM96YT<STD7U!/4U1;)U185%]&=7)T:&5R0V]M;65N=',G73L-
M"@ES<6P@/3T@(DE.4T525"!)3E1/(%)E9VES=&5R961-96UB97)S("A46%1?
M57-E<DE$+%185%]5<V5R4&%S<W=O<F0L5%A47T-O;6UE;G1S+%185%]&=7)T
M:&5R0V]M;65N=',I#0H@([EMAIL PROTECTED](BXD3F5W57-E<DE$+B(G+"<B+B1.
M97=5<V5R4&%S<W=O<F0N(B<L)R(N)$YE=U5S97)#;VUM96YT<RXB)RPG(BXD
M3F5W57-E<D9U<G1H97)#;VUM96YT<RXB)RDB.PT*#0H)96-H;R B/'!R93Y5
M<V5R;F%M93I<=%QT)$YE=U5S97))1#PO<')E/CQB<CXB.PT*"65C:&\@(CQP
M<F4^4&%S<W=O<F0Z7'1<="1.97=5<V5R4&%S<W=O<F0\+W!R93X\8G(^(CL-
M"@EE8VAO("(\<')E/D-O;6UE;G1S.EQT7'0D3F5W57-E<D-O;6UE;G1S/"]P
M<F4^/&)R/B([#0H)96-H;R B/'!R93Y&=7)T:&5R($-O;6UE;G1S.EQT)$YE
M=U5S97)&=7)T:&5R0V]M;65N=',\+W!R93XB.PT*"0D-"@EM>7-Q;%]C;&]S
492 H)$-O;FYE8W1I;VXI.PT*/SX`
`
end

--- End Message ---
--- Begin Message ---
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've managed with a lot of help to get the PHP pages to echo the results
of
> what a user put into a "User Registration" page. However, I'm still having
> trouble getting the code right to actually commit the data on the
> "Registered" page that the "Register" page points to.
>
> Can anyone help...?
>
> Code attached...

You don't call mysql_query() anywhere in your code! Add this line below the
line where you set $sql:
mysql_query($sql);

And you don't need quotes here:
mysql_select_db ("$dbase"); => mysql_select_db($dbase);

Regards,
Torsten Roehr

--- End Message ---
--- Begin Message ---
Harlequin wrote:

        sql == "INSERT INTO RegisteredMembers 
(TXT_UserID,TXT_UserPassword,TXT_Comments,TXT_FurtherComments)
  
VALUES('".$NewUserID."','".$NewUserPassword."','".$NewUserComments."','".$NewUserFurtherComments."')";

This should be $sql = " ... " and then you need to run the query with

$result = mysql_query($sql) or die("Could not execute $sql. Reason: " . mysql_error());

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Sorry about the "Reply To Sender" I was kind of busy and made that mistake.

I guessed from past experience of developing MS Access databases that I'd
assigned the primary key to the UserID which is fine but the duplicate
entries were a mystery.

Thanks for your help Torsten, John. I've cracked it now. The entire page is
attached, I'm a very happy man and can go eat. My next problem will be
retrieving the values for editing based upon the UserID and Password
combination...!

Once again - thanks very much for your help and I hope to return the favour
if ever you need any systems advice.

-- 
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've managed with a lot of help to get the PHP pages to echo the results
of
> what a user put into a "User Registration" page. However, I'm still having
> trouble getting the code right to actually commit the data on the
> "Registered" page that the "Register" page points to.
>
> Can anyone help...?
>
> Code attached...
>
> -- 
> -----------------------------
>  Michael Mason
>  Arras People
>  www.arraspeople.co.uk
> -----------------------------
>
>
>


begin 666 Commit.txt
M/#]P:' -"B\J($UY4U%,($-O;FYE8W1I;[EMAIL PROTECTED]:6%B;&5S("HO#0H))&AO
M<W0](FQO8V%L:&]S="([#0H))'5S97(](F%R<F%S7U=E8DUA<W1E<B([#0H)
M)'!A<W-W;W)D/2)Q=V5R='DB.PT*"21D8F%S93TB87)R87-?;65M8F5R<R([
M#0H-"B\J($UY4U%,($-O;FYE8W1I;[EMAIL PROTECTED]:6YG("HO#0H))$-O;FYE8W1I
M;VX];7ES<6Q?8V]N;F5C=" H(B1H;W-T(BP@(B1U<V5R(BP@(B1P87-S=V]R
M9"(I#0H);W(@9&EE("@G22!C86YN;[EMAIL PROTECTED];F5C="!T;R!T:&[EMAIL PROTECTED]&%T86)A
M<[EMAIL PROTECTED]@)R N(&UY<W%L7V5R<F]R*"DI.PT*"6UY<W%L7W-E;&5C
M=%]D8B H(B1D8F%S92(I.PT*#0H)96-H;R B/&)R/B([#0H)96-H;R B/&@Q
M/FUE;6)E<G,@87)E83PO:#$^(CL-"@T*"65C:&\@(CQH,SY5<V5R($-R96%T
[EMAIL PROTECTED]/B([#0H)96-H;R B/&)R/CQB<CX\8G(^(CL-"@[EMAIL PROTECTED]&%T82!)
M;G-E<G1I;[EMAIL PROTECTED]"B @)$YE=U5S97))1#T@(" @(" @(" @(" @(" @(" @
M(" @(" @(" @)%]03U-46R=46%1?57-E<DE$)UT[#0H@("1.97=5<V5R4&%S
M<W=O<F0](" @(" @(" @(" @(" @("1?4$]35%LG5%A47U5S97)087-S=V]R
M9"==.PT*(" D3F5W57-E<D-O;6UE;G1S/2 @(" @(" @(" @(" @(" D7U!/
M4U1;)U185%]#;VUM96YT<R==.PT*(" D3F5W57-E<D9U<G1H97)#;VUM96YT
M<STD7U!/4U1;)U185%]&=7)T:&5R0V]M;65N=',G73L-"B @)'-Q;" ]("))
[EMAIL PROTECTED]<W1E<F5D365M8F5R<R H57-E<DE$+%5S97)087-S
M=V]R9"Q#;VUM96YT<RQ&=7)T:&5R0V]M;65N=',I#0H@([EMAIL PROTECTED](BXD
M3F5W57-E<DE$+B(G+"<B+B1.97=5<V5R4&%S<W=O<F0N(B<L)R(N)$YE=U5S
M97)#;VUM96YT<RXB)RPG(BXD3F5W57-E<D9U<G1H97)#;VUM96YT<RXB)RDB
M.PT*"21R97-U;'0@/2!M>7-Q;%]Q=65R>[EMAIL PROTECTED]<W%L*2!O<B!D:64H(D-O=6QD
M(&YO="!E>&5C=71E("1S<6PN(%)E87-O;CH@(B N(&UY<W%L7V5R<F]R*"DI
M.PT*"65C:&\@(CQP<F4^57-E<FYA;64Z7'1<="1.97=5<V5R240\+W!R93X\
M8G(^(CL-"@EE8VAO("(\<')E/E!A<W-W;W)D.EQT7'0D3F5W57-E<E!A<W-W
M;W)D/"]P<F4^/&)R/B([#0H)96-H;R B/'!R93Y#;VUM96YT<SI<=%QT)$YE
M=U5S97)#;VUM96YT<SPO<')E/CQB<CXB.PT*"65C:&\@(CQP<F4^1G5R=&AE
M<B!#;VUM96YT<SI<="1.97=5<V5R1G5R=&AE<D-O;6UE;G1S/"]P<F4^(CL-
B"@T*"6UY<W%L7V-L;W-E("@D0V]N;F5C=&EO;BD[#0H_/@``
`
end

--- End Message ---
--- Begin Message ---
> Torsten
>
> I managed to work through it and this is the code:
>
>   $NewUserID=                            $_POST['TXT_UserID'];
>   $NewUserPassword=                $_POST['TXT_UserPassword'];
>   $NewUserComments=                $_POST['TXT_Comments'];
>   $NewUserFurtherComments=$_POST['TXT_FurtherComments'];
>   $sql = "INSERT INTO RegisteredMembers
> (UserID,UserPassword,Comments,FurtherComments)
>
> VALUES('".$NewUserID."','".$NewUserPassword."','".$NewUserComments
> ."','".$Ne
> wUserFurtherComments."')";
>   $query = mysql_query($sql);
>       $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid
> Query - " . mysql_error());
>
>       echo "<pre>Username:\t\t$NewUserID</pre><br>";
>       echo "<pre>Password:\t\t$NewUserPassword</pre><br>";
>       echo "<pre>Comments:\t\t$NewUserComments</pre><br>";
>       echo "<pre>Further Comments:\t$NewUserFurtherComments</pre>";
>
>       mysql_close ($Connection);
>
> However. I still get an error although the input is actually
> commited to the
> database:
>
> Invalid Query - Duplicate entry 'SherylJo' for key 1
>
> I don't follow this because although I have set that particular
> field up as
> a primary key this value is not duplicated... Strange.

Hi Michael,

please always anser to the list (Answer All). Could you post your table
structure?

Regards, Torsten

--- End Message ---
--- Begin Message ---
 $query = mysql_query($sql);
        $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid
Query - " . mysql_error());

You're running the query twice. Take out that first line.

And I second the recommendation to please reply to the list and not individuals unless they request it.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >>  $query = mysql_query($sql);
> >> $mysql_result = mysql_query ($sql, $Connection) or die ("Invalid
> >>Query - " . mysql_error());
>
> You're running the query twice. Take out that first line.

Michael, that's where your duplicate key error comes from. Forget about the
table structure.

Thanks, John.

>
> And I second the recommendation to please reply to the list and not
> individuals unless they request it.
>
> --
> ---John Holmes...

--- End Message ---
--- Begin Message ---
Hi,
I have the following problem with "strcasecmp()" function.
It should be compare strings case insensitive. When I use it on my local
computer, - it works correctly.
But when I upload file on some internet server - the function doesn't work .

I use the function with cyrillic charset.

Can someone help me ?
Thanks in advanse !

--- End Message ---
--- Begin Message ---
On Sat, 2004-07-03 at 16:57, Rosen wrote:
> Hi,
> I have the following problem with "strcasecmp()" function.
> It should be compare strings case insensitive. When I use it on my local
> computer, - it works correctly.
> But when I upload file on some internet server - the function doesn't work .
> 
> I use the function with cyrillic charset.
> 
> Can someone help me ?
> Thanks in advanse !

What version of PHP are you using locally?

What version of PHP are you using on "some internet server"?

I suspect there is a difference.

-- 
Scot L. Harris
[EMAIL PROTECTED]

    *** System shutdown message from root ***

System going down in 60 seconds 

--- End Message ---
--- Begin Message ---
Both versions are  Version 4.3.7 of PHP.



"Scot L. Harris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 2004-07-03 at 16:57, Rosen wrote:
> > Hi,
> > I have the following problem with "strcasecmp()" function.
> > It should be compare strings case insensitive. When I use it on my local
> > computer, - it works correctly.
> > But when I upload file on some internet server - the function doesn't
work .
> >
> > I use the function with cyrillic charset.
> >
> > Can someone help me ?
> > Thanks in advanse !
>
> What version of PHP are you using locally?
>
> What version of PHP are you using on "some internet server"?
>
> I suspect there is a difference.
>
> -- 
> Scot L. Harris
> [EMAIL PROTECTED]
>
>  *** System shutdown message from root ***
>
> System going down in 60 seconds

--- End Message ---
--- Begin Message ---
On Sat, 2004-07-03 at 17:08, Rosen wrote:
> Both versions are  Version 4.3.7 of PHP.
> 

Then more information is needed to figure out the problem.  

Sample code plus any error messages or results would help.

-- 
Scot L. Harris
[EMAIL PROTECTED]

"Plaese porrf raed."
                -- Prof. Michael O'Longhlin, S.U.N.Y. Purchase 

--- End Message ---
--- Begin Message ---
The code:

echo strcasecmp("Тест ", "тест");   // This are "Test" and "test" in
cyrillic
echo "<br>";
echo strcasecmp("Test", "test");    // This no problem - it works


Results:

-32
0





"Scot L. Harris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 2004-07-03 at 17:08, Rosen wrote:
> > Both versions are  Version 4.3.7 of PHP.
> >
>
> Then more information is needed to figure out the problem.
>
> Sample code plus any error messages or results would help.
>
> -- 
> Scot L. Harris
> [EMAIL PROTECTED]
>
> "Plaese porrf raed."
> -- Prof. Michael O'Longhlin, S.U.N.Y. Purchase

--- End Message ---
--- Begin Message ---
Hi again. New Hour, New Problem.

I'm using the following code to user user input from a form on a previous
page to send mail confirming registration:

  $To = "$NewUserMail;
  $Subject = "Welcome To Arras People's Registered Members Area";
  $Message = "$NewUserID, \n\nWelcome to the arras People registered members
section of our website
  facilites here include tropical gardens, tea parties and late nights out
with one of our directors.";
  $MailSend = mail($To,$Subject,$Message);

I get Parse Error on line 62 "$Subject".

Any ideas...? Am I missing something fundamental here...?

-- 
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------

--- End Message ---
--- Begin Message ---
You have a " before $NewUserMail; on the first line, so everything
until the next " is part of that variable.  Since there's not a ;
after the second ", you are getting the error.

-- jason everett
-- [EMAIL PROTECTED]
-- http://twocannons.com

On Sat, 3 Jul 2004 23:03:51 +0100, Harlequin
<[EMAIL PROTECTED]> wrote:
> Hi again. New Hour, New Problem.
> 
> I'm using the following code to user user input from a form on a previous
> page to send mail confirming registration:
> 
>  $To = "$NewUserMail;
>  $Subject = "Welcome To Arras People's Registered Members Area";
>  $Message = "$NewUserID, \n\nWelcome to the arras People registered members
> section of our website
>  facilites here include tropical gardens, tea parties and late nights out
> with one of our directors.";
>  $MailSend = mail($To,$Subject,$Message);
> 
> I get Parse Error on line 62 "$Subject".
> 
> Any ideas...? Am I missing something fundamental here...?
> 
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--- End Message ---
--- Begin Message ---
thanks Jason.

works a treat now...!

-- 
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Jason Everett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> You have a " before $NewUserMail; on the first line, so everything
> until the next " is part of that variable.  Since there's not a ;
> after the second ", you are getting the error.
>
> -- jason everett
> -- [EMAIL PROTECTED]
> -- http://twocannons.com
>
> On Sat, 3 Jul 2004 23:03:51 +0100, Harlequin
> <[EMAIL PROTECTED]> wrote:
> > Hi again. New Hour, New Problem.
> >
> > I'm using the following code to user user input from a form on a
previous
> > page to send mail confirming registration:
> >
> >  $To = "$NewUserMail;
> >  $Subject = "Welcome To Arras People's Registered Members Area";
> >  $Message = "$NewUserID, \n\nWelcome to the arras People registered
members
> > section of our website
> >  facilites here include tropical gardens, tea parties and late nights
out
> > with one of our directors.";
> >  $MailSend = mail($To,$Subject,$Message);
> >
> > I get Parse Error on line 62 "$Subject".
> >
> > Any ideas...? Am I missing something fundamental here...?
> >
> > --
> > -----------------------------
> > Michael Mason
> > Arras People
> > www.arraspeople.co.uk
> > -----------------------------
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

--- End Message ---
--- Begin Message ---
Hi all,

I have a web form with a field for username, this is a corporate site
so will be the users NT logon. Would it be possible using PHP to obtain
this information directly from the client pc?

Thank you in advance.

Martin
 

======================================================
              http://www.mydownload.co.uk
======================================================

Attachment: pgpP2coQs7VIB.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Hello,

On 07/03/2004 08:27 PM, Martin Wilmore wrote:
I have a web form with a field for username, this is a corporate site
so will be the users NT logon. Would it be possible using PHP to obtain
this information directly from the client pc?

Assuming that you Web server is configured to require Windows NT domain authentication for serving that PHP script, I suppose you can get the user with GetEnv("LOGON_USER") .

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
Manuel Lemos wrote:

I have a web form with a field for username, this is a corporate site
so will be the users NT logon. Would it be possible using PHP to obtain
this information directly from the client pc?

Assuming that you Web server is configured to require Windows NT domain authentication for serving that PHP script, I suppose you can get the user with GetEnv("LOGON_USER") .

It's available directly in $_SESSION['LOGON_USER'], also. Like Manuel said, though, you have to turn off anonymous browsing in (assuming) IIS and enable NT authentication.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
On Friday 02 July 2004 04:43, Peter Brodersen wrote:

> You could move the virtual host to its own file, only readable by root
> (and include this virtual host-file in httpd.conf).
>
> Use SetEnv in this virtual host to set values like DBUSER, DBPASS and
> so on:
> http://httpd.apache.org/docs/mod/mod_env.html#setenv
> You can choose whatever names you like.
>
> The PHP script would then just have to read these environment values
> to retrieve username and password.

Or alternatively you can just set these:

  mysql.default_user
  mysql.default_password
  etc

inside your <VirtualHost> containers.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Stealing a rhinoceros should not be attempted lightly.
*/

--- End Message ---
--- Begin Message ---
On Wednesday 30 June 2004 01:17, Jason Williard wrote:
> I'm building a tool to process incoming mail.  So far, I have a script
> that receives mail that is piped to it.  I am able to process the mail
> without a problem.  However, the script causes a bounce message
> containing the output of the script.  Does anyone know how I can fix
> this?

1) It could be that your script does not exit with a valid (or expected) exit 
code.

2) It could be that your MTA does not expect any output on STDOUT? *Should* 
your mail processing program be sending output to STDOUT? With qmail any 
output to STDOUT appears in the mail logs so it's useful for debugging, but 
I'm not sure what the behaviour would be for other MTAs.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
You have a will that can be influenced by all with whom you come in contact.
*/

--- End Message ---

Reply via email to