php-windows Digest 13 Aug 2004 12:13:10 -0000 Issue 2358

Topics (messages 24393 through 24408):

User Level Access Control Priviledges
        24393 by: Trystano.aol.com
        24394 by: Justin Patrin
        24402 by: Trystano.aol.com
        24403 by: Justin Patrin
        24404 by: Trystano.aol.com
        24405 by: Justin Patrin

connection: close header
        24395 by: d c
        24398 by: Gryffyn, Trevor
        24400 by: Justin Patrin
        24408 by: d c

Mail functions?
        24396 by: Anne Shroeder
        24397 by: Cory D. Wiles
        24399 by: Trystano.aol.com
        24401 by: Justin Patrin
        24406 by: Manuel Lemos

Re: PHP and SQL 2000
        24407 by: PHP MySQL

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 ---
 
Hi all,

I am encountered with what seems a potentially difficult  system to 
implement. I need to implement a user level access control system. The  application I 
will create is a consultancy application, with various user  categories, where 
each user category will have access rights to a particular  table (or possibly 
individual fields in each table).

A user group can  have the following: no access, read access, write access. 
and depending on their  group, they will be able to view and manipulate certain 
pieces of information  that are contained in tables.

What I want, is more or less similar to the  way in which MySQL implements 
privileges and level control for users.

I  originally planned to implement this into MySQL database, but now feel 
that it  would be best if I implemented were to code it. Yet, I may still 
implement it in  MySQL if its a simple enough solution. I am to look into both  
methods.

Does anyone know how I can best implement this (or would be able  to start me 
off so that I could take it on further), or know of any online  tutorials?

Your help is greatly appreciated.

Tryst

--- End Message ---
--- Begin Message ---
On Thu, 12 Aug 2004 13:52:33 EDT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> Hi all,
> 
> I am encountered with what seems a potentially difficult  system to
> implement. I need to implement a user level access control system. The  application I
> will create is a consultancy application, with various user  categories, where
> each user category will have access rights to a particular  table (or possibly
> individual fields in each table).
> 
> A user group can  have the following: no access, read access, write access.
> and depending on their  group, they will be able to view and manipulate certain
> pieces of information  that are contained in tables.
> 
> What I want, is more or less similar to the  way in which MySQL implements
> privileges and level control for users.
> 
> I  originally planned to implement this into MySQL database, but now feel
> that it  would be best if I implemented were to code it. Yet, I may still
> implement it in  MySQL if its a simple enough solution. I am to look into both
> methods.
> 
> Does anyone know how I can best implement this (or would be able  to start me
> off so that I could take it on further), or know of any online  tutorials?
> 
> Your help is greatly appreciated.
> 

By "implement in mysql", do you mean implement it in the server itself
in C? If so, if you're not submitting your source back to mysql, it
would be a pain to keep it in sync. Also, they just might not accept
the code.

If you need a system to plug into a PHP script, there are some good
permissions packages out there. One is:
http://pear.php.net/package/LiveUser

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
I meant be implemeting the User Access priviledges into the database, so then the code 
being used will extract that this data for certain users and execute whats necessary.

For example...

CREATE TABLE User (
  ID int not null
, Name varchar(30) not null
, PRIMARY KEY (ID)
);

CREATE TABLE AccessObject (
  ID int not null
, Description varchar(255) not null
, PRIMARY KEY (ID)
);

CREATE TABLE UserAccessPermission (
  User int not null
, AccessObject int not null
, CanRead char(1) not null default('Y')
, CanWrite char(1) not null default('N')
, PRIMARY KEY (User, AccessObject)
);

Hope this helps you grasp what I had in mind.

Thanks

Tryst

--- End Message ---
--- Begin Message ---
On Thu, 12 Aug 2004 17:50:44 -0400, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I meant be implemeting the User Access priviledges into the database, so then the 
> code being used will extract that this data for certain users and execute whats 
> necessary.
> 
> For example...
> 
> CREATE TABLE User (
>   ID int not null
> , Name varchar(30) not null
> , PRIMARY KEY (ID)
> );
> 
> CREATE TABLE AccessObject (
>   ID int not null
> , Description varchar(255) not null
> , PRIMARY KEY (ID)
> );
> 
> CREATE TABLE UserAccessPermission (
>   User int not null
> , AccessObject int not null
> , CanRead char(1) not null default('Y')
> , CanWrite char(1) not null default('N')
> , PRIMARY KEY (User, AccessObject)
> );
> 
> Hope this helps you grasp what I had in mind.
> 

LiveUser does this.

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
Can I actually look behind the scenes to see how LiveUser actually implements this? 
Also, if I were to use LiveUser, would I be able to bolt it onto my online Application?

Sorry can you send me the link again, I seem to have accidentally deleted yopur 
previous email.

Thanks

Tryst

