php-windows Digest 3 May 2005 03:35:35 -0000 Issue 2656

Topics (messages 25951 through 25957):

Re: A question on password policies . . .
        25951 by: Jason Barnett

Re: Newcomer
        25952 by: Barry Fawthrop
        25953 by: Jason Barnett
        25955 by: Randy Clamons

Re: Phpize
        25954 by: Frank M. Kromann
        25956 by: Terry Watts

Print inside a variable
        25957 by: Maxwell Brodie

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 --- Lists wrote:
Folk,

I'm curious if anyone has any advice on setting up multi-level password access?

The site is being developed on Win2K/IIS 5.x, but will be published on  a Linux 
server, which phpinfo() reports as:
Linux {domain name} 2.4.20-28.8HEsmp #1 SMP Thu Jun 17 16:21:50 BST 2004 i686.


I would highly recommend that you test on at least one "Linux" server with your code before you publish it. Most of the time in PHP you get exactly what you expect from one OS to the next, but there are a few cases where some features just don't work the same.


What I'm wondering about is what approach would allow reasonable security, but 
require the least amount of adjustment between the two disparate servers?

The general scenario is as follows.
*Five levels of membership, 0-4;
*member ID, password (MD5 hash), & access level stored in MySQL v3.23.x;
*script validates member password, looks up access level.

Probably the access level - not the password - would be stored in a Session 
variable and checked by each succeeding script for appropriate authorization.


Agreed... storing the access level is a sane way to do this. Storing the password in plain text *anywhere* is not a good idea.


As an example, for levels 0-x, 0 would disallow chat, 1 would allow joining a 
public chat, 2 would allow creation of a public chat room, 3 would allow 
joining a private chat, 4 would allow creation of a private chat room.

Since the access level is determined by the member ID and password, what's the 
least effort method to set up password access(es)?  I.E., what password 
validation method would allow for the least amount of script modification 
between the two platforms?


The way you are doing it sounds fine to me.

--- End Message ---
--- Begin Message ---
Thanks all

Yes I have been slowly working through the manual, which has helped alot.

I'm not sure on the issue raised, which is better A or B


(A) <?php echo "<html><body>.......</body></html> ?> or (B) <html><body><?php .... ?> xxxxx <?php .... ?> xxxx </body></html>


Thanks in advance

Barry




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.1 - Release Date: 5/2/2005

--- End Message ---
--- Begin Message --- Barry Fawthrop wrote:
Thanks all

Yes I have been slowly working through the manual, which has helped alot.

I'm not sure on the issue raised, which is better A or B


This falls into the "religious" area of programming. There's a good discussion about templates going on over in php-general newsgroup right now. You can check the archives if you're interested in reading through it all.



(A) <?php echo "<html><body>.......</body></html> ?> or (B) <html><body><?php .... ?> xxxxx <?php .... ?> xxxx </body></html>


They both work so really it's a matter of what looks best to you / the code maintainer.

--- End Message ---
--- Begin Message ---
Barry,

Either will work, but I would guess that one will work quicker than the other. 
I depends a little on how how much you are doing between the php tags. I will 
add this comment:

When the web server goes from html to php, it changes context to call the 
script engine. This change takes time. If your server is not heavily loaded, 
the amount of time may not be significant. "A" might provide better performance 
as it switches context only once. "B" might be easier to maintain as it will 
'look' more like html to the programmer.

Randy Clamons
Systems Programming
Novaspace.com


> ------------Original Message------------
> From: Jason Barnett <[EMAIL PROTECTED]>
> To: [email protected]
> Date: Mon, May-2-2005 8:51 AM
> Subject: Re: [PHP-WIN] Newcomer
>
> Barry Fawthrop wrote:
> > Thanks all
> > 
> > Yes I have been slowly working through the manual, which has helped 
> alot.
> > 
> > I'm not sure on the issue raised, which is better A or B
> > 
> 
> This falls into the "religious" area of programming.  There's a good 
> discussion about templates going on over in php-general newsgroup right 
> 
> now.  You can check the archives if you're interested in reading 
> through 
> it all.
> 
> > 
> > (A)  <?php   echo "<html><body>.......</body></html>   ?>
> > or
> > (B)  <html><body><?php .... ?> xxxxx <?php .... ?>  xxxx   
> </body></html>
> > 
> 
> They both work so really it's a matter of what looks best to you / the 
> code maintainer.
> 

--- End Message ---
--- Begin Message ---
phpize is a linux/unix tool and it can't be used on win32 systems.

The Image Magick extension comes precompiled on win32. You only need to
install and enable the extension. This can be done by adding
extension=php_imagick.dll to you php.ini file.

- Frank

> Terry Watts wrote:
> > I'm new to PHP and I have just installed PHP for windows on my server,
I'm
> > now trying to install PHP for Image Magick. The docs for this say I
have to
> > run "phpize" but I can't find it anywhere. Can someone please tell me
where
> > it lives.
> > 
> >         Thanks in advance.
> >             Terry
> 
> phpize comes with the source distribution and if I recall correctly it's

> in the ext directory.  You should be able to get that distribution from

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

--- End Message ---
--- Begin Message ---
Thanks I'll give it a spin.
    Regards.
        Terry

"Frank M. Kromann" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> phpize is a linux/unix tool and it can't be used on win32 systems.
>
> The Image Magick extension comes precompiled on win32. You only need to
> install and enable the extension. This can be done by adding
> extension=php_imagick.dll to you php.ini file.
>
> - Frank
>
>> Terry Watts wrote:
>> > I'm new to PHP and I have just installed PHP for windows on my server,
> I'm
>> > now trying to install PHP for Image Magick. The docs for this say I
> have to
>> > run "phpize" but I can't find it anywhere. Can someone please tell me
> where
>> > it lives.
>> >
>> >         Thanks in advance.
>> >             Terry
>>
>> phpize comes with the source distribution and if I recall correctly it's
>
>> in the ext directory.  You should be able to get that distribution from
>
>> the PHP downloads page.
>>
>> -- 
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 

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

I believe my problem is that I have to use the print funtion inside a 
variable, and I have no clue how to do that. For example, I need to get 
this:

if (isset($rss_channel["ITEMS"])) {
 if (count($rss_channel["ITEMS"]) > 0) {
  for($i = 0;$i < count($rss_channel["ITEMS"]);$i++) {
   if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
   print ("\n<div class=\"itemtitle\"><a href=\"" . 
$rss_channel["ITEMS"][$i]["LINK"] . "\">" . 
$rss_channel["ITEMS"][$i]["TITLE"] . "</a></div>");
   } else {
   print ("\n<div class=\"itemtitle\">" . $rss_channel["ITEMS"][$i]["TITLE"] 
. "</div>");
   }
    print ("<div class=\"itemdescription\">" . 
$rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</div><br />");   }
 } else {
  print ("<b>There are no articles in this feed.</b>");
 }
}

Into variable "$message="

Any help would be appriciated MUCH!

Thank you! 

--- End Message ---

Reply via email to