php-windows Digest 22 Apr 2002 16:17:56 -0000 Issue 1106

Topics (messages 13219 through 13231):

Get Username From Windows Login
        13219 by: Jack

PHP on IIS5 WIN2K Problem - Help?
        13220 by: James Meers
        13222 by: James Meers

R: [PHP-WIN] PHP on IIS5 WIN2K Problem - Help?
        13221 by: Alberto. Sartori

Quoted Dynamic Strings are killing me
        13223 by: R.S. Herhuth

Quoted Dynamic Strings are killing me (Second Attempt)
        13224 by: R.S. Herhuth
        13226 by: Steve Bradwell
        13227 by: Mike Flynn
        13229 by: DL Neil

R: [PHP-WIN] Quoted Dynamic Strings are killing me (Second Attempt)
        13225 by: Alberto. Sartori

Problem using ImageTTFText
        13228 by: Alberto. Sartori

serialize or implode functions?
        13230 by: Afan Pasalic

problems with the ucwords fuction
        13231 by: Cassiano Dal Pizzol

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 ---
Dear all
 I'm using IIS Server 4.0,  what i want to do is to prevent user to provide
another login before they can reach my Intranet, so i had setted the php to
grep the username from the windows, but here is the problem, the username
that greped out was "IUSER_MICROSOFT", is there anyway that make the IIS to
detect the username see if it is a valid account, then pass that account to
php instead of using "IUSER_MICROSFOT".
I want to show the user account of the real logged in user, not
"IUSER_MICROSOFT".


--
Thx a lot!
Jack
[EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
 I have installed PHP on my server and it works fine, however, whenever
executing a script in a new browser window, i always get prompted to enter a
username and password!?

I have given 'everyone' and 'I_USER' full access to the folder and IIS

This is probably a school boy error, anyone know what im banging on about?



--- End Message ---
--- Begin Message ---
I already have both IUSR and IWAM both full access on the directory
security???



I have tried all combinations with IUSR on its own and IWAM on its own,
still no luck



Grrrrrrrrrrrrrr...



"Alberto. Sartori" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
Try adding IWAM_Machinename

-----Messaggio originale-----
Da: James Meers [mailto:[EMAIL PROTECTED]]
Inviato: lunedė 22 aprile 2002 10.50
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] PHP on IIS5 WIN2K Problem - Help?


 I have installed PHP on my server and it works fine, however, whenever
executing a script in a new browser window, i always get prompted to enter a
username and password!?

I have given 'everyone' and 'I_USER' full access to the folder and IIS

This is probably a school boy error, anyone know what im banging on about?




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



--- End Message ---
--- Begin Message ---
Try adding IWAM_Machinename

-----Messaggio originale-----
Da: James Meers [mailto:[EMAIL PROTECTED]]
Inviato: lunedė 22 aprile 2002 10.50
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] PHP on IIS5 WIN2K Problem - Help?


 I have installed PHP on my server and it works fine, however, whenever
executing a script in a new browser window, i always get prompted to enter a
username and password!?

I have given 'everyone' and 'I_USER' full access to the folder and IIS

This is probably a school boy error, anyone know what im banging on about?




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

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

I have been trying to create strings dynamically by combining text and
variables.  Because SQL wants single quotes surrounding the values I
have been forced to create the string as follows:
--- End Message ---
--- Begin Message ---
I have been trying to create strings dynamically by combining text and
variables.  Because SQL wants single quotes surrounding the values I
have been forced to create the string as follows (all variables have
been previuosly set earlier on the page):


$query = "select bio FROM individual WHERE last_name ='".
$selectedLastname ."' AND first_name ='". $selectedFirstname ."' AND market
='".$selectedMarket."'";

Which seems to be good to me but when I echo the query it parses out
like this:

select bio FROM individual WHERE last_name ='Appleyard
selectedFirstname=Peter selectedMarket=Atlanta' AND first_name ='' AND
market ='' 


