php-windows Digest 6 Feb 2001 17:05:46 -0000 Issue 431
Topics (messages 5405 through 5418):
Converting apostrophes for insertion into Oracle
5405 by: Florian Clever
5411 by: Asendorf, John
5413 by: Woods Ron Contr SA-ALC/FMIS
5415 by: Pablo Vera
Re: COM and PHP
5406 by: Yoann Chevalier
Re: include woes
5407 by: Mangiola Nunzio Datavia
20 Million Fresh E-mail Addresses
5408 by: Luke
Changing PHP.INI Options on the fly ...
5409 by: Andreas Lange
5416 by: Pablo Vera
mssql empty (not null) varchar fields
5410 by: John Chronakis
5418 by: Frank M. Kromann
Help!!
5412 by: ���ؼ�
5417 by: Yoann Chevalier
ODBC-Links resource
5414 by: samsom, debra
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]
----------------------------------------------------------------------
Exactly repeating the quote will escape it.
But it is much better to not insert the values directly into the SQL
String but to bind them instead, as the DB (if Oracle or SQL Server or
whatever) does not have to parse the statement over and over again.
You also do not have to worry about repeating the quote when binding.
Also you do not have to worry about LONG columns.
Florian
Von: Andrian Pervazov <[EMAIL PROTECTED]>
Betreff: Re: [PHP-WIN] Converting apostrophes for insertion into Oracle
CC: [EMAIL PROTECTED]
For SQLServer and Oracle, the single quote is escaped by simply
repeating it. You can dio it by hand, but I believe this is what the
sybase magic quotes directive does as well.
Andrian
Christopher Derr wrote:
>
> I'm working on this same issue with my, don't laugh, Access 97 backend.
When
> users enter apostrophes into the field, it chokes on them. I've been
using
> urlencode and urldecode and that converts everything happily but makes
looking
> directly at the database entries painful:
>
> Let%5C%27s+test+apostrophes
>
> is actually Let's test apostrophes. Urldecode works it out on the web
end.
>
> I would imagine there are scripts to get the apostrophe's out, but
magic_quotes
> (from the PHP.ini file) and addslashes doesn't seem to do the trick...
>
> Chris
>
> "Asendorf, John" wrote:
>
> > The error comes up when you have something like this
> >
> > INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
> > VALUES("$Max_ID", "$SHORT_NAME")
> >
> > and $SHORT_NAME is empty so the SQL looks like this
> >
> > INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
VALUES("20002",
> > "") //doesn't work
> >
> > If I use the single quote or apostrophe, it works fine....
> >
> > INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
VALUES('20002',
> > '') //works fine
> >
> > > -----Original Message-----
> > > From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 05, 2001 4:39 PM
> > > To: Asendorf, John
> > > Subject: RE: [PHP-WIN] Converting apostrophes for insertion
> > > into Oracle
> > >
> > >
> > > That seams to be related to the name of the attribute(?)
> > > (filed), not the
> > > content of the attribute (filed). Or do I misinterpret the
> > > error message?
> > >
> > > >-----Original Message-----
> > > >From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> > > >Sent: Monday, February 05, 2001 10:21 PM
> > > >To: Pablo Vera; Php-Windows (E-mail)
> > > >Subject: RE: [PHP-WIN] Converting apostrophes for insertion
> > > into Oracle
> > > >
> > > >
> > > >Hi Pablo
> > > >
> > > >To answer your question, yes... It doesn't seem to like that
> > > >because the
> > > >field can be empty... for some reason Oracle won't allow you
> > > >to have an
> > > >empty field enclosed by two "'s... ORA-01741: illegal zero-length
> > > >identifier
> > > >
> > > >John
> > > >
> > > >> John:
> > > >>
> > > >> When you say that your SQL statement has apostrophes, you
> > > mean single
> > > >> quotes enclosing a string value ?, if this is the case, why not try
> > > >> changing the single quotes in your SQL for double quotes.
> > > >>
> > > >> Saludos,
> > > >> Pablo
> > > >> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> > > >>
> > > >> Monday, February 05, 2001, 3:03:21 PM, John wrote:
> > > >>
> > > >> AJ> I've got a web form that might have someone entering
> > > apostrophes.
> > > >> AJ> Unfortunately, my SQL statement has apostrophes in it and
> > > >> it seems to be
> > > >> AJ> messing it up...
> > > >>
> > > >> AJ> Any suggestions other than a regex (which I could do myself)?
> > > >>
> > > >> AJ> John
> > > >>
> > > >> AJ> ---------------------
> > > >> AJ> John Asendorf - [EMAIL PROTECTED]
> > > >> AJ> Web Applications Developer
> > > >> AJ> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > > >> AJ> Licking County, Ohio, USA
> > > >> AJ> 740-349-3631
> > > >>
> > > >> AJ> The benefit to the government of replacing all $1 Federal
> > > >> Reserve notes with
> > > >> AJ> $1 coins would be $522.2 million per year, according to
> > > >> estimates of the
> > > >> AJ> General Accouting Office released on April 7, 2000.
> > > >>
--
Florian Clever
[EMAIL PROTECTED]
http://www.Clever-Software-Solutions.de/
PGP Key @ ldap://certserver.pgp.net/
Any sufficiently advanced bug is indistinguishable from a feature. --
Rich Kulawiec
The only problem with that is that I truncated the actual SQL statement
which has about 15 variables it is updating... the combinations are
dizzying...
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.
> -----Original Message-----
> From: Pablo Vera [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 05, 2001 6:06 PM
> To: Php-Windows (E-mail)
> Subject: Re[2]: [PHP-WIN] Converting apostrophes for insertion into
> Oracle
>
>
> John:
>
> You could do something like this (I'm not sure if this will work):
>
> if (!isset($SHORT_NAME) || $SHORT_NAME=="") {
> $SQL="
> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
> VALUES(\"$Max_ID\", null)
> ";
> } else {
> $SQL="
> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
> VALUES(\"$Max_ID\", \"$SHORT_NAME\")
> ";
> }
>
> Saludos,
> Pablo
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Monday, February 05, 2001, 3:42:12 PM, John wrote:
>
> AJ> The error comes up when you have something like this
>
> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
> AJ> VALUES("$Max_ID", "$SHORT_NAME")
>
> AJ> and $SHORT_NAME is empty so the SQL looks like this
>
> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM,
> SHORT_NAME) VALUES("20002",
> AJ> "") //doesn't work
>
>
>
> AJ> If I use the single quote or apostrophe, it works fine....
>
> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM,
> SHORT_NAME) VALUES('20002',
> AJ> '') //works fine
>
>
>
>
> >> -----Original Message-----
> >> From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, February 05, 2001 4:39 PM
> >> To: Asendorf, John
> >> Subject: RE: [PHP-WIN] Converting apostrophes for insertion
> >> into Oracle
> >>
> >>
> >> That seams to be related to the name of the attribute(?)
> >> (filed), not the
> >> content of the attribute (filed). Or do I misinterpret the
> >> error message?
> >>
> >> >-----Original Message-----
> >> >From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> >> >Sent: Monday, February 05, 2001 10:21 PM
> >> >To: Pablo Vera; Php-Windows (E-mail)
> >> >Subject: RE: [PHP-WIN] Converting apostrophes for insertion
> >> into Oracle
> >> >
> >> >
> >> >Hi Pablo
> >> >
> >> >To answer your question, yes... It doesn't seem to like that
> >> >because the
> >> >field can be empty... for some reason Oracle won't allow you
> >> >to have an
> >> >empty field enclosed by two "'s... ORA-01741: illegal
> zero-length
> >> >identifier
> >> >
> >> >John
> >> >
> >> >> John:
> >> >>
> >> >> When you say that your SQL statement has apostrophes, you
> >> mean single
> >> >> quotes enclosing a string value ?, if this is the case,
> why not try
> >> >> changing the single quotes in your SQL for double quotes.
> >> >>
> >> >> Saludos,
> >> >> Pablo
> >> >> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> >> >>
> >> >> Monday, February 05, 2001, 3:03:21 PM, John wrote:
> >> >>
> >> >> AJ> I've got a web form that might have someone entering
> >> apostrophes.
> >> >> AJ> Unfortunately, my SQL statement has apostrophes in it and
> >> >> it seems to be
> >> >> AJ> messing it up...
> >> >>
> >> >> AJ> Any suggestions other than a regex (which I could
> do myself)?
> >> >>
> >> >> AJ> John
> >> >>
> >> >> AJ> ---------------------
> >> >> AJ> John Asendorf - [EMAIL PROTECTED]
> >> >> AJ> Web Applications Developer
> >> >> AJ> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> >> >> AJ> Licking County, Ohio, USA
> >> >> AJ> 740-349-3631
> >> >>
> >> >> AJ> The benefit to the government of replacing all $1 Federal
> >> >> Reserve notes with
> >> >> AJ> $1 coins would be $522.2 million per year, according to
> >> >> estimates of the
> >> >> AJ> General Accouting Office released on April 7, 2000.
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> 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]
> >> >>
> >> >
> >> >--
> >> >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]
> >> >
> >>
>
>
>
> --
> 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 had the exact same problem recently with one of my forms. The only way I
could resolve it was to convert all of the ' characters to a double
character combo like ~` using $instring=eregi_replace("'", "~`", $instring)
before the db insert/update and reversing it on the db selects.
Ron Woods/GAI
-----Original Message-----
From: Asendorf, John
To: Pablo Vera; Php-Windows (E-mail)
Sent: 2/6/01 8:26 AM
Subject: RE: Re[2]: [PHP-WIN] Converting apostrophes for insertion into Or
acle
The only problem with that is that I truncated the actual SQL statement
which has about 15 variables it is updating... the combinations are
dizzying...
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
The benefit to the government of replacing all $1 Federal Reserve notes
with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.
> -----Original Message-----
> From: Pablo Vera [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 05, 2001 6:06 PM
> To: Php-Windows (E-mail)
> Subject: Re[2]: [PHP-WIN] Converting apostrophes for insertion into
> Oracle
>
>
> John:
>
> You could do something like this (I'm not sure if this will work):
>
> if (!isset($SHORT_NAME) || $SHORT_NAME=="") {
> $SQL="
> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
> VALUES(\"$Max_ID\", null)
> ";
> } else {
> $SQL="
> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
> VALUES(\"$Max_ID\", \"$SHORT_NAME\")
> ";
> }
>
> Saludos,
> Pablo
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Monday, February 05, 2001, 3:42:12 PM, John wrote:
>
> AJ> The error comes up when you have something like this
>
> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
> AJ> VALUES("$Max_ID", "$SHORT_NAME")
>
> AJ> and $SHORT_NAME is empty so the SQL looks like this
>
> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM,
> SHORT_NAME) VALUES("20002",
> AJ> "") //doesn't work
>
>
>
> AJ> If I use the single quote or apostrophe, it works fine....
>
> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM,
> SHORT_NAME) VALUES('20002',
> AJ> '') //works fine
>
>
>
>
> >> -----Original Message-----
> >> From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
> >> Sent: Monday, February 05, 2001 4:39 PM
> >> To: Asendorf, John
> >> Subject: RE: [PHP-WIN] Converting apostrophes for insertion
> >> into Oracle
> >>
> >>
> >> That seams to be related to the name of the attribute(?)
> >> (filed), not the
> >> content of the attribute (filed). Or do I misinterpret the
> >> error message?
> >>
> >> >-----Original Message-----
> >> >From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> >> >Sent: Monday, February 05, 2001 10:21 PM
> >> >To: Pablo Vera; Php-Windows (E-mail)
> >> >Subject: RE: [PHP-WIN] Converting apostrophes for insertion
> >> into Oracle
> >> >
> >> >
> >> >Hi Pablo
> >> >
> >> >To answer your question, yes... It doesn't seem to like that
> >> >because the
> >> >field can be empty... for some reason Oracle won't allow you
> >> >to have an
> >> >empty field enclosed by two "'s... ORA-01741: illegal
> zero-length
> >> >identifier
> >> >
> >> >John
> >> >
> >> >> John:
> >> >>
> >> >> When you say that your SQL statement has apostrophes, you
> >> mean single
> >> >> quotes enclosing a string value ?, if this is the case,
> why not try
> >> >> changing the single quotes in your SQL for double quotes.
> >> >>
> >> >> Saludos,
> >> >> Pablo
> >> >> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> >> >>
> >> >> Monday, February 05, 2001, 3:03:21 PM, John wrote:
> >> >>
> >> >> AJ> I've got a web form that might have someone entering
> >> apostrophes.
> >> >> AJ> Unfortunately, my SQL statement has apostrophes in it and
> >> >> it seems to be
> >> >> AJ> messing it up...
> >> >>
> >> >> AJ> Any suggestions other than a regex (which I could
> do myself)?
> >> >>
> >> >> AJ> John
> >> >>
> >> >> AJ> ---------------------
> >> >> AJ> John Asendorf - [EMAIL PROTECTED]
> >> >> AJ> Web Applications Developer
> >> >> AJ> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> >> >> AJ> Licking County, Ohio, USA
> >> >> AJ> 740-349-3631
> >> >>
> >> >> AJ> The benefit to the government of replacing all $1 Federal
> >> >> Reserve notes with
> >> >> AJ> $1 coins would be $522.2 million per year, according to
> >> >> estimates of the
> >> >> AJ> General Accouting Office released on April 7, 2000.
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> 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]
> >> >>
> >> >
> >> >--
> >> >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]
> >> >
> >>
>
>
>
> --
> 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]
>
--
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]
John:
Then, what if you do this:
function fix_value($value) {
if (!isset($value) || $value=="") {
$value_sql="null"
} else {
$value_sql='"'.$value.'"';
}
return $value_sql;
}
$SQL="
INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME, FIELD3, ...)
VALUES(fix_value($Max_ID), fix_value($SHORT_NAME), fix_value($FIELD3), ...)
";
Saludos,
Pablo Vera
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Tuesday, February 06, 2001, 8:26:41 AM, John wrote:
AJ> The only problem with that is that I truncated the actual SQL statement
AJ> which has about 15 variables it is updating... the combinations are
AJ> dizzying...
AJ> ---------------------
AJ> John Asendorf - [EMAIL PROTECTED]
AJ> Web Applications Developer
AJ> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
AJ> Licking County, Ohio, USA
AJ> 740-349-3631
AJ> The benefit to the government of replacing all $1 Federal Reserve notes with
AJ> $1 coins would be $522.2 million per year, according to estimates of the
AJ> General Accouting Office released on April 7, 2000.
>> -----Original Message-----
>> From: Pablo Vera [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, February 05, 2001 6:06 PM
>> To: Php-Windows (E-mail)
>> Subject: Re[2]: [PHP-WIN] Converting apostrophes for insertion into
>> Oracle
>>
>>
>> John:
>>
>> You could do something like this (I'm not sure if this will work):
>>
>> if (!isset($SHORT_NAME) || $SHORT_NAME=="") {
>> $SQL="
>> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
>> VALUES(\"$Max_ID\", null)
>> ";
>> } else {
>> $SQL="
>> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
>> VALUES(\"$Max_ID\", \"$SHORT_NAME\")
>> ";
>> }
>>
>> Saludos,
>> Pablo
>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>
>> Monday, February 05, 2001, 3:42:12 PM, John wrote:
>>
>> AJ> The error comes up when you have something like this
>>
>> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM, SHORT_NAME)
>> AJ> VALUES("$Max_ID", "$SHORT_NAME")
>>
>> AJ> and $SHORT_NAME is empty so the SQL looks like this
>>
>> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM,
>> SHORT_NAME) VALUES("20002",
>> AJ> "") //doesn't work
>>
>>
>>
>> AJ> If I use the single quote or apostrophe, it works fine....
>>
>> AJ> INSERT into cfull2.tbl_dl_customers (CUSTID_NUM,
>> SHORT_NAME) VALUES('20002',
>> AJ> '') //works fine
>>
>>
>>
>>
>> >> -----Original Message-----
>> >> From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
>> >> Sent: Monday, February 05, 2001 4:39 PM
>> >> To: Asendorf, John
>> >> Subject: RE: [PHP-WIN] Converting apostrophes for insertion
>> >> into Oracle
>> >>
>> >>
>> >> That seams to be related to the name of the attribute(?)
>> >> (filed), not the
>> >> content of the attribute (filed). Or do I misinterpret the
>> >> error message?
>> >>
>> >> >-----Original Message-----
>> >> >From: Asendorf, John [mailto:[EMAIL PROTECTED]]
>> >> >Sent: Monday, February 05, 2001 10:21 PM
>> >> >To: Pablo Vera; Php-Windows (E-mail)
>> >> >Subject: RE: [PHP-WIN] Converting apostrophes for insertion
>> >> into Oracle
>> >> >
>> >> >
>> >> >Hi Pablo
>> >> >
>> >> >To answer your question, yes... It doesn't seem to like that
>> >> >because the
>> >> >field can be empty... for some reason Oracle won't allow you
>> >> >to have an
>> >> >empty field enclosed by two "'s... ORA-01741: illegal
>> zero-length
>> >> >identifier
>> >> >
>> >> >John
>> >> >
>> >> >> John:
>> >> >>
>> >> >> When you say that your SQL statement has apostrophes, you
>> >> mean single
>> >> >> quotes enclosing a string value ?, if this is the case,
>> why not try
>> >> >> changing the single quotes in your SQL for double quotes.
>> >> >>
>> >> >> Saludos,
>> >> >> Pablo
>> >> >> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>> >> >>
>> >> >> Monday, February 05, 2001, 3:03:21 PM, John wrote:
>> >> >>
>> >> >> AJ> I've got a web form that might have someone entering
>> >> apostrophes.
>> >> >> AJ> Unfortunately, my SQL statement has apostrophes in it and
>> >> >> it seems to be
>> >> >> AJ> messing it up...
>> >> >>
>> >> >> AJ> Any suggestions other than a regex (which I could
>> do myself)?
>> >> >>
>> >> >> AJ> John
>> >> >>
>> >> >> AJ> ---------------------
>> >> >> AJ> John Asendorf - [EMAIL PROTECTED]
>> >> >> AJ> Web Applications Developer
>> >> >> AJ> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
>> >> >> AJ> Licking County, Ohio, USA
>> >> >> AJ> 740-349-3631
>> >> >>
>> >> >> AJ> The benefit to the government of replacing all $1 Federal
>> >> >> Reserve notes with
>> >> >> AJ> $1 coins would be $522.2 million per year, according to
>> >> >> estimates of the
>> >> >> AJ> General Accouting Office released on April 7, 2000.
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> 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]
>> >> >>
>> >> >
>> >> >--
>> >> >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]
>> >> >
>> >>
>>
>>
>>
>> --
>> 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]
>>
Look at this example :
http://www.phpbuilder.com/columns/alain20001003.php3?page=3
I think you forgot to activate the workbook, then to select the sheet and
then to activate the sheet before writing into the cell !
Yoann.
----- Original Message -----
From: Conover, Ryan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, February 05, 2001 9:03 PM
Subject: [PHP-WIN] COM and PHP
> I have been trying the following example from the PHP developer's cookbook
> and it keeps giving me the following error.
>
> Parse error: parse error in c:\Inetpub\wwwroot/temp.php on line 4
> <? file://line 1
> $excel_handle = new COM("excel.application"); file://line2
> $excel_handle->Visible = false; file://line3
> $worksheet->Cells(1,1)->value = "Name"; file://line4
> $worksheet->SaveAs("temp.xls"); file://line5
> $excel_handle->quit(); file://line6
> file://line7
> ?> file://line8
>
> Anyone that has Com and PHP experience help please
>
> Ryan
>
>
>
> --
> 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 say got for Apache. If not that, then download the latest IIS4
from the internet. I tried to run PHP4 on IIS3 and I battled for
a week to get it going. Once I installed IIS4 it ran like a dream.
> ----------
> From: Matt Williams[SMTP:[EMAIL PROTECTED]]
> Sent: Friday, February 02, 2001 1:10 PM
> To: Php-Windows@Lists. Php. Net
> Subject: [PHP-WIN] include woes
>
> Hi All
>
> For some reason wer'e trying to set up php4 running on IIS3.
>
> Install and configuration went ok until I try to include files.
>
> If I call an include in index.php, if I go to the directory ie. /temp/ it
> will include the file. But if I call the file directly. ie /temp/index.php
> I
> get a CGI error. and no error log (typical)
>
> I've tried setting include_path in php.ini to . ./ with quotes and without
>
> I've tried using include"./include.php"; include "include.php" with no
> success
>
> Can anyone shed some light on this or do I have bin it and install
> Apache??
>
> TIA
>
> M@
>
> Matt Williams
> Web Development Manager
> Yewlands School
> [EMAIL PROTECTED]
> ------------------------
>
>
> --
> 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]
>
TO BE REMOVED FROM FUTURE MAILINGS, SIMPLY REPLY TO THIS
MESSAGE AND PUT
"REMOVE" IN THE SUBJECT.
20 MILLION
E-MAIL ADDRESSES
FOR ONLY $249
**Over Night International Shipping Included**
Many Call This "The "Perfect E-Mail List"
Over 20-Million Of The Best E-Mail Addresses Available
_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
Our research has found that many people have tried one or more of
the following...
Free Classifieds? (Don't work anymore)
Web Site? (Takes thousands of visitors)
Banners? (Expensive and losing their punch)
E-Zine? (Hope they have a *huge* subscriber list)
Search Engines? (Forget it, unless you're in the top 20)
S O W H A T W I L L W O R K ?
Although often misunderstood, there is one method that has proven
to succeed time-after-time.
E - M A I L M A R K E T I N G ! !
IT'S A FACT... If you're not using your computer to generate
income, GOOD income, you're leaving money on the table.
Here's what the experts have to say about E-Mail Marketing:
"E-mail is an incredible lead generation tool"
-Crains Magazine
"A gold mine for those who can take advantage of
bulk e-mail programs" - The New York Times
"Blows away traditional Mailing" - Advertising Age
Here's an example of your potential earnings if you have a
product or service that brings you a profit of around $30.
Remember, on the Internet, you can make money 7 days a week, 24
hours a day... even while you sleep, orders come from all over
the world!
Orders
Per Day Weekly Monthly Yearly
1 $ 210 $ 840 $ 10,080
2 420 1,680 20,160
3 630 2,520 30,240
5 1,050 4,200 50,400
10 2,100 8,400 100,000
15 3,150 12,600 151,200
THE QUESTION IS... how do you generate those orders?
The least expensive and fastest way is through E-Mail Marketing.
You want to make some money?
I can put you in touch with over 20 million people at virtually no cost.
Can you make one cent from each of theses names?
If you can you have a profit of over $200,000.00
That's right, I have over 20 Million Fresh email
addresses that I will sell for only $249. These are all
fresh addresses that include almost every English person
on the Internet today, with no duplications. They are
all sorted and ready to be mailed. That is the best
deal anywhere today!
Don't believe it? People are making that kind of
money right now by doing the same thing, that is
why you get so much email from people selling you
their product....it works!
These 20 Million email addresses are
yours to keep, so you can use them over and
over.
This offer is not for everyone. If you can not
see just how excellent the risk / reward ratio
in this offer is then there is nothing I can do
for you. To make money you must stop dreaming
and TAKE ACTION.
Over the past 2 years, we have gained a reputation for having the
cleanest, most responsive e-mail address lists in the industry.
No one has gone to the work it takes to produce an e-mail address
list of this quality.
Here's how we prepare our e-mail lists:
1. We clean and eliminate all duplicates.
2. Next, we use a filter list of 400+ words/phrases to clean even
more. No address with inappropriate or profane wording survives!
3. Then we use our private database of thousands of known
Internet "extremists", those opposed to any kind of commercial
e-mail, and kicked off every one we could find.
4. All domains were verified to insure they're valid.
5. And finally, we sorted the list into easy-to-manage packets of
20,000 addresses in simple text (.txt) format that will work with
any computer operating system.
******************************************
It is time to order!
Shipping is not an issue.
******FedEx next day world wide shipping included********
As soon as we receive payment we will FedEx your e-mail list via
CD straight to your door anywhere in the world FedEx next day guaranteed.
******International Orders Welcome*********
US funds paid via paypal.com welcomed
PayPal is now available in the following countries:
Australia
Austria
Belgium
Brazil
Canada
Denmark
France
Germany
Hong Kong
Ireland
Israel
Italy
Japan
Mexico
Netherlands
New Zealand
Norway
Portugal
Singapore
South Africa
South Korea
Spain
Sweden
Switzerland
United Kingdom
PayPal.com is very easy to sign up to. They accept wire transfers,
checks and credit cards from any of the countries listed above.
This payment process is in your own interest of safety. Paypal.com
processes all transactions and keeps all your personal information
secret. After signing up please send the U.S. equivalent of $249
to [EMAIL PROTECTED] last name Smith.
If there is another way you would like to pay please e-mail me
at [EMAIL PROTECTED] and I will get back to you.
*******Wondering out how to send 20 million E-mails********
I will tell you how/where to download the softwhere you need for free
Please NOTE:
Congress shall make no law respecting an establishment of religion, or
prohibiting the free exercise thereof, or abridging the freedom of speech
or of the press; or the right of the people peaceably to assemble, and to
petition the Government for a redress of grievances.
Amendment I, The US Constitution
hi,
has anyone a quick-documentation on how to modify php.ini options via
Apaches .htaccess. I know, that this is possible (i read it somewhere,
but can't remember where).
Things i need to changein PHP4 Session Management:
- use no cookies.
- name of the session.
- directory for storing the session-files
any help out there? ;)
CodeDuck
CodeDuck:
>From the PHP Manual, Section I.3 Configuration:
"The configuration file
The configuration file (called php3.ini in PHP 3.0, and simply
php.ini as of PHP 4.0) is read when PHP starts up. For the
server module versions of PHP, this happens only once when the
web server is started. For the CGI version, it happens on
every invocation.
When using PHP as an Apache module, you can also change the
configuration settings using directives in Apache configuration
files and .htaccess files.
With PHP 3.0, there are Apache directives that correspond to each
configuration setting in the php3.ini name, except the name is
prefixed by "php3_".
With PHP 4.0, there are just a few Apache directives that allow you
to change the PHP configuration settings.
php_value name value
This sets the value of the specified variable.
php_flag name on|off
This is used to set a Boolean configuration option.
php_admin_value name value
This sets the value of the specified variable. "Admin"
configuration settings can only be set from within the main
Apache configuration files, and not from .htaccess files.
php_admin_flag name on|off
This is used to set a Boolean configuration option.
You can view the settings of the configuration values in the output
of phpinfo(). You can also access the values of individial
configuration settings using get_cfg_var()."
Examples:
php_value sendmail_from [EMAIL PROTECTED]
php_value SMTP myserver.com
So, to change a setting, you would have a script that writes to a
.htaccess file on a specified directory and then redirect to a second
script that would run from that same directory, using the new
settings. .htaccess files are read everytime a request is received
from a browser and the requested file is searched for. If you have
.htaccess files on all the directories that make up a path to the
file, Apache will read and merge all of this and act on the result.
For example, if the browser is requesting: /dir1/dir2/dir3/script.php
Apache will read the .htaccess file on your htdocs, then the one in
/dir1, then the one from /dir1/dir2 and so on until it finds
script.php, all the .htaccess files read are merged into one resulting
.htaccess and this will determine permissions, settings, etc. for that
particular script.
I hope all this makes sense.
Saludos,
Pablo
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Tuesday, February 06, 2001, 4:23:08 AM, Andreas wrote:
AL> hi,
AL> has anyone a quick-documentation on how to modify php.ini options via
AL> Apaches .htaccess. I know, that this is possible (i read it somewhere,
AL> but can't remember where).
AL> Things i need to changein PHP4 Session Management:
AL> - use no cookies.
AL> - name of the session.
AL> - directory for storing the session-files
AL> any help out there? ;)
AL> CodeDuck
Hello,
>From habbit and an unexplained hate to NULLs I do not use them in my
databases.
I use varchar fields with empty strings ('') instead.
However MSSQL via the php4 module, returns these values as a single space
character,
and it forces me to trim all the returned varchar fields, before using them.
This happens only if I query the database from php. In the query analyzer,
the empty varchars
are returned as empty strings.
I have tried to call SET ANSI_PADDING off, before quering the database, but
no change.
Do you have any clues?
vmp
The PHP extension for MSSQL shoud strip leading and trailing spaces, but I check the
code and fix it if there is an error.
- Frank
>Hello,
>
>>From habbit and an unexplained hate to NULLs I do not use them in my
>databases.
>I use varchar fields with empty strings ('') instead.
>However MSSQL via the php4 module, returns these values as a single space
>character,
>and it forces me to trim all the returned varchar fields, before using them.
>
>This happens only if I query the database from php. In the query analyzer,
>the empty varchars
>are returned as empty strings.
>I have tried to call SET ANSI_PADDING off, before quering the database, but
>no change.
>
>Do you have any clues?
>
>vmp
>
>
>
>
>--
>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]
>
>
>
Hi!It's nice to meet you.I have a problem of php's com for windows.
Can you use an example( sourse codes) to teach me how to write a php's program of com
to connect and use word & frontpage.
Thank you very much!!
Max 2000.2.6
This is an example for Word !!
http://www.phpbuilder.com/columns/alain20001003.php3?page=2
Yoann.
----- Original Message -----
From: ���ؼ� <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 2:15 PM
Subject: [PHP-WIN] Help!!
Hi!It's nice to meet you.I have a problem of php's com for windows.
Can you use an example( sourse codes) to teach me how to write a php's
program of com to connect and use word & frontpage.
Thank you very much!!
Max 2000.2.6
After upgrading to PHP4.0.4-win-20001210 I am now getting the following
errors on my odbc_close statement:
Warning: Supplied argument is not a valid ODBC_Link resource in (path of
.php file). What am I doing wrong, or what am I missing.
$conn = odbc_connect("PO_Hist", "userid", "password");
$q = 'Select * from PH_Hist';
$cursor = odbc_exec($conn, $q);
while (odbc_fetch_row ($cursor) == true)
{
$vendor =odbc_result($cursor, "Vendor Name");
$buyer =odbc_result($cursor, "Buyer Name");
etc etc....
$x = odbc_close($conn); (here is where I get the error)
Debra Samsom
Bristol Aerospace Ltd.
(204) 775-8331 3402
[EMAIL PROTECTED]