php-windows Digest 23 Jul 2001 10:13:52 -0000 Issue 664

Topics (messages 8433 through 8446):

IMAP/POP3 Administration API?
        8433 by: Christopher Cheng
        8434 by: Dave Mertens
        8435 by: Christopher Cheng
        8436 by: Dave Mertens

Re: IIS situation - php as an ISAPI
        8437 by: Paul Richards
        8440 by: Phil Driscoll

Re: [PHP-DEV] Re: IMAP/POP3 Administration API?
        8438 by: George Schlossnagle
        8439 by: Sterling Hughes
        8444 by: Nashirak Bossk
        8445 by: Joey Smith

HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000
        8441 by: Stephen

MySql to Oracle 8
        8442 by: Dhanie

I'm a PHP Newbie: I want to check if the referer is from a certain domain
        8443 by: Joshua Prowse

Import filters
        8446 by: Ziggi

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]


----------------------------------------------------------------------


Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail) written
in PHP?
I am looking for API to write a signup page for users.






On Sun, Jul 22, 2001 at 07:41:01PM +0800, Christopher Cheng wrote:
> Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail) written
> in PHP?
> I am looking for API to write a signup page for users.


Have to tried http://www.php.net/imap ?? Great source for API's ;-)

Dave Mertens




Have looked through it already. None of them allows me to add/delete users


"Dave Mertens" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Sun, Jul 22, 2001 at 07:41:01PM +0800, Christopher Cheng wrote:
> > Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail)
written
> > in PHP?
> > I am looking for API to write a signup page for users.
>
>
> Have to tried http://www.php.net/imap ?? Great source for API's ;-)
>
> Dave Mertens






> > > Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail)
> written
> > > in PHP?
> > > I am looking for API to write a signup page for users.

> > Have to tried http://www.php.net/imap ?? Great source for API's ;-)

> Have looked through it already. None of them allows me to add/delete users

Most mailserver use the users that exist on the mail server. An mail user is also an 
regular user (Althru most of them get an fake shell)
. To add, modify or delete such user you need root privilegde. Webserver such as 
Apache run with a user nobody (or similair) which have as less access to the system as 
possible.

Because php is than also running as user 'nobody'. And then you can't add, modify or 
delete users. 

If you still want to build a mailuser webinterface, here's how to do-it:
- first make sure only 'localhost' can access the site. Use an port different from 
'80'.

To edit the /etc/passwd there's a file in the php4 source directory /pear/files. This 
file is called 'Passwd.php' which you can use to edit the /etc/passwd and similair 
files..

Because every mail server have it own config files, it's not possible to create an 
'generic' API. I advise you to download some other web-interfaces for sendmail
so you can see how they're handling the files.

Good luck.

Dave Mertens
 




Wouldn't that have quite a big effect on the performance of IIS/PHP ?

What exactly are the problems with the ISAPI version ?

Paul


"Phil Driscoll" <[EMAIL PROTECTED]> wrote in message
01072010052202.01275@linux">news:01072010052202.01275@linux...
> The ISAPI version of PHP is not stable. Switch to the cgi version.
> --
> Phil Driscoll






On Sunday 22 July 2001 15:35, Paul Richards wrote:
> Wouldn't that have quite a big effect on the performance of IIS/PHP ?
>
> What exactly are the problems with the ISAPI version ?
>

There is a performance hit in using the cgi - but as this is involved in 
starting up and shutting down php.exe, the more complex your script are, the 
less noticeable is the performance degradation. I've been using PHP as a cgi 
on production NT boxes for 18 months without any problems, but I guess the 
traffic on these boxes would be regarded as moderate (30000 page impressions 
per day, all generated by PHP?MySQL or cgi stuff I wrote in C).

Because IIS is a multi threaded server there are issues regarding the thread 
safety of some bits of PHP code. Much work has already been done to fix 
things but it is seriously hard stuff to debug, and there are clearly still 
issues which need fixing - I only we could find them!

Cheers
-- 
Phil Driscoll