--- End Message ---
--- Begin Message ---
On Thu, 12 Aug 2004 18:14:53 -0400, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Can I actually look behind the scenes to see how LiveUser actually implements this? 
> Also, if I were to use LiveUser, would I be able to bolt it onto my online 
> Application?
> 

Yes, that's that PEAR packages are for. They're re-usable components.

You can look at the code it uses and the DB it uses, of course.

> Sorry can you send me the link again, I seem to have accidentally deleted yopur 
> previous email.
> 

http://pear.limbourg.com/
http://pear.php.net/package/LiveUser

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
Hello,
 
I am using php 4.3.4 on windows 2000 with iis 5 and isapi. We recently switched from 
asp to php. There is an application that we have that hits one of the pages to send 
some info, and it uses persistant connections. The php page was not working correctly, 
and a trace using ethereal showed that the difference was the "Connection: close" 
header being sent with the php page, while the "Connection" header was not present in 
the asp page's response. I tried using the latest version of php, and the header is 
still being sent.
 
Is there a way to get iis to not close the connection with php?
 
Thanks,
Dave

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--- End Message ---
--- Begin Message ---
Just tossing out my 2cents..  Maybe there's a way or a reason, but HTTP
connections are, by their nature, connectionless.  They send the data
and close the connection.  I'm not sure why you'd want to keep a
persistant connection to a specific page.

There are "Keep Alive" codes you can send that maintain a connection to
the web server so you don't have to go through all the handshaking and
stuff again (ok, I'm not using exact terms here, forgive me.. My
networking is a bit rusty) but that doesn't keep you connected to a
single PHP or HTML or ASP page, just the server.

Sounds like everything's behaving just as it was designed to and you're
trying to do something really odd.  But maybe I'm just not getting what
you're trying to do or something.

Just what popped into my head when I read this.

-TG

> -----Original Message-----
> From: d c [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, August 12, 2004 2:51 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] connection: close header
> 
> 
> Hello,
>  
> I am using php 4.3.4 on windows 2000 with iis 5 and isapi. We 
> recently switched from asp to php. There is an application 
> that we have that hits one of the pages to send some info, 
> and it uses persistant connections. The php page was not 
> working correctly, and a trace using ethereal showed that the 
> difference was the "Connection: close" header being sent with 
> the php page, while the "Connection" header was not present 
> in the asp page's response. I tried using the latest version 
> of php, and the header is still being sent.
>  
> Is there a way to get iis to not close the connection with php?
>  
> Thanks,
> Dave
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 

--- End Message ---
--- Begin Message ---
On Thu, 12 Aug 2004 15:38:02 -0400, Gryffyn, Trevor
<[EMAIL PROTECTED]> wrote:
> Just tossing out my 2cents..  Maybe there's a way or a reason, but HTTP
> connections are, by their nature, connectionless.  They send the data
> and close the connection.  I'm not sure why you'd want to keep a
> persistant connection to a specific page.
> 
> There are "Keep Alive" codes you can send that maintain a connection to
> the web server so you don't have to go through all the handshaking and
> stuff again (ok, I'm not using exact terms here, forgive me.. My
> networking is a bit rusty) but that doesn't keep you connected to a
> single PHP or HTML or ASP page, just the server.
> 
> Sounds like everything's behaving just as it was designed to and you're
> trying to do something really odd.  But maybe I'm just not getting what
> you're trying to do or something.
> 

Actually, this is something that's supported by the HTTP protocol. You
use the same TCP connection (stream) for multiple requests to the
webserver. It is a bit strange, but it's supported.

Sounds like the OPs webserver isn't allowing the persistent
connections to go through. Maybe Apache needs to be configured
differently. Or PHP might be doing it. Or maybe the client application
should be rewritten to not use persistent HTTP connections. ;-)

> Just what popped into my head when I read this.
> 
> -TG
> 
> 
> 
> > -----Original Message-----
> > From: d c [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 12, 2004 2:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] connection: close header
> >
> >
> > Hello,
> >
> > I am using php 4.3.4 on windows 2000 with iis 5 and isapi. We
> > recently switched from asp to php. There is an application
> > that we have that hits one of the pages to send some info,
> > and it uses persistant connections. The php page was not
> > working correctly, and a trace using ethereal showed that the
> > difference was the "Connection: close" header being sent with
> > the php page, while the "Connection" header was not present
> > in the asp page's response. I tried using the latest version
> > of php, and the header is still being sent.
> >
> > Is there a way to get iis to not close the connection with php?
> >
> > Thanks,
> > Dave
> >

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
It works correctly on Apache, but we need support for iis too. Unfortunately, I cannot 
change the client app. IIS is set up the same way as it was for the asp pages that 
work.

