php-windows Digest 7 Mar 2001 07:58:05 -0000 Issue 478
Topics (messages 5849 through 5855):
Re: A sample of system function on Windows!!
5849 by: Tom Mathews
Re: Sending HTML Mails
5850 by: UHL Fabrice
5851 by: Michael Rudel
Re: Help with ODBC to Access query
5852 by: Asendorf, John
Help with ODBC to Access query [Solved]
5853 by: S. William Schulz
Problem using readfile()
5854 by: Matias Pelenur
Win32 PHP, Apache Web Server, and Mail
5855 by: Adrian Gould
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]
----------------------------------------------------------------------
This is a segment taken straight from Julie Meloni's PHP Essentials. I've
used a variation of this on my WinNT dev pc with no problems at all.
Tom
<?
$time = time();
$msg = "Sender's Full Name:\t$sender_name\n";
$msg .= "Sender's E-Mail:\t$sender_email\n";
$msg .= "Secret Message?\t$secret_msg\n\n";
putenv("PGPPATH=pubring.gpg");
$clear = "/path/to/data";
$clear .= "$time";
$crypted = "/path/to/secure/data";
$crypted .= "$time";
$fp = fopen("$clear", "w+");
fputs($fp, $msg);
fclose($fp);
system("/usr/local/bin/pgpe -r
'Your Name <[EMAIL PROTECTED]>' -o $crypted -a $clear");
unlink("$clear");
?>
Antonio Lopez wrote:
> Can anyone give me a sample code of system function on Windows ?
>
> I've tried it, and it's seems that doesn't work!!!
>
> thank you!!
>
> ===================================================
> Antonio López Luna
> Ingeniería e Integración Avanzadas (Ingenia), S.A.
> Parque Tecnológico de Andalucía
> 29590 - Málaga (Spain)
>
> Tel. 34-952029300 Ext. 386
> Fax. 34-952029309
> Web: http://www.ingenia.es
>
> --
> PHP Windows 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]
hello all,
could someone tell me how I could send an email that is in HTML format ?
what I would like to do is to include an image into the mail that is
clickable.
thanks !
Hi UHL!
You can find a php-class serving your favors at:
URL: http://phpclasses.upperdesign.com/browse.html?package=32
You have to login (register), but it's for free, they have good
stuff and you don't get spammed or even receive ads-emails.
Hope this helps.
Greetinx,
Mike
Michael Rudel
- Web-Development, Systemadministration -
_______________________________________________________________
Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
_______________________________________________________________
-----Original Message-----
From: UHL Fabrice [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 06, 2001 2:01 PM
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Sending HTML Mails
hello all,
could someone tell me how I could send an email that is in HTML format ?
what I would like to do is to include an image into the mail that is
clickable.
thanks !
I guess I'd suggest breaking it down in to more digestible parts and find
your problems...
e.g. try #1 $query1 = 'SELECT COUNT(RunNumber) AS RunCount,
> DatePart("m", CallDate) AS MonNum
> FROM CallData';
try #2 $query1 = 'SELECT COUNT(RunNumber) AS RunCount,
> DatePart("m", CallDate) AS MonNum
> FROM CallData
> WHERE (CallDate Between #1/1/00# AND #12/31/00#)';
etc....
this will help you pinpoint your problem
As a note, I'm not so sure you need the () around your between statement
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Aut insanit homo, aut versus facit
> -----Original Message-----
> From: S. William Schulz [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 05, 2001 3:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Help with ODBC to Access query
>
>
> Hello,
>
> I'm trying to get the following query to work:
>
> $query1 = 'SELECT COUNT(RunNumber) AS RunCount,
> DatePart("m", CallDate) AS MonNum
> FROM CallData
> WHERE (CallDate Between #1/1/00# AND #12/31/00#)
> AND Driver = 1731
> GROUP BY DatePart("m", CallDate)';
>
> It returns the following error:
>
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few
> parameters. Expected 1., SQL state 07001 in SQLExecDirect in
> d:\internet\apache\htdocs\db\test.php on line 48
>
> Line 48 is : $result = odbc_exec($connect, $query1);
>
> The connection is established okay, as other queries work:
>
>
> $query2 = "SELECT RunNumber, CallDate AS TDate,
> CallUnit, CallDutyCrew
> AS Crew, PtNum, NatureFull, Driver, Attendant1, Attendant2
> FROM CallData
> WHERE (CallDate Between #1/1/00# AND #12/31/00#)
> AND Attendant1 = $id
> ORDER BY RunNumber";
>
> I've tried escaping the m's in the DatePart (I initially used
> double-quotes
> " " around the query string), tried changing the COUNT(RunNumber) to
> COUNT(*), etc without success. The query runs fine as
> written if entered
> directly into Access.
>
> Any ideas?
>
> SWS
>
>
> --
> PHP Windows 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'd like to thank everyone for their responses... After trying many
variations, I finally figured it out. By changing the single quotes back
to double quotes (normally some of the parameters to the where clause are
variables), I changed the double quotes around the first DatePart argument
to single quotes, and it worked.
$query1 = "SELECT COUNT(RunNumber) AS RunCount, DatePart('m', CallDate)
AS MonNum
FROM CallData
WHERE (CallDate Between #1/1/$year# AND #12/31/$year#)
AND Driver = $driver
GROUP BY DatePart('m', CallDate)";
Thanks again,
SWS
>>I'm trying to get the following query to work:
>>
>> $query1 = 'SELECT COUNT(RunNumber) AS RunCount,
>> DatePart("m", CallDate) AS MonNum
>> FROM CallData
>> WHERE (CallDate Between #1/1/00# AND #12/31/00#)
>> AND Driver = 1731
>> GROUP BY DatePart("m", CallDate)';
>>
>>It returns the following error:
>>
>>Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few
>>parameters. Expected 1., SQL state 07001 in SQLExecDirect in
>>d:\internet\apache\htdocs\db\test.php on line 48
Hi,
I'm trying to use readfile to send a file to the browser. The code I'm using
is:
header("Content-length: $size");
header("Content-type: $type");
header("Content-disposition: attachment;filename=$filename");
readfile($filename);
It works fine for very small files, but for larger files it seems to send
the first 600 bytes and then hang... I tried with both IE and Netscape and
have the same problem.
I'm using Apache 1.3.14 and PHP/4.0.4pl1 on Win2000 (using the PHP module
for Apache)
Any hints appreciated. Thanks!
--Matias
If you reply via email, please remove the -nospam- from the address.
Hi all
I am new to PHP and am having real hassles with my Apache / Windows set up
and PHP when i want to send mail.
I get a "server misconfiguration" error from Apache, but I cannot see where
the error is, or if it is in fact PHP which is misconfigured.
I have the settings in PHP.INI
[mail function]
SMTP = idris.curtin.edu.au ;for
win32 only
sendmail_from = [EMAIL PROTECTED] ;for win32 only
;sendmail_path = ;for unix
only, may supply arguments as well (default is 'sendmail -t -i')
I'm lost
any ideas anyone?
Ady