Sounds like a cyrus-imap extension for imap (which allows many 
authentication methods, most of which don't need system-level users) 
would be a good thing.

George

On Sunday, July 22, 2001, at 11:32 AM, Dave Mertens wrote:

>>>> Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail)
>> written
>>>> in PHP?
>>>> I am looking for API to write a signup page for users.
>
>>> Have to tried http://www.php.net/imap ?? Great source for API's ;-)
>
>> Have looked through it already. None of them allows me to add/delete 
>> users
>
> Most mailserver use the users that exist on the mail server. An mail 
> user is also an regular user (Althru most of them get an fake shell)
> . To add, modify or delete such user you need root privilegde. 
> Webserver such as Apache run with a user nobody (or similair) which 
> have as less access to the system as possible.
>
> Because php is than also running as user 'nobody'. And then you can't 
> add, modify or delete users.
>
> If you still want to build a mailuser webinterface, here's how to do-it:
> - first make sure only 'localhost' can access the site. Use an port 
> different from '80'.
>
> To edit the /etc/passwd there's a file in the php4 source directory 
> /pear/files. This file is called 'Passwd.php' which you can use to edit 
> the /etc/passwd and similair files..
>
> Because every mail server have it own config files, it's not possible 
> to create an 'generic' API. I advise you to download some other 
> web-interfaces for sendmail
> so you can see how they're handling the files.
>
> Good luck.
>
> Dave Mertens
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>




I wrote one...

http://www.designmultimedia.com/cyrus/php_extension.html

Never did have the time to commit it though, as its still in development 
(well, not currently, but when I get some free time :).

-Sterling

George Schlossnagle wrote:

> Sounds like a cyrus-imap extension for imap (which allows many 
> authentication methods, most of which don't need system-level users) 
> would be a good thing.
> 
> George
> 
> On Sunday, July 22, 2001, at 11:32 AM, Dave Mertens wrote:
> 
>>>>> Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail)
>>>> 
>>> written
>>> 
>>>>> in PHP?
>>>>> I am looking for API to write a signup page for users.
>>>> 
>> 
>>>> Have to tried http://www.php.net/imap ?? Great source for API's ;-)
>>> 
>> 
>>> Have looked through it already. None of them allows me to add/delete 
>>> users
>> 
>> 
>> Most mailserver use the users that exist on the mail server. An mail 
>> user is also an regular user (Althru most of them get an fake shell)
>> . To add, modify or delete such user you need root privilegde. 
>> Webserver such as Apache run with a user nobody (or similair) which 
>> have as less access to the system as possible.
>> 
>> Because php is than also running as user 'nobody'. And then you can't 
>> add, modify or delete users.
>> 
>> If you still want to build a mailuser webinterface, here's how to do-it:
>> - first make sure only 'localhost' can access the site. Use an port 
>> different from '80'.
>> 
>> To edit the /etc/passwd there's a file in the php4 source directory 
>> /pear/files. This file is called 'Passwd.php' which you can use to 
>> edit the /etc/passwd and similair files..
>> 
>> Because every mail server have it own config files, it's not possible 
>> to create an 'generic' API. I advise you to download some other 
>> web-interfaces for sendmail
>> so you can see how they're handling the files.
>> 
>> Good luck.
>> 
>> Dave Mertens
>> 
>> 
>> -- 
>> PHP Development Mailing List <http://www.php.net/>
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> 






I have a suggestion:  You could use procmail and if you had a mailserver like
exim.  Set up a list of aliases and then have them all forward into 1 account
then the procmailrc file in that one account sends the info to various files
or users.  To add and delete users all you would have to do is make php write
to a aliases file and a procmailrc file, which would be easy enough.


Sterling Hughes wrote:

> I wrote one...
>
> http://www.designmultimedia.com/cyrus/php_extension.html
>
> Never did have the time to commit it though, as its still in development
> (well, not currently, but when I get some free time :).
>
> -Sterling
>
> George Schlossnagle wrote:
>
> > Sounds like a cyrus-imap extension for imap (which allows many
> > authentication methods, most of which don't need system-level users)
> > would be a good thing.
> >
> > George
> >
> > On Sunday, July 22, 2001, at 11:32 AM, Dave Mertens wrote:
> >
> >>>>> Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail)
> >>>>
> >>> written
> >>>
> >>>>> in PHP?
> >>>>> I am looking for API to write a signup page for users.
> >>>>
> >>
> >>>> Have to tried http://www.php.net/imap ?? Great source for API's ;-)
> >>>
> >>
> >>> Have looked through it already. None of them allows me to add/delete
> >>> users
> >>
> >>
> >> Most mailserver use the users that exist on the mail server. An mail
> >> user is also an regular user (Althru most of them get an fake shell)
> >> . To add, modify or delete such user you need root privilegde.
> >> Webserver such as Apache run with a user nobody (or similair) which
> >> have as less access to the system as possible.
> >>
> >> Because php is than also running as user 'nobody'. And then you can't
> >> add, modify or delete users.
> >>
> >> If you still want to build a mailuser webinterface, here's how to do-it:
> >> - first make sure only 'localhost' can access the site. Use an port
> >> different from '80'.
> >>
> >> To edit the /etc/passwd there's a file in the php4 source directory
> >> /pear/files. This file is called 'Passwd.php' which you can use to
> >> edit the /etc/passwd and similair files..
> >>
> >> Because every mail server have it own config files, it's not possible
> >> to create an 'generic' API. I advise you to download some other
> >> web-interfaces for sendmail
> >> so you can see how they're handling the files.
> >>
> >> Good luck.
> >>
> >> Dave Mertens
> >>
> >>
> >> --
> >> PHP Development Mailing List <http://www.php.net/>
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >>