What am I missing...or doing wrong?  This seems so straightforward but
I'm getting beat up something horrible!

Thanks,
Ron Herhuth
--- End Message ---
--- Begin Message ---
Hey Ron,
I just echoed your $query string just like you have it and I get the quotes
around the values. 

I put this in a file:

$selectedLastname = "smith";
$selectedFirstname = "jimmy";
$selectedMarket = "test";

$query = "select bio FROM individual WHERE last_name ='".
$selectedLastname ."' AND first_name ='". $selectedFirstname ."' AND market
='".$selectedMarket."'";

and it worked fine, check to make sure there are values in your variables.

-Steve



-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 22, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Quoted Dynamic Strings are killing me (Second
Attempt)


I have been trying to create strings dynamically by combining text and
variables.  Because SQL wants single quotes surrounding the values I
have been forced to create the string as follows (all variables have
been previuosly set earlier on the page):


$query = "select bio FROM individual WHERE last_name ='".
$selectedLastname ."' AND first_name ='". $selectedFirstname ."' AND market
='".$selectedMarket."'";

Which seems to be good to me but when I echo the query it parses out
like this:

select bio FROM individual WHERE last_name ='Appleyard
selectedFirstname=Peter selectedMarket=Atlanta' AND first_name ='' AND
market ='' 


What am I missing...or doing wrong?  This seems so straightforward but
I'm getting beat up something horrible!

Thanks,
Ron Herhuth

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I'm not sure at first glance what's wrong.  But I do know you could do 
something like this instead:
$query  = 'SELECT bio FROM individual ';
$query .= "WHERE last_name='$selectedLastname' ";
$query .= "AND first_name='$selectedFirstname' ";
$query .= "AND market='$selectedMarket' ";

I split it into multiple lines because that's what I like to do, and it 
helps with clarity and avoids the word-wrapping in e-mail programs.  But 
you should remember the following:
1. Strings can be enclosed in single quotes or double quotes in PHP
2. If you enclose a string in single quotes, you cannot put any special 
characters or variables within the string (i/e escape characters like \n, 
$vars, etc).  The only thing that gets escaped with a backslash (\) in 
single-quote strings is single-quotes themselves (so as not to signal the 
end of the string and confuse the PHP parser).  And you can include double 
quotes within the single quotes just like normal stuff.
3. If you enclose a string in double quotes, you can put any kind of 
special characters, variables, escaped characters, etc, within it, 
including single quotes, which get treated just like normal text characters.
4. Single-quote strings get parsed SLIGHTLY (not much) faster than 
double-quote strings.  Just to be anal, I like to use double-quote strings 
only when I need to.  So you can see in my code above, the first line of 
the query is enclosed in single quotes because it never calls any variables 
or has any special escaped characters.  All the other lines do because they 
include variables.  But they can enclose the variables in single quotes for 
the SQL query because you can use single quotes within double quotes.

Hope this helps.

At 09:38 AM 4/22/2002 -0500, R.S. Herhuth wrote:
>I have been trying to create strings dynamically by combining text and
>variables.  Because SQL wants single quotes surrounding the values I
>have been forced to create the string as follows (all variables have
>been previuosly set earlier on the page):
>
>
>$query = "select bio FROM individual WHERE last_name ='".
>$selectedLastname ."' AND first_name ='". $selectedFirstname ."' AND market
>='".$selectedMarket."'";
>
>Which seems to be good to me but when I echo the query it parses out
>like this:
>
>select bio FROM individual WHERE last_name ='Appleyard
>selectedFirstname=Peter selectedMarket=Atlanta' AND first_name ='' AND
>market =''
>
>
>What am I missing...or doing wrong?  This seems so straightforward but
>I'm getting beat up something horrible!
>
>Thanks,
>Ron Herhuth
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home [repeat daily]

--- End Message ---
--- Begin Message ---
Ron,

