php-windows Digest 24 May 2002 08:41:02 -0000 Issue 1159

Topics (messages 13938 through 13960):

mySQL and ODBC
        13938 by: Eric Tonicello
        13940 by: Asendorf, John

Cannot load ISAPI Filter DLL
        13939 by: Rich Gray
        13944 by: Rich Gray

Passing Variables
        13941 by: Opere, James
        13942 by: Michael Virnstein
        13951 by: Nicole Amashta
        13952 by: Nicole Amashta

Re: [PHP] Passing Variables
        13943 by: Jay Blanchard

basic form processing
        13945 by: Bill Hudspeth
        13946 by: Scott Carr
        13947 by: Dash McElroy
        13953 by: Nicole Amashta
        13955 by: Nicole Amashta
        13956 by: Dash McElroy

CGI-Trouble with Win2000
        13948 by: Jan Schmitz

IIS COM problem
        13949 by: RS Herhuth
        13954 by: Alan Brown

Re: Varying Results Creating Table
        13950 by: Nicole Amashta
        13957 by: Tim Greenleaf

problem with mail - again
        13958 by: Afan Pasalic
        13959 by: Manuel Lemos

php & events & DOM
        13960 by: steve.mediadome.net

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 !

There is an equivalent of :

mySQL_insert()

in :

Unified ODBC functions ???

Thanks for any help !


_______________________________________________

Eric TONICELLO

Faculty of Architecture, Civil and Environmental Engineering
SWISS FEDERAL INSTITUTE OF TECHNOLOGY LAUSANNE

