php-windows Digest 3 Oct 2003 19:21:46 -0000 Issue 1939

Topics (messages 21657 through 21671):

Re: php_tidy.dll ?
        21657 by: toby z
        21658 by: Ignatius Reilly

Re: Send Email with an attachment - SOLVED
        21659 by: Disko_kex

Re: [PHP] Getting PHP to work under IIS 6.0
        21660 by: Jay Blanchard
        21661 by: Joseph Tate

weird random parse errors on PHP 4.1.x / Win2k
        21662 by: Francesco.Marsan.bmg.com
        21663 by: Charles P. Killmer
        21664 by: Geoffrey C. Speicher

Mysql Purge script
        21665 by: Php2tor
        21667 by: Svensson, B.A.T. (HKG)
        21668 by: Ryan Vesely
        21669 by: Svensson, B.A.T. (HKG)
        21670 by: Ryan Vesely

is there a way to access UNO?
        21666 by: Leonardo Javier Belén

Shortcut
        21671 by: Charles P. Killmer

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 ---
pardon ma ignorance

whats tidy.ll for ????

toby ..... 
:$

 --- Ignatius Reilly <[EMAIL PROTECTED]> wrote: > Hello,
> 
> I  am trying to use the Tidy extension found on Frank Kromann's
> site
> http://kromann.info/pecl.php (php_tidy.dll, libtidy.dll), but it
> does not
> work ("Can not load the specified module")
> 
> Has anyone got it to work under PHP 4.3.3?
> 
> Thanks
> 
> Ignatius
> _________________________
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>  

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

--- End Message ---
--- Begin Message ---
its usd to trsfrm a html str into xhtml

so tht u can traverse it w xpath