> I have been trying to create strings dynamically by combining text and
> variables.  Because SQL wants single quotes surrounding the values I
> have been forced to create the string as follows (all variables have
> been previuosly set earlier on the page):
>
> $query = "select bio FROM individual WHERE last_name ='".
> $selectedLastname ."' AND first_name ='". $selectedFirstname ."' AND
market
> ='".$selectedMarket."'";
>
> Which seems to be good to me but when I echo the query it parses out
> like this:
>
> select bio FROM individual WHERE last_name ='Appleyard
> selectedFirstname=Peter selectedMarket=Atlanta' AND first_name ='' AND
> market =''
>
> What am I missing...or doing wrong?  This seems so straightforward but
> I'm getting beat up something horrible!


Looks like a confusion of quotation marks (v.difficult to see on
email/some fonts).
Remember that string variables within double quotes are evaluated:
take out all the double-quotes except the first and last, and remove all
the . (concatenation) operators.
Now review the remaining single quotes, with regard to SQL's rules for
quoting string values.
(in review: double quotes for PHP, single quotes for SQL)

OK now?
=dn

--- End Message ---
--- Begin Message ---
Something's going wrong...
check the value of each variables ($selectedFirstname and $selectedFirstname ). Use 
echo to print out them. If necessary check the html source of the page with the form.

-----Messaggio originale-----
Da: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Inviato: lunedė 22 aprile 2002 16.39
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] Quoted Dynamic Strings are killing me (Second
Attempt)


I have been trying to create strings dynamically by combining text and
variables.  Because SQL wants single quotes surrounding the values I
have been forced to create the string as follows (all variables have
been previuosly set earlier on the page):


$query = "select bio FROM individual WHERE last_name ='".
$selectedLastname ."' AND first_name ='". $selectedFirstname ."' AND market
='".$selectedMarket."'";

Which seems to be good to me but when I echo the query it parses out
like this:

select bio FROM individual WHERE last_name ='Appleyard
selectedFirstname=Peter selectedMarket=Atlanta' AND first_name ='' AND
market ='' 


What am I missing...or doing wrong?  This seems so straightforward but
I'm getting beat up something horrible!

Thanks,
Ron Herhuth

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

--- End Message ---
--- Begin Message ---
Hi guys, since I've installed php 4.1.2 I cannot use correctly ImageTTFText functions 
'cos the system cannot load the font. I've tried to put it into the same folder of the 
script...nothing do to. Return me a nice error like this:

Warning: EURzQ in c:\inetpub\wwwroot\esempi\immagine.php on line 20

That "EURzQ" change everytime I run my code...
Anyone can help me? thanks!



 Alberto Sartori - Developer
 Hard Programming Dep.
-----------------------------------------------
 CELL NETWORK ITALIA S.p.A
 Via Correggio, 19
 20149 Milano - Italy
 Phone +39 02.46.90.551
 Fax  +39 02.46.91.700
 E-Mail: [EMAIL PROTECTED]
 Internet Site:  http://www.cellnetwork.it
-----------------------------------------------

--- End Message ---
--- Begin Message ---
Hi to all,
I'm making a quiz and I want to put all answers together in one table-cell. But, I'm 
not sure what is better way:
- using implode/explode functions keep all answers as one long string, or
- serialize/unserialize answers and then put them in the table

What's better and why?

Thanks.

Afan
--- End Message ---
--- Begin Message ---
i´m getting an error with the ucwords function...
if i use it to uppercase the first letter of every string and that string is something like
$string="this is a foo string";
echo ucwords ($string);
my output is ok
This Is A Foo String
 
but if i use some special chars like
$string"este é um teste em portuguęs";
echo ucwords($string);
my output is
Este É Um Teste em PortuguęS";
every char right before any special character is in upper too
any one know an other funcion who works?
thanks in advance
 
Cassiano Dal Pizzol
--- End Message ---

Reply via email to