Email : [EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
I don't believe so.  I've gone to using adoDB ( http://php.weblogs.com/ADODB
) for everything.  Perhaps it has a solution for you?  I know it has a
get_insert type of statement, but I've never used it.

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit


> -----Original Message-----
> From: Eric Tonicello [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 9:30 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-WIN] mySQL and ODBC
> 
> 
> Hi !
> 
> There is an equivalent of :
> 
> mySQL_insert()
> 
> in :
> 
> Unified ODBC functions ???
> 
> Thanks for any help !
> 
> 
> _______________________________________________
> 
> Eric TONICELLO
> 
> Faculty of Architecture, Civil and Environmental Engineering
> SWISS FEDERAL INSTITUTE OF TECHNOLOGY LAUSANNE
> 
> Email : [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Win2K IIS5.0
PHP 4.2.1

I am trying to configure IIS to load PHP as an ISAPI module - but every time
the service starts I get the following error in the event log...

The HTTP Filter DLL C:\WINNT\system32\php4isapi.dll failed to load. The data
is the error.
0000: e6 03 00 00               æ...

Can anyone help?
TIA
Rich

--- End Message ---
--- Begin Message ---
Sorted...

I did put the php4isapi.dll in system32 and it successfully loaded after I
also dropped the php4ts.dll into the same folder...

Thanks for your reply anyway
Cheers
Rich

----- Original Message -----
From: "Brian McGarvie" <[EMAIL PROTECTED]>
To: "Rich Gray" <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 6:56 AM
Subject: RE: [PHP-WIN] Cannot load ISAPI Filter DLL


> it shouldnt be in C:\WINNT\system32\ (unless ya put it there) try
> looking in c:\php\sapi\
>
> > -----Original Message-----
> > From: Rich Gray [mailto:[EMAIL PROTECTED]]
> > Sent: 23 May 2002 10:40 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Cannot load ISAPI Filter DLL
> >
> >
> > Win2K IIS5.0
> > PHP 4.2.1
> >
> > I am trying to configure IIS to load PHP as an ISAPI module -
> > but every time
> > the service starts I get the following error in the event log...
> >
> > The HTTP Filter DLL C:\WINNT\system32\php4isapi.dll failed to
> > load. The data
> > is the error.
> > 0000: e6 03 00 00               æ...
> >
> > Can anyone help?
> > TIA
> > Rich
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

--- End Message ---
--- Begin Message ---
Hi All,
 I'm trying to pass variables from one form to the other.I have a problem
when i want to do the the following:
1.COUNT($variable)
2.DISTINCT($variable)
.............
I realise i can not use the brackets in my query and the variable be
recognised.When i add COUNT without the brackets i still get an error.
Example.
test.html
<form action="me.php" method="post">
<input type="text" name="this">
 ..............
This is sent to :

me.php
<?php 
$db=mysql_connect('localhost','','');
mysql_select_db($database,$db);
$sql="select COUNT($this) from $table group by  $this";
................
?>
 This  gives an error.
Please help.

--- End Message ---
--- Begin Message ---
$this usually is a self-reference inside a class.
Use it with care!
try to "echo $sql;", perhaps this tells you more.

Regards Michael

"James Opere" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN">news:FC788AB9771FD6118E6F0002A5AD7B8F7268AB@ICRAFNTTRAIN...
> Hi All,
>  I'm trying to pass variables from one form to the other.I have a problem
> when i want to do the the following:
> 1.COUNT($variable)
> 2.DISTINCT($variable)
> .............
> I realise i can not use the brackets in my query and the variable be
> recognised.When i add COUNT without the brackets i still get an error.
> Example.
> test.html
> <form action="me.php" method="post">
> <input type="text" name="this">
>  ..............
> This is sent to :
>
> me.php
> <?php
> $db=mysql_connect('localhost','','');
> mysql_select_db($database,$db);
> $sql="select COUNT($this) from $table group by  $this";
> ................
> ?>
>  This  gives an error.
> Please help.
>


--- End Message ---
--- Begin Message ---
Why do you need the group by clause? Do one or the other, not both.

either do a

select count(id) from table
or

select field, count(id) from table group by field

Check your query,

Nicole Amashta
www.aeontrek.com

James Opere wrote:
> Hi All,
>  I'm trying to pass variables from one form to the other.I have a problem
> when i want to do the the following:
> 1.COUNT($variable)
> 2.DISTINCT($variable)
> .............
> I realise i can not use the brackets in my query and the variable be
> recognised.When i add COUNT without the brackets i still get an error.
> Example.
> test.html
> <form action="me.php" method="post">
> <input type="text" name="this">
>  ..............
> This is sent to :
> 
> me.php
> <?php 
> $db=mysql_connect('localhost','','');
> mysql_select_db($database,$db);
> $sql="select COUNT($this) from $table group by  $this";
> ................
> ?>
>  This  gives an error.
> Please help.
> 

--- End Message ---
--- Begin Message ---
What error do you get?

James Opere wrote:
> Hi All,
>  I'm trying to pass variables from one form to the other.I have a problem
> when i want to do the the following:
> 1.COUNT($variable)
> 2.DISTINCT($variable)
> .............
> I realise i can not use the brackets in my query and the variable be
> recognised.When i add COUNT without the brackets i still get an error.
> Example.
> test.html
> <form action="me.php" method="post">
> <input type="text" name="this">
>  ..............
> This is sent to :
> 
> me.php
> <?php 
> $db=mysql_connect('localhost','','');
> mysql_select_db($database,$db);
> $sql="select COUNT($this) from $table group by  $this";
> ................
> ?>
>  This  gives an error.
> Please help.
> 

--- End Message ---
--- Begin Message ---
[snip]
me.php
<?php 
$db=mysql_connect('localhost','','');
mysql_select_db($database,$db);
$sql="select COUNT($this) from $table group by  $this";
................
?>
[/snip]

<?php 
$db=mysql_connect('localhost','','');
mysql_select_db($database,$db);
$sql="select COUNT" . $this . " from" . $table . " group by" .  $this . ";
................
?>

Note the concatenation operators, HTH!

Jay

--- End Message ---
--- Begin Message ---
I am new to PHP and have been trying without success to process a very
simple form. My basic problem is trying to pass variables from a form to
another page, and to echo them in a results page.



I understand that the most recent versions of PHP allow you to pass
user-entered form variables in the $_POST or $_GET associative arrays. I
have set the "register_globals = off" in my php.ini file (under C:\winnt,
running Win2000 and Microsoft IIS). When I try to submit the form, the
results page is displayed without the values of the two form variables. I
would very much appreciate some help with this simple problem. The basic
code for my form (form_a.php) is:



************************************************************************

<HTML>

<HEAD>

  <TITLE>Test Form One</TITLE>

</HEAD>

<BODY>

<B>

<H2>Test Form One</H2>



 Fill out the information below

<FORM ACTION='results_1.php'>

  Your First Name: <INPUT TYPE="Text" NAME="FirstName">

  <BR>Your Last Name: <INPUT TYPE="Text" NAME="LastName">

  <BR><INPUT TYPE="submit" VALUE="Submit Data">

</FORM>

</B>

</BODY>

</HTML>

************************************************************************

The target page that displays the form variables (results_1.php) is as
follows:



<HTML>

<HEAD>

  <TITLE>Results from Form One</TITLE>

</HEAD>

<BODY>

<B>

<H2>Results from Form One</H2>

<?PHP

  echo "Thanks $_POST[FirstName] $_POST[LastName]";

?>

</B>

</BODY>

</HTML>



Thanks in advance, Bill


--- End Message ---
--- Begin Message ---
Try:

echo "Thanks " . $_POST['FirstName'] . " " . $_POST['LastName']";

-- 
Scott Carr
OpenOffice.org
Whiteboard-Doc Maintainer
http://whiteboard.openoffice.org/doc/


Quoting Bill Hudspeth <[EMAIL PROTECTED]>:

> I am new to PHP and have been trying without success to process a very
> simple form. My basic problem is trying to pass variables from a form to
> another page, and to echo them in a results page.
> 
> 
> 
> I understand that the most recent versions of PHP allow you to pass
> user-entered form variables in the $_POST or $_GET associative arrays. I
> have set the "register_globals = off" in my php.ini file (under C:\winnt,
> running Win2000 and Microsoft IIS). When I try to submit the form, the
> results page is displayed without the values of the two form variables. I
> would very much appreciate some help with this simple problem. The basic
> code for my form (form_a.php) is:
> 
> 
> 
> ************************************************************************
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Test Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Test Form One</H2>
> 
> 
> 
>  Fill out the information below
> 
> <FORM ACTION='results_1.php'>
> 
>   Your First Name: <INPUT TYPE="Text" NAME="FirstName">
> 
>   <BR>Your Last Name: <INPUT TYPE="Text" NAME="LastName">
> 
>   <BR><INPUT TYPE="submit" VALUE="Submit Data">
> 
> </FORM>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> ************************************************************************
> 
> The target page that displays the form variables (results_1.php) is as
> follows:
> 
> 
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Results from Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Results from Form One</H2>
> 
> <?PHP
> 
>   echo "Thanks $_POST[FirstName] $_POST[LastName]";
> 
> ?>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> 
> 
> Thanks in advance, Bill
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Change this line:

<FORM ACTION='results_1.php'>

to:

<FORM ACTION='results_1.php' method=POST>

-Dash

-----Original Message-----
From: Bill Hudspeth [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 8:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] basic form processing


I am new to PHP and have been trying without success to process a very
simple form. My basic problem is trying to pass variables from a form to
another page, and to echo them in a results page.



I understand that the most recent versions of PHP allow you to pass
user-entered form variables in the $_POST or $_GET associative arrays. I
have set the "register_globals = off" in my php.ini file (under C:\winnt,
running Win2000 and Microsoft IIS). When I try to submit the form, the
results page is displayed without the values of the two form variables. I
would very much appreciate some help with this simple problem. The basic
code for my form (form_a.php) is:



************************************************************************

<HTML>

<HEAD>

  <TITLE>Test Form One</TITLE>

</HEAD>

<BODY>

<B>

<H2>Test Form One</H2>



 Fill out the information below

<FORM ACTION='results_1.php'>

  Your First Name: <INPUT TYPE="Text" NAME="FirstName">

  <BR>Your Last Name: <INPUT TYPE="Text" NAME="LastName">

  <BR><INPUT TYPE="submit" VALUE="Submit Data">

</FORM>

</B>

</BODY>

</HTML>

************************************************************************

The target page that displays the form variables (results_1.php) is as
follows:



<HTML>

<HEAD>

  <TITLE>Results from Form One</TITLE>

</HEAD>

<BODY>

<B>

<H2>Results from Form One</H2>

<?PHP

  echo "Thanks $_POST[FirstName] $_POST[LastName]";

?>

</B>

</BODY>

</HTML>



Thanks in advance, Bill



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

YOu need to specify in yor form tag the post as the method

  >>  <FORM ACTION='results_1.php'>

  <FORM ACTION='results_1.php' method="post">
....
</form>

By default, I think it uses GET as the submit method if you don't 
specify it in the form tag.

Nicole Amashta
www.aeontrek.com

Bill Hudspeth wrote:
> I am new to PHP and have been trying without success to process a very
> simple form. My basic problem is trying to pass variables from a form to
> another page, and to echo them in a results page.
> 
> 
> 
> I understand that the most recent versions of PHP allow you to pass
> user-entered form variables in the $_POST or $_GET associative arrays. I
> have set the "register_globals = off" in my php.ini file (under C:\winnt,
> running Win2000 and Microsoft IIS). When I try to submit the form, the
> results page is displayed without the values of the two form variables. I
> would very much appreciate some help with this simple problem. The basic
> code for my form (form_a.php) is:
> 
> 
> 
> ************************************************************************
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Test Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Test Form One</H2>
> 
> 
> 
>  Fill out the information below
> 
> <FORM ACTION='results_1.php'>
> 
>   Your First Name: <INPUT TYPE="Text" NAME="FirstName">
> 
>   <BR>Your Last Name: <INPUT TYPE="Text" NAME="LastName">
> 
>   <BR><INPUT TYPE="submit" VALUE="Submit Data">
> 
> </FORM>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> ************************************************************************
> 
> The target page that displays the form variables (results_1.php) is as
> follows:
> 
> 
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Results from Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Results from Form One</H2>
> 
> <?PHP
> 
>   echo "Thanks $_POST[FirstName] $_POST[LastName]";
> 
> ?>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> 
> 
> Thanks in advance, Bill
> 
> 

--- End Message ---
--- Begin Message ---
Sorry for the double reply ! I didn't see this ...

;)

Dash McElroy wrote:
> Change this line:
> 
> <FORM ACTION='results_1.php'>
> 
> to:
> 
> <FORM ACTION='results_1.php' method=POST>
> 
> -Dash
> 
> -----Original Message-----
> From: Bill Hudspeth [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, May 23, 2002 8:58 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] basic form processing
> 
> 
> I am new to PHP and have been trying without success to process a very
> simple form. My basic problem is trying to pass variables from a form to
> another page, and to echo them in a results page.
> 
> 
> 
> I understand that the most recent versions of PHP allow you to pass
> user-entered form variables in the $_POST or $_GET associative arrays. I
> have set the "register_globals = off" in my php.ini file (under C:\winnt,
> running Win2000 and Microsoft IIS). When I try to submit the form, the
> results page is displayed without the values of the two form variables. I
> would very much appreciate some help with this simple problem. The basic
> code for my form (form_a.php) is:
> 
> 
> 
> ************************************************************************
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Test Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Test Form One</H2>
> 
> 
> 
>  Fill out the information below
> 
> <FORM ACTION='results_1.php'>
> 
>   Your First Name: <INPUT TYPE="Text" NAME="FirstName">
> 
>   <BR>Your Last Name: <INPUT TYPE="Text" NAME="LastName">
> 
>   <BR><INPUT TYPE="submit" VALUE="Submit Data">
> 
> </FORM>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> ************************************************************************
> 
> The target page that displays the form variables (results_1.php) is as
> follows:
> 
> 
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Results from Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Results from Form One</H2>
> 
> <?PHP
> 
>   echo "Thanks $_POST[FirstName] $_POST[LastName]";
> 
> ?>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> 
> 
> Thanks in advance, Bill
> 
> 
> 

--- End Message ---
--- Begin Message ---
No probs.

Quick reminder: If you see the variables in the URL, it's GET. If you don't,
it's POST.

-Dash

-----Original Message-----
From: Nicole Amashta [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 2:59 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] basic form processing


Sorry for the double reply ! I didn't see this ...

;)