ig
_________________________
----- Original Message -----
From: "toby z" <[EMAIL PROTECTED]>
To: "Ignatius Reilly" <[EMAIL PROTECTED]>; "Win32 list PHP"
<[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 9:12 AM
Subject: Re: [PHP-WIN] php_tidy.dll ?


> pardon ma ignorance
>
> whats tidy.ll for ????
>
> toby .....
> :$
>
>  --- Ignatius Reilly <[EMAIL PROTECTED]> wrote: > Hello,
> >
> > I  am trying to use the Tidy extension found on Frank Kromann's
> > site
> > http://kromann.info/pecl.php (php_tidy.dll, libtidy.dll), but it
> > does not
> > work ("Can not load the specified module")
> >
> > Has anyone got it to work under PHP 4.3.3?
> >
> > Thanks
> >
> > Ignatius
> > _________________________
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> ________________________________________________________________________
> Want to chat instantly with your online friends?  Get the FREE Yahoo!
> Messenger http://mail.messenger.yahoo.co.uk
>

--- End Message ---
--- Begin Message ---
I found an example on the web.

<?php 
$fileatt = ""; // Path to the file                  
$fileatt_type = "application/octet-stream"; // File Type 
$fileatt_name = ""; // Filename that will be used for the file as the
attachment 

$email_from = ""; // Who the email is from 
$email_subject = ""; // The Subject of the email 
$email_txt = ""; // Message that the email has in it 

$email_to = ""; // Who the email is too 

$headers = "From: ".$email_from; 

$file = fopen($fileatt,'rb'); 
$data = fread($file,filesize($fileatt)); 
fclose($file); 

$semi_rand = md5(time()); 
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; 
    
$headers .= "\nMIME-Version: 1.0\n" . 
            "Content-Type: multipart/mixed;\n" . 
            " boundary=\"{$mime_boundary}\""; 

$email_message .= "This is a multi-part message in MIME format.\n\n" . 
                "--{$mime_boundary}\n" . 
                "Content-Type:text/html; charset=\"iso-8859-1\"\n" . 
               "Content-Transfer-Encoding: 7bit\n\n" . 
$email_txt . "\n\n"; 

$data = chunk_split(base64_encode($data)); 

$email_message .= "--{$mime_boundary}\n" . 
                  "Content-Type: {$fileatt_type};\n" . 
                  " name=\"{$fileatt_name}\"\n" . 
                  //"Content-Disposition: attachment;\n" . 
                  //" filename=\"{$fileatt_name}\"\n" . 
                  "Content-Transfer-Encoding: base64\n\n" . 
                 $data . "\n\n" . 
                  "--{$mime_boundary}--\n"; 

$ok = @mail($email_to, $email_subject, $email_message, $headers); 

if($ok) { 
echo "<font face=verdana size=2>The file was successfully sent!</font>";

} else { 
die("Sorry but the email could not be sent. Please go back and try
again!"); 
} 
?> 





-----Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED] 
Sent: den 2 oktober 2003 16:33
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Send Email with an attachment

Hi,

How can I send an email with an attachment? In this case a .pdf file.

I found this in the php-manual.

mail("[EMAIL PROTECTED]", "the subject", $message,
     "From: xxx\r\n"
    ."Reply-To: xxx\r\n"
    ."X-Mailer: PHP/" . phpversion());

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

--- End Message ---
--- Begin Message ---
[snip]
Has anyone been able to get PHP working fully under IIS 6.0?  If so, try

the following script:

<?PHP
print_r(shell_exec('dir'));
?>

I get "Warning: shell_exec() [function.shell-exec]: Unable to execute" 
whenever I try this or any other shell_exec or back tick (`) shell
function.

I've tried running in IIS 5.0 isolation mode, and setting all kinds of 
execution permissions to no avail.
[/snip]

6.0 or 5.0 (you mention both)?

AFAIK print_r(shell_exec('dir')); will not work for several reasons...

shell_exec(`dir`) would not return an array, so print_r for that would
be unable to execute. Have you tried opendir() and readdir()? That is
the way to get a directory listing.

Try this;

$var = shell_exec(`dir`);
echo $var;

--- End Message ---
--- Begin Message --- Jay Blanchard wrote:
[snip]
Has anyone been able to get PHP working fully under IIS 6.0?  If so, try

the following script:

<?PHP
print_r(shell_exec('dir'));
?>

I get "Warning: shell_exec() [function.shell-exec]: Unable to execute" whenever I try this or any other shell_exec or back tick (`) shell
function.


I've tried running in IIS 5.0 isolation mode, and setting all kinds of execution permissions to no avail.
[/snip]


6.0 or 5.0 (you mention both)?

AFAIK print_r(shell_exec('dir')); will not work for several reasons...

shell_exec(`dir`) would not return an array, so print_r for that would
be unable to execute. Have you tried opendir() and readdir()? That is
the way to get a directory listing.

Try this;

$var = shell_exec(`dir`);
echo $var;

print_r worked when I ran php from the command line. print_r when it's not an array acts just like print.


IIS 6.0 is the target platform. It has a feature where you can run in "IIS 5.0 Isolation Mode", supposedly to make applications that can't run properly under the new security model of IIS 6.0. This doesn't work for php. And the error I get is that shell_exec couldn't execute.

My application is not actually running `dir`, I'm running an ImageMagick identify/convert operation, but that's the simplest script that reproduces the problem. Maybe the ImageMagick pecl library is my only hope.

Joseph
--- End Message ---
--- Begin Message ---
Hi Geoff, I've seen your message on the PHP/Windows list, and I'm writing
because I get the **exact** same problem on my box:

HP Proliant dual Xeon 2,8Mhz - 1GB RAM
PHP 4.2.2
Apache 1.3.22

On myne it happens even if just one user is accessing the pages. On another
server -- it is a little bit older dual Pentium 1.1GHZ -- but with exactly
the same software, the problem does not appear.

Have you any clue to give me? Did you solve your problem?

Thanks
Francesco

--- End Message ---
--- Begin Message ---
I don't know if this is related but every once in a while I get timeout
issues.  A script that usually runs just fine will timeout on line 2 or
3.  

A few times it has been on a line like this.

If (isset($REMOTE_ADDR)) {
   //stuff
}

The if statement is the line that times out.

Just a weird thing that I havent solved yet.

Charles Killmer

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 03, 2003 9:56 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP-WIN] weird random parse errors on PHP 4.1.x / Win2k


Hi Geoff, I've seen your message on the PHP/Windows list, and I'm
writing because I get the **exact** same problem on my box:

HP Proliant dual Xeon 2,8Mhz - 1GB RAM
PHP 4.2.2
Apache 1.3.22

On myne it happens even if just one user is accessing the pages. On
another server -- it is a little bit older dual Pentium 1.1GHZ -- but
with exactly the same software, the problem does not appear.

Have you any clue to give me? Did you solve your problem?

Thanks
Francesco