--
-------------------------------

Clayton Bluhm

Computer Engineering Student

[EMAIL PROTECTED]






Please kill this thread, or at least have the decency to limit it to
php-general, to which it belongs. There is no need to EVER cross-post
in this manner!

On Sun, 22 Jul 2001, Dave Mertens wrote the following to Christopher Cheng :

> On Sun, Jul 22, 2001 at 07:41:01PM +0800, Christopher Cheng wrote:
> > Is there any IMAP/POP3 API/Modules of Linux email system (Sendmail) written
> > in PHP?
> > I am looking for API to write a signup page for users.
> 
> 
> Have to tried http://www.php.net/imap ?? Great source for API's ;-)
> 
> Dave Mertens
> 
> 





Hi,
I've been trying to find information on this, and none of them directly tell
me what I am missing.

I have IIS on Windows 2000 Professional.  I have installed PHP as a CGI
module via the installshield (phpinfo() runs ok, so the installation appears
ok).

I look at the list of server variables, and $DOCUMENT_ROOT is not listed.

I don't think this is the same as doc-root in the php.ini.

Can somebody advise as to what I am doing wrong?
I am trying not to install the ISAPI DLLs.

Thank you for your time.

--Stephen






Guys, How to translate this "mysql" mode to Oracle mode...
Please help me..
 
Thanks.
 
Dhanie Angel
 
/*************************************/
<?
// Define MYSQL server information
$server = 'localhost';      // MYSQL server;
$user = 'root';         // User to connect to MYSQL server;
$password = '';        // Password;
$database = 'guestbook';     // The name of the database;
$table = 'guestbook';          // The name of your database table;
 
$maxshow = 5; 
 
?>
...
<?
mysql_connect($server, $user, $password) or die ("Can't connect!");
mysql_select_db($database) or die ("Can't open database!");
$sql = "SELECT * FROM $table ORDER BY id ASC";
$result = mysql_db_query($database, $sql);
if ($result)
{
$count = mysql_num_rows($result);
$sqlshow = "SELECT * FROM $table ORDER BY id ASC LIMIT $show, $maxshow";
$result = mysql_db_query($database, $sqlshow);
 
while (($myrow = mysql_fetch_array($result)))
{?>
  <center>
 
<table border="0" width="99%" height="20" align="center">
</tr>
  <tr>
    <td width="3%" bgcolor="#66CCFF" height="39" align="center"><?echo htmlspecialchars($myrow["id"]);?></td>
    <td width="19%" bgcolor="#66CCFF" height="39"><? echo htmlspecialchars($myrow["name"]);?></td>
    <td width="19%" bgcolor="#66CCFF" height="39"><?echo htmlspecialchars($myrow["email"]);?></td>
    <td width="16%" bgcolor="#66CCFF" height="39"><?echo htmlspecialchars($myrow["message"]);?></td>
    <td width="20%" bgcolor="#66CCFF" height="39"><?echo htmlspecialchars($myrow["date"]);?></td>
   
</tr>
</table>
</center></div>
<div align="center">
</div>
<?}
 
}
else
echo "Error!";
mysql_close();
...
 
?>
 
/****************************************/




What I want to do: When a user views the page, I want to check whether
they're coming from another page on my site or whether this is the first
page that they're viewing.  If it's the first page, then I want to echo some
code to the browser (it will read the cookie file for my site)

This is the code that I tried to use:
[code]
global $HTTP_REFERER;

$refp = parse_url($HTTP_REFERER);
$refr = $refp[host];

if ($refr != "rideau.prowsej.com")
{
echo "insert javascript here that the browser will execute";
}
[/code]

- My domain is rideau.prowsej.com
- The above code didn't seem to work.

It seemed that a lot of the time, the referer was null.  Under what
conditions would the referer be null (where could I read about the
$HTTP_REFERER variable?)

Any help is much appreciated.  Thanks.

- Joshua Prowse
Rideau High School Student






Hello !

I just want to know is are ther any import filters interfacing between PHP
and Word / Excel files, so that the content of these documents could be
outputed to HTML ? I mean my customer wants to write new text in Word and he
wants this text to be presented on their webpage. The text can be saved as
.doc or .rtf. Thus PHP could access this file "suck" the text out of it and
put it into HTML but how to ???

Thanks for hints,
Ziggi




Reply via email to