Dash McElroy wrote:
> Change this line:
> 
> <FORM ACTION='results_1.php'>
> 
> to:
> 
> <FORM ACTION='results_1.php' method=POST>
> 
> -Dash
> 
> -----Original Message-----
> From: Bill Hudspeth [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, May 23, 2002 8:58 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] basic form processing
> 
> 
> I am new to PHP and have been trying without success to process a very
> simple form. My basic problem is trying to pass variables from a form to
> another page, and to echo them in a results page.
> 
> 
> 
> I understand that the most recent versions of PHP allow you to pass
> user-entered form variables in the $_POST or $_GET associative arrays. I
> have set the "register_globals = off" in my php.ini file (under C:\winnt,
> running Win2000 and Microsoft IIS). When I try to submit the form, the
> results page is displayed without the values of the two form variables. I
> would very much appreciate some help with this simple problem. The basic
> code for my form (form_a.php) is:
> 
> 
> 
> ************************************************************************
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Test Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Test Form One</H2>
> 
> 
> 
>  Fill out the information below
> 
> <FORM ACTION='results_1.php'>
> 
>   Your First Name: <INPUT TYPE="Text" NAME="FirstName">
> 
>   <BR>Your Last Name: <INPUT TYPE="Text" NAME="LastName">
> 
>   <BR><INPUT TYPE="submit" VALUE="Submit Data">
> 
> </FORM>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> ************************************************************************
> 
> The target page that displays the form variables (results_1.php) is as
> follows:
> 
> 
> 
> <HTML>
> 
> <HEAD>
> 
>   <TITLE>Results from Form One</TITLE>
> 
> </HEAD>
> 
> <BODY>
> 
> <B>
> 
> <H2>Results from Form One</H2>
> 
> <?PHP
> 
>   echo "Thanks $_POST[FirstName] $_POST[LastName]";
> 
> ?>
> 
> </B>
> 
> </BODY>
> 
> </HTML>
> 
> 
> 
> Thanks in advance, Bill
> 
> 
> 


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