--- End Message ---
--- Begin Message ---
On Fri, Oct 03, 2003 at 04:56:23PM +0200, [EMAIL PROTECTED] wrote:
> Hi Geoff, I've seen your message on the PHP/Windows list, and I'm writing
> because I get the **exact** same problem on my box:
>
> HP Proliant dual Xeon 2,8Mhz - 1GB RAM
> PHP 4.2.2
> Apache 1.3.22
>
> On myne it happens even if just one user is accessing the pages. On another
> server -- it is a little bit older dual Pentium 1.1GHZ -- but with exactly
> the same software, the problem does not appear.
>
> Have you any clue to give me? Did you solve your problem?

Hmm... it was for a client of ours, and it was a couple years ago,
so I'm not really 100% sure, but I believe it was solved by moving
to a uniprocessor machine.

Good luck.

Geoff

--- End Message ---
--- Begin Message ---
Does anyone have a script that will purge a MySQL DB that has entries over
30 days old?

--- End Message ---
--- Begin Message ---
DELETE FROM <table(s)>
WHERE <some-date-attribute-converted-to-days> > <than-30-days>


-----Original Message-----
From: Php2tor
To: [EMAIL PROTECTED]
Sent: 3-10-2003 18:15
Subject: [PHP-WIN] Mysql Purge script

Does anyone have a script that will purge a MySQL DB that
has entries over 30 days old?

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

--- End Message ---
--- Begin Message ---
This assumes one of the columns on your DB is RecordCreated:

$today = getdate();
$year = $today['year'];
$month = $today['mon'];
$day = $today['mday'];
$hours = $today['hours'];
$minutes = $today['minutes'];
$seconds = $today['seconds'];
$RecordCreated = $year."-".$month."-".$day."
".$hours.":".$minutes.":".$seconds;


$delete_query = "DELETE from $table1 where (TO_DAYS(Now()) -
TO_DAYS(RecordCreated) >= 30));";
$execute_delete = mysql_query($delete_query) or die ("delete failed");

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

Ryan Vesely     
Sales Engineer  
Pinnacor        
685 Market Street, Suite 500    
San Francisco, CA 94105 
tel              415.369.4762                                   
fax              415.512.2085                                   

www.pinnacor.com <http://www.pinnacor.com/>  

The preceding e-mail message contains privileged, confidential information.
Intended conveyance is only to designated and named recipient(s). If you
feel that you may have received this message in error or if you are not the
named recipient, please notify Pinnacor at once at the sender's email
address, or call 212.691.7900. Unauthorized use, dissemination, distribution
or reproduction of this message is strictly prohibited and may be unlawful.




-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:27 AM
To: 'Php2tor '; '[EMAIL PROTECTED] '
Subject: RE: [PHP-WIN] Mysql Purge script


DELETE FROM <table(s)>
WHERE <some-date-attribute-converted-to-days> > <than-30-days>


-----Original Message-----
From: Php2tor
To: [EMAIL PROTECTED]
Sent: 3-10-2003 18:15
Subject: [PHP-WIN] Mysql Purge script

Does anyone have a script that will purge a MySQL DB that
has entries over 30 days old?

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

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

--- End Message ---
--- Begin Message ---
As well as it assumes that a delete trigger takes care of 
any dependent existences with other rows in other tables.

Secondly, what is the purpose of all assignments below?

-----Original Message-----
From: Ryan Vesely
To: 'Php2tor '; '[EMAIL PROTECTED] '
Sent: 3-10-2003 18:35
Subject: RE: [PHP-WIN] Mysql Purge script

This assumes one of the columns on your DB is RecordCreated:

$today = getdate();
$year = $today['year'];
$month = $today['mon'];
$day = $today['mday'];
$hours = $today['hours'];
$minutes = $today['minutes'];
$seconds = $today['seconds'];
$RecordCreated = $year."-".$month."-".$day."
".$hours.":".$minutes.":".$seconds;


$delete_query = "DELETE from $table1 where (TO_DAYS(Now()) -
TO_DAYS(RecordCreated) >= 30));";
$execute_delete = mysql_query($delete_query) or die ("delete failed");

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

Ryan Vesely     
Sales Engineer  
Pinnacor        
685 Market Street, Suite 500    
San Francisco, CA 94105 
tel              415.369.4762                                   
fax              415.512.2085                                   