Justin Patrin <[EMAIL PROTECTED]> wrote:On Thu, 12 Aug 2004 15:38:02 -0400, Gryffyn, 
Trevor
wrote:
> Just tossing out my 2cents.. Maybe there's a way or a reason, but HTTP
> connections are, by their nature, connectionless. They send the data
> and close the connection. I'm not sure why you'd want to keep a
> persistant connection to a specific page.
> 
> There are "Keep Alive" codes you can send that maintain a connection to
> the web server so you don't have to go through all the handshaking and
> stuff again (ok, I'm not using exact terms here, forgive me.. My
> networking is a bit rusty) but that doesn't keep you connected to a
> single PHP or HTML or ASP page, just the server.
> 
> Sounds like everything's behaving just as it was designed to and you're
> trying to do something really odd. But maybe I'm just not getting what
> you're trying to do or something.
> 

Actually, this is something that's supported by the HTTP protocol. You
use the same TCP connection (stream) for multiple requests to the
webserver. It is a bit strange, but it's supported.

Sounds like the OPs webserver isn't allowing the persistent
connections to go through. Maybe Apache needs to be configured
differently. Or PHP might be doing it. Or maybe the client application
should be rewritten to not use persistent HTTP connections. ;-)

> Just what popped into my head when I read this.
> 
> -TG
> 
> 
> 
> > -----Original Message-----
> > From: d c [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 12, 2004 2:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] connection: close header
> >
> >
> > Hello,
> >
> > I am using php 4.3.4 on windows 2000 with iis 5 and isapi. We
> > recently switched from asp to php. There is an application
> > that we have that hits one of the pages to send some info,
> > and it uses persistant connections. The php page was not
> > working correctly, and a trace using ethereal showed that the
> > difference was the "Connection: close" header being sent with
> > the php page, while the "Connection" header was not present
> > in the asp page's response. I tried using the latest version
> > of php, and the header is still being sent.
> >
> > Is there a way to get iis to not close the connection with php?
> >
> > Thanks,
> > Dave
> >

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--


                
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

--- End Message ---
--- Begin Message ---
Alas, I cannot use the mail() function on Windows.  Someone told me about
this: http://www.phpguru.org/static/mime.mail.html  but attempts to get it
to work have been futile.  Does anyone else have a good and straightforward
solution for sending mail from a web page (results from a form).  Nothing
fancy, just plain text email.

Anne

--- End Message ---
--- Begin Message --- What happens when you try to use the mail function. Did you put your correct smpt-server in the php.ini?

Anne Shroeder wrote:

Alas, I cannot use the mail() function on Windows.  Someone told me about
this: http://www.phpguru.org/static/mime.mail.html  but attempts to get it
to work have been futile.  Does anyone else have a good and straightforward
solution for sending mail from a web page (results from a form).  Nothing
fancy, just plain text email.

Anne


-- Cory Wiles Systems Engineer ePerformax - Memphis, TN 901.751.4902 http://www.eperformax.com

--- End Message ---
--- Begin Message ---
Am I correcting thinking that, when you use the mail() function on the hosting server, 
the server will automatically pick up the SMTP server (i assume a hosting server will 
already have the SMTP-Server value in the php.ini file, which we do not have access 
to).

But if testing on a local server, for instance on your laptop/PC, you need to edit teh 
PHP.ini file so that the SMPT server value points to a valid SMTP server?

Thanks

Tryst

--- End Message ---
--- Begin Message ---
On Thu, 12 Aug 2004 17:42:57 -0400, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Am I correcting thinking that, when you use the mail() function on the hosting 
> server, the server will automatically pick up the SMTP server (i assume a hosting 
> server will already have the SMTP-Server value in the php.ini file, which we do not 
> have access to).
> 

On Linux, it uses the local mail agent. On Windows, yes, the hosting
provder should have it filled out.

> But if testing on a local server, for instance on your laptop/PC, you need to edit 
> teh PHP.ini file so that the SMPT server value points to a valid SMTP server?
> 
> Thanks
> 
> Tryst
> 

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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

On 08/12/2004 04:37 PM, Anne Shroeder wrote:
Alas, I cannot use the mail() function on Windows.  Someone told me about
this: http://www.phpguru.org/static/mime.mail.html  but attempts to get it
to work have been futile.  Does anyone else have a good and straightforward
solution for sending mail from a web page (results from a form).  Nothing
fancy, just plain text email.

You may want to try this other class that comes with a wrapper function named smtp_mail() that works exactly like the mail() except that it sends messages via an SMTP server of your choice. You can enable this class debug functions that output the progress of your message delivery. This way, you will be able to see exactly what is your problem and fix it without further wild guessing.


Just look at the test_smtp_mail.php example script.

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass


--

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 ---
hi list,
 
I set mssql.secure_connection = On in php.ini file and my php file is now successfully 
getting connected to the SQL 2000 database.
 
Thank u very much for ur help....special thanks to  Frank.
Regards,
penjo

Yahoo! India Matrimony: Find your life partneronline.

--- End Message ---

Reply via email to