we've a lot of trouble using PHP on IIS5/Win2000sp2-Server.
The machine is a 2xPIII(1,3Ghz), 1280MB RAM, really fast.
The problem is that sometimes the IIS doesn't execute the php.exe, instead
it shows a "CGI Application error - wrong or incomplete header data...."
This problem only occurs on this fast server and only with a website that
uses frames.
I suppose that the IIS launches different threads to render the frames and
isn't able to do the IO to the php.exe for every thread.
To test this we wrote a little script wich shows 12 Frames, filled with a
little PHP-Skript that only shows one line of text.
On the slow machine theres no problem.
On the fast machine, same software, we get the cgi-error in round about
every 50th or 60th frame (refresh..)

Thanks for any hint.

Regards,

Jan Schmitz




--- End Message ---
--- Begin Message ---

I just switched over from Apache to IIS and followed the installation and
configuration instructions to the letter.  My php test pages work fine and
everything seems to be in order except that my pages that use COM
functionality now generate the error below.


CODE -----------

<?php

// convert a Word doc to an HTML file
$DocumentPath = str_replace("\\\\", "\\", $_GET["DocumentPath"]);

// THIS IS THE LINE THAT GENERATES THE ERROR
$word = new COM("word.application") or die("Unable to instantiate
application object");

// creating an instance of the Word Document object
$wordDocument = new COM("word.document") or die("Unable to instantiate
document object");

// open up an empty document
$wordDocument = $word->Documents->Open($DocumentPath);

// create the filename for the HTML version
$HTMLPath = substr_replace($DocumentPath, 'html', -3, 3);

// save the document as HTML
$wordDocument->SaveAs($HTMLPath, 8);

// clean up
$wordDocument = null;
$word->Quit();
$word = null;

echo "<a href='$HTMLPath'>load...</a>";

?>



ERROR ---------------

Warning: Unable to obtain IDispatch interface for CLSID
{000209FF-0000-0000-C000-000000000046}: Access is denied. in
c:\inetpub\wwwroot\COM\htmlviewer.php on line 9




This worked fine under Apache.

Thanks,
Ron

--- End Message ---
--- Begin Message ---
Guessing I would suggest that you examine the permissions on the file
referenced by $DocumentPath and see if IUSR_<MACHINE> has read permssion. If
not, either run the site as a user with permission or grant the IUSR read
permission on the document.

Alan.
----- Original Message -----
From: "RS Herhuth" <[EMAIL PROTECTED]>
To: "Php-Windows@Lists. Php. Net" <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 16:54
Subject: [PHP-WIN] IIS COM problem


>
> I just switched over from Apache to IIS and followed the installation and
> configuration instructions to the letter.  My php test pages work fine and
> everything seems to be in order except that my pages that use COM
> functionality now generate the error below.
>
>
> CODE -----------
>
> <?php
>
> // convert a Word doc to an HTML file
> $DocumentPath = str_replace("\\\\", "\\", $_GET["DocumentPath"]);
>
> // THIS IS THE LINE THAT GENERATES THE ERROR
> $word = new COM("word.application") or die("Unable to instantiate
> application object");
>
> // creating an instance of the Word Document object
> $wordDocument = new COM("word.document") or die("Unable to instantiate
> document object");
>
> // open up an empty document
> $wordDocument = $word->Documents->Open($DocumentPath);
>
> // create the filename for the HTML version
> $HTMLPath = substr_replace($DocumentPath, 'html', -3, 3);
>
> // save the document as HTML
> $wordDocument->SaveAs($HTMLPath, 8);
>
> // clean up
> $wordDocument = null;
> $word->Quit();
> $word = null;
>
> echo "<a href='$HTMLPath'>load...</a>";
>
> ?>
>
>
>
> ERROR ---------------
>
> Warning: Unable to obtain IDispatch interface for CLSID
> {000209FF-0000-0000-C000-000000000046}: Access is denied. in
> c:\inetpub\wwwroot\COM\htmlviewer.php on line 9
>
>
>
>
> This worked fine under Apache.
>
> Thanks,
> Ron
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Perhaps post the code that generates the dynamic table. Maybe your tags 
are not properly embedded and balanced. That could cause an issue if you 
had data outside of the <td> and or <tr> tags inside the <table> tags.

Nicole Amashta
www.aeontrek.com

Tim Greenleaf wrote:
> I have a search page that creates a dynamic table of results from MS SQL
> Server.  The table created on the web page does not always get created
> properly for the same recordset.  Sometimes a field may have a black or red
> background color and if the same exact search is run again it will display
> properly.  If I have a  search with large number of records (few thousand)
> there is usually html text printed above the table of results.  If I perform
> the exact search multiple times, I will get different html text printed
> above the table.
> 
> It seems as if the PHP engine/interpretor is not processing the script
> properly.  I would think if I had a syntax issue with the script or HTML it
> would either error out or return the same results everytime.
> 
> Has anyone else seen this problem before?
> 
> w2k SP2
> IIS
> PHP 4.2.1
> 
> Thanks for the help.
> 
> Tim
> 
> 

--- End Message ---
--- Begin Message ---
Nicole,

I have included the actual source and a link to the page so you can see the
actual problem I am talking about.

The errors appear to be the result of strings not terminating properly from
the PHP output.  Then partial HTML code is inserted in cells or at the top
of the table.

I have stripped everything out and am now just creating a loop to build a
table and still get the same errors.  I have checked it with IE 5.5, IE 6,
NS 4.78 and NS6.2.2 all with the same type of errors.

Here is a link to the page that creates the table:
http://www.coloradowinware.com/sample/error/sample.php  Depending on your
connection speed it may take a few seconds, it is generating 650 rows.  You
may need to refresh a couple of times to see the errors.  Some times there
is text printed above the table and sometimes there is partial html in table
cells and other times there may be colored cells.

Here is the source for the page:

Thanks for your help.


<HTML>
<HEAD>
<TITLE>PHP Test</TITLE>
</HEAD>

<body>

<?php
buildtable()
?>

<?php
function buildtable()
{

    //print header row
 print "<table border='2' cellspacing='0' bordercolor='#C0C0C0' width='97%'
id='AutoNumber2' style='border-collapse: collapse' bgcolor='#FFFFFF'>";
 print "<tr>";
    print "<td width='4%' align='center' bgcolor='#FFCC00'>&nbsp;</td>";
     print "<td width='28%' align='center' bgcolor='#FFCC00'><b><font
size='2' face='Verdana'>Name</font></b></td>";
 print "<td width='13%' align='center' bgcolor='#FFCC00'><b><font size='2'
face='Verdana'>Phone</font></b></td>";
 print "<td width='29%' align='center' bgcolor='#FFCC00'><b><font size='2'
face='Verdana'>E-Mail</font></b></td>";
 print "<td width='22%' align='center' bgcolor='#FFCC00'><b><font size='2'
face='Verdana'>Department</font></b></td>";
 print "<td width='4%' bgcolor='#FFCC00'>&nbsp;</td>";
 print "</tr>";
 //end print header row

    $i=0;
 $number = 650;
    while ($i < $number) :
  $name = "Fred Flintstone";
  $email = "My Mail";
  $department = "Department";

    print "<tr>";
  print "<td width='4%' align='center' bgcolor='#FFFFFF'><p align='center'
bgcolor='#FFFFFF'><font size='1' face='Verdana'>" . $i . "</font></td>";
  print "<td width='28%' bgcolor='#FFFFFF'><font size='1'
face='Verdana'>fred</font></td>";
  print "<td width='13%' bgcolor='#FFFFFF'><font size='1'
face='Verdana'>255-3698</font></td>";
  print "<td width='29%' bgcolor='#FFFFFF'><a
href=mailto:[EMAIL PROTECTED]><font size='1'
face='Verdana'>fred</font></a></td>";
  print "<td width='22%' bgcolor='#FFFFFF'><font size='1'
face='Verdana'>department</font></td>";
  print "<td width='4%' bgcolor='#FFFFFF'>&nbsp;</td>";
  print "</tr>";
  $i++;
 endwhile;

    // close table
 print "</table>";

 return;
}
?>

</body>
</html>




"Nicole Amashta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> Perhaps post the code that generates the dynamic table. Maybe your tags
> are not properly embedded and balanced. That could cause an issue if you
> had data outside of the <td> and or <tr> tags inside the <table> tags.
>
> Nicole Amashta
> www.aeontrek.com
>
> Tim Greenleaf wrote:
> > I have a search page that creates a dynamic table of results from MS SQL
> > Server.  The table created on the web page does not always get created
> > properly for the same recordset.  Sometimes a field may have a black or
red
> > background color and if the same exact search is run again it will
display
> > properly.  If I have a  search with large number of records (few
thousand)
> > there is usually html text printed above the table of results.  If I
perform
> > the exact search multiple times, I will get different html text printed
> > above the table.
> >
> > It seems as if the PHP engine/interpretor is not processing the script
> > properly.  I would think if I had a syntax issue with the script or HTML
it
> > would either error out or return the same results everytime.
> >
> > Has anyone else seen this problem before?
> >
> > w2k SP2
> > IIS
> > PHP 4.2.1
> >
> > Thanks for the help.
> >
> > Tim
> >
> >
>


--- End Message ---
--- Begin Message ---
 Hi people,
I started with sending a newsletter using this code and it works fine.
 
$headers .= "From: Name - newsletter <[EMAIL PROTECTED]>\n";
$headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: PHP\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Return-Path: <[EMAIL PROTECTED]>\n";
$headers .= "Reply-To: [EMAIL PROTECTED]\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";

for($i=0; $i<count($EmailListing); $i++)
{
  mail($EmailListing[$i], $subject, $mailmessage[$i], $headers);
}  


Problem is that emails with wrong email addresses or not existing email addresses are 
not coming back to me. 

What could be a mistake?

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

On 05/23/2002 07:41 PM, Afan Pasalic wrote:
>  Hi people,
> I started with sending a newsletter using this code and it works fine.
>  
> $headers .= "From: Name - newsletter <[EMAIL PROTECTED]>\n";
> $headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
> $headers .= "X-Mailer: PHP\n"; //mailer
> $headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
> $headers .= "Return-Path: <[EMAIL PROTECTED]>\n";
> $headers .= "Reply-To: [EMAIL PROTECTED]\n";
> $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> 
> for($i=0; $i<count($EmailListing); $i++)
> {
>   mail($EmailListing[$i], $subject, $mailmessage[$i], $headers);
> }  
> 
> 
> Problem is that emails with wrong email addresses or not existing email addresses 
>are not coming back to me. 
> 
> What could be a mistake?

On Windows bounced messages will go to sendmail_from setting in php.ini .

If you can't set that address to something as you want, you need to use 
some other method besides mail() to send messages.


-- 

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
hi,

i want an onlick event to call a php function.  is this 
possible in the same way that javascript permits 
onlclick="someFuntion(arg)" ?

how else can i call a php function which adds an item 
to array via a text link?

also does php have variables corresponding to the 
document object model DOM, particularly i'm interested 
in changing css positioning properties.

thanks,

.  .  .  .  .  .
[EMAIL PROTECTED]
0044 (0)7780972034
www.mediadome.net
--- End Message ---

Reply via email to