www.pinnacor.com <http://www.pinnacor.com/>  

The preceding e-mail message contains privileged, confidential
information.
Intended conveyance is only to designated and named recipient(s). If you
feel that you may have received this message in error or if you are not
the
named recipient, please notify Pinnacor at once at the sender's email
address, or call 212.691.7900. Unauthorized use, dissemination,
distribution
or reproduction of this message is strictly prohibited and may be
unlawful.




-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:27 AM
To: 'Php2tor '; '[EMAIL PROTECTED] '
Subject: RE: [PHP-WIN] Mysql Purge script


DELETE FROM <table(s)>
WHERE <some-date-attribute-converted-to-days> > <than-30-days>


-----Original Message-----
From: Php2tor
To: [EMAIL PROTECTED]
Sent: 3-10-2003 18:15
Subject: [PHP-WIN] Mysql Purge script

Does anyone have a script that will purge a MySQL DB that
has entries over 30 days old?

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

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

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

--- End Message ---
--- Begin Message ---
just one way to create record created.  not really relevant to the delete
statement, other than for reference.

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

Ryan Vesely     
Sales Engineer  
Pinnacor        
685 Market Street, Suite 500    
San Francisco, CA 94105 
tel              415.369.4762                                   
fax              415.512.2085                                   

www.pinnacor.com <http://www.pinnacor.com/>  

The preceding e-mail message contains privileged, confidential information.
Intended conveyance is only to designated and named recipient(s). If you
feel that you may have received this message in error or if you are not the
named recipient, please notify Pinnacor at once at the sender's email
address, or call 212.691.7900. Unauthorized use, dissemination, distribution
or reproduction of this message is strictly prohibited and may be unlawful.




-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:57 AM
To: ''[EMAIL PROTECTED] ' '
Subject: RE: [PHP-WIN] Mysql Purge script


As well as it assumes that a delete trigger takes care of 
any dependent existences with other rows in other tables.

Secondly, what is the purpose of all assignments below?

-----Original Message-----
From: Ryan Vesely
To: 'Php2tor '; '[EMAIL PROTECTED] '
Sent: 3-10-2003 18:35
Subject: RE: [PHP-WIN] Mysql Purge script

This assumes one of the columns on your DB is RecordCreated:

$today = getdate();
$year = $today['year'];
$month = $today['mon'];
$day = $today['mday'];
$hours = $today['hours'];
$minutes = $today['minutes'];
$seconds = $today['seconds'];
$RecordCreated = $year."-".$month."-".$day."
".$hours.":".$minutes.":".$seconds;


$delete_query = "DELETE from $table1 where (TO_DAYS(Now()) -
TO_DAYS(RecordCreated) >= 30));";
$execute_delete = mysql_query($delete_query) or die ("delete failed");

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

Ryan Vesely     
Sales Engineer  
Pinnacor        
685 Market Street, Suite 500    
San Francisco, CA 94105 
tel              415.369.4762                                   
fax              415.512.2085                                   

www.pinnacor.com <http://www.pinnacor.com/>  

The preceding e-mail message contains privileged, confidential
information.
Intended conveyance is only to designated and named recipient(s). If you
feel that you may have received this message in error or if you are not
the
named recipient, please notify Pinnacor at once at the sender's email
address, or call 212.691.7900. Unauthorized use, dissemination,
distribution
or reproduction of this message is strictly prohibited and may be
unlawful.




-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:27 AM
To: 'Php2tor '; '[EMAIL PROTECTED] '
Subject: RE: [PHP-WIN] Mysql Purge script


DELETE FROM <table(s)>
WHERE <some-date-attribute-converted-to-days> > <than-30-days>


-----Original Message-----
From: Php2tor
To: [EMAIL PROTECTED]
Sent: 3-10-2003 18:15
Subject: [PHP-WIN] Mysql Purge script

Does anyone have a script that will purge a MySQL DB that
has entries over 30 days old?

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

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

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

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

--- End Message ---
--- Begin Message ---
Hi all!
    Id like to access Sun's StarOffice/OpenOffice.org from PHP, but I found
it almost impossible. Has anyone succeded on doing this?
Leo. AFIP-AR.

--- End Message ---
--- Begin Message ---
Does anyone have any code that will create a windows .lnk file?
 
Charles Killmer
 

--- End Message ---

Reply via email to