php-windows Digest 18 Apr 2002 10:04:57 -0000 Issue 1099
Topics (messages 13144 through 13154):
Re: PHP Warning: No File Uploaded in Unknown on Line 0 .. any ideas?
13144 by: Shrock, Court
13145 by: Ethan Nelson
Re: COM and ADODB access
13146 by: Alan Brown
pspell activation
13147 by: Eduards Cauna
13148 by: Ross Fleming
Forward Link
13149 by: Wayne Hinch
13150 by: brother
13151 by: Wayne Hinch
13152 by: Matt Williams
13153 by: brother
Using Access with PHP via ODBC
13154 by: Brian McGarvie
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 ---
.html files are not normally parsed by php...do you have your webserver
setup to parse .html files using PHP?
> -----Original Message-----
> From: Ethan Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 17, 2002 3:08 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-WIN] PHP Warning: No File Uploaded in Unknown
> on Line 0..
> any ideas?
>
>
> hey there..
>
> this has been on my nerves all day today.. here is the problem..
>
> I have a form.. it looks like this:
>
> echo "<form method=\"post\" action=\"./mgr.html\"
> enctype=\"multipart/form-data\">\n";
> echo "Header:<br>\n";
> echo "<input type=text name=header size=50><br><br>\n";
> echo "Body:<br>\n";
> echo "<textarea name=body wrap=virtual cols=45
> rows=10></textarea><br><br>\n";
> echo "Image:<br>\n";
> echo "<input type=file name=image><br><br>\n";
> echo "<input type=submit name=function value=\"Add this
> special\"><br>\n";
> echo "</form>\n";
>
> mgr.html's first line of code looks like this:
>
> die();
>
> my browser output is this:
>
> PHP Warning: No file uploaded in Unknown on line 0
>
> I have no idea how this is happening.. it seems that php is
> letting me know
> that i didn't upload a file BEFORE it even parses the
> mgr.html file. All i
> want to do is to get rid of this error message, perferiably
> in the php.ini
> file (i am running php 4.3.0-dev on a win2k box). I have
> "display_errors =
> Off" in my php.ini file.
>
> any ideas?
>
> -Chris
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
sorry, forgot to mention that, the server is set up to parse .html files..
everything else works just fine, it's just that when i post a form with a
file input element in it, and that element is left blank it lets me know
that there was no file uploaded. (which I normally wouldn't mind except
that it kills the header redirects and breaks the page a bit).
Thanks.
-----Original Message-----
From: Shrock, Court [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 3:04 PM
To: Ethan Nelson; '[EMAIL PROTECTED]'
Subject: RE: [PHP-WIN] PHP Warning: No File Uploaded in Unknown on Line
0 .. any ideas?
.html files are not normally parsed by php...do you have your webserver
setup to parse .html files using PHP?
> -----Original Message-----
> From: Ethan Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 17, 2002 3:08 PM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP-WIN] PHP Warning: No File Uploaded in Unknown
> on Line 0..
> any ideas?
>
>
> hey there..
>
> this has been on my nerves all day today.. here is the problem..
>
> I have a form.. it looks like this:
>
> echo "<form method=\"post\" action=\"./mgr.html\"
> enctype=\"multipart/form-data\">\n";
> echo "Header:<br>\n";
> echo "<input type=text name=header size=50><br><br>\n";
> echo "Body:<br>\n";
> echo "<textarea name=body wrap=virtual cols=45
> rows=10></textarea><br><br>\n";
> echo "Image:<br>\n";
> echo "<input type=file name=image><br><br>\n";
> echo "<input type=submit name=function value=\"Add this
> special\"><br>\n";
> echo "</form>\n";
>
> mgr.html's first line of code looks like this:
>
> die();
>
> my browser output is this:
>
> PHP Warning: No file uploaded in Unknown on line 0
>
> I have no idea how this is happening.. it seems that php is
> letting me know
> that i didn't upload a file BEFORE it even parses the
> mgr.html file. All i
> want to do is to get rid of this error message, perferiably
> in the php.ini
> file (i am running php 4.3.0-dev on a win2k box). I have
> "display_errors =
> Off" in my php.ini file.
>
> any ideas?
>
> -Chris
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
There were definitely two nasty bugs in the COM code which I believe that I
have fixed and checked into CVS. But the root cause of your problem is
actually a COM exception thrown by ADODB.Connection. I see this exception
when I pass "position" (a valid field name in the database) in a SQL queries
through the execute method. And most strangely the component does not seem
to populate the IErrorInfo in this case, which is why your:
if ($DB->Errors->Count > 0)
{
print $DB->Errors[0]->description;
}
code resulted in a php_OLECHAR_tochar() error - the underlying object placed
a NULL in the VARIANT of type VT_BSTR.
e.g.
<?php
$DB = new COM("ADODB.Connection");
$DB->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=i:\\tmp\\test.mdb");
$DB->execute("SELECT position FROM foobar"); # I guess position is a
reserved SQL word
if ($DB->Errors->Count > 0)
{
print $DB->Errors[0]->description . "<BR>";
}
?>
I suppose that we see this problem when "reservered words" are not escaped.
In general though, an error in the component does result in a sane message:
When I "quote" position int he query string thus:
$DB->execute("SELECT 'position' FROM foobar");
I do see a valid message:
Warning: Invoke() failed: Exception occurred. Source: Microsoft JET Database
Engine Description: The Microsoft Jet database engine cannot find the input
table or query 'foobar'. Make sure it exists and that its name is spelled
correctly. in I:\httpd\html\tests\test.php on line 11
The Microsoft Jet database engine cannot find the input table or query
'foobar'. Make sure it exists and that its name is spelled correctly.
I honsetly do not know what is wrong with:
SELECT IDCode, Report_Name, Report_Description, Report_Stat FROM Reports
it certainl;y works fine for me - so perhaps the example you sent was indeed
not the actual string which produced the error for you? There is a PHP
function to escape SQL strings somewhere- not sure if it is smart enough to
quote reserved words that are not already quoted......
Alan.
--- End Message ---
--- Begin Message ---
Does anybody know how to activate pspell functionality in php-Windows?
Where to find precompiled binary like *.pspell-win32.* if any necessary?
Eduards
--- End Message ---
--- Begin Message ---
You can't. There isn't a compiled dll (the one you're looking for is
php_pspell.dll) but it doesn't exist. Search google for the full
explanation but the underlying idea that I got when looking for someone a
couple of months ago is that it is "thread unsafe" and so is not suitable
for running under the windows operating system. Your options are (in order
of feasability and ease):
a) install linux
b) decide what functions you need and write them yourself using the standard
PHP libraries
c) install a program called cygwin (linux emulator)
Ross
-----Original Message-----
From: Eduards Cauna [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2002 07:22
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] pspell activation
Does anybody know how to activate pspell functionality in php-Windows?
Where to find precompiled binary like *.pspell-win32.* if any necessary?
Eduards
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi all,
How can I get a page to automatically forward to the next page currently
I am trying to use
header("Location: [filename.php]");
although this is not working it is bringing up the following error
Warning: Cannot add header information - headers already sent by (output
started at c:\html/customer/newcust.php:3) in [filename] on line 304
How do I get around this problem, Please help.
Wayne
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Wayne Hinch [mailto:[EMAIL PROTECTED]]
>
> Hi all,
>
> How can I get a page to automatically forward to the next
> page currently
> I am trying to use
>
> header("Location: [filename.php]");
>
> although this is not working it is bringing up the following error
>
> Warning: Cannot add header information - headers already sent
> by (output
> started at c:\html/customer/newcust.php:3) in [filename] on line 304
>
> How do I get around this problem, Please help.
I most often uses the standard metarefresh, you just have to echo the
variabels you want to pass to the new_doc.php
<META http-equiv="REFRESH" CONTENT="0; URL=new_doc.php">
/brother
--- End Message ---
--- Begin Message ---
Does this get invoked as soon as the page is opened?
Wayne
-----Original Message-----
From: brother [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2002 09:33
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP-WIN] Forward Link
> -----Original Message-----
> From: Wayne Hinch [mailto:[EMAIL PROTECTED]]
>
> Hi all,
>
> How can I get a page to automatically forward to the next
> page currently
> I am trying to use
>
> header("Location: [filename.php]");
>
> although this is not working it is bringing up the following error
>
> Warning: Cannot add header information - headers already sent
> by (output
> started at c:\html/customer/newcust.php:3) in [filename] on line 304
>
> How do I get around this problem, Please help.
I most often uses the standard metarefresh, you just have to echo the
variabels you want to pass to the new_doc.php
<META http-equiv="REFRESH" CONTENT="0; URL=new_doc.php">
/brother
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Thursday 18 April 2002 08:26, Wayne Hinch wrote:
> header("Location: [filename.php]");
>
> although this is not working it is bringing up the following error
>
> Warning: Cannot add header information - headers already sent by (output
> started at c:\html/customer/newcust.php:3) in [filename] on line 304
>
check there is not text (even whitespace) outputted to the browser before
calling the header() function
matt
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Wayne Hinch [mailto:[EMAIL PROTECTED]]
> Does this get invoked as soon as the page is opened?
>
> -----Original Message-----
> From: brother [mailto:[EMAIL PROTECTED]]
>
> I most often uses the standard metarefresh, you just have to echo the
> variabels you want to pass to the new_doc.php
>
> <META http-equiv="REFRESH" CONTENT="0; URL=new_doc.php">
>
> /brother
<html>
<head></head>
<body>
some htmlcode
<? some php code ?>
even more html
<META http-equiv="REFRESH" CONTENT="0; URL=new_doc.php">
</body></html>
it is standard HTML so the page will be loaded and everything in it will be
parsed by the PHPengine and then by the browser.
/brother
--- End Message ---
--- Begin Message ---
Hi,
I'm developing an application which is built on top of an existing MS
Access Database, when the DB is not opened/windows client to the DB is
opened it creates a lock, which in turn prevents PHP from accessing the
Database, is there any solutions to this?
Thanks in advance....
--- End Message ---