php-windows Digest 25 Jul 2001 11:29:00 -0000 Issue 667

Topics (messages 8473 through 8495):

File Uploads on WIN2000
        8473 by: Lee Denny
        8475 by: Stanislav Malyshev
        8480 by: Erik H. Mathy

A solution to the CGI application misbehaved issue on IIS5 and PHP4
        8474 by: Kevin Costain

List setup
        8476 by: Michael Kelley
        8488 by: Rasmus Lerdorf

Problem in funcition COM
        8477 by: Luiz Fernando \(Tuca\)
        8485 by: Alain Samoun

Re: duplicate entries
        8478 by: Michael Rudel
        8479 by: Pete K.

test2
        8481 by: Pete Kuczynski

Can phpinfo() be disabled?
        8482 by: Fai
        8483 by: Rasmus Lerdorf

Re: Import filters
        8484 by: Alain Samoun
        8486 by: Ziggi

Problem with Session_Start() and Netscape 4.7
        8487 by: Ziggi

Sessions and frames
        8489 by: Ziggi

PHP in Opera browser and TTF issues.
        8490 by: Gustavo Vázquez
        8495 by: G Schneider

fork?!?!
        8491 by: G Schneider

Orangey GD!
        8492 by: G Schneider
        8493 by: Rasmus Lerdorf
        8494 by: G Schneider

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 probably stupid but I've just upgraded from PHP3 on 98 to  PHP4 on
Win2000 using IIS 5.0. Everything seems to be fine, but when i try to move
files I get the error:

LOAD DATA LOCAL INFILE 'C:\PHP\uploadtemp\php7.tmp'  INTO TABLE gallery
FIELDS TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED
BY '\n'
MySQL said: File 'c:phpuploadtempphp7.tmp' not found (Errcode: 2)

Obviously there's a problem with with my permissions but being new to this i
can't seem to get it going.

Thanks

Lee







LD>> This is probably stupid but I've just upgraded from PHP3 on 98 to  PHP4 on
LD>> Win2000 using IIS 5.0. Everything seems to be fine, but when i try to move
LD>> files I get the error:
LD>>
LD>> LOAD DATA LOCAL INFILE 'C:\PHP\uploadtemp\php7.tmp'  INTO TABLE gallery
LD>> FIELDS TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED
LD>> BY '\n'
LD>> MySQL said: File 'c:phpuploadtempphp7.tmp' not found (Errcode: 2)

Try C:\\PHP\\uploadtemp\\php7.tmp. \ is a special character.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115






It's because you're using \ . In PHP that's a special character release.
What you want to do then is to use a double \ within the file path.

'C:\\PHP\\uploadtemp\\php7.tmp'

- Erik

> -----Original Message-----
> From: Lee Denny [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 9:34 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] File Uploads on WIN2000
>
>
> This is probably stupid but I've just upgraded from PHP3 on 98 to  PHP4 on
> Win2000 using IIS 5.0. Everything seems to be fine, but when i try to move
> files I get the error:
>
> LOAD DATA LOCAL INFILE 'C:\PHP\uploadtemp\php7.tmp'  INTO TABLE gallery
> FIELDS TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED
> BY '\n'
> MySQL said: File 'c:phpuploadtempphp7.tmp' not found (Errcode: 2)
>
> Obviously there's a problem with with my permissions but being
> new to this i
> can't seem to get it going.
>
> Thanks
>
> Lee
>
>
>
>
> --
> 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]
>





My site is setup in the following way:
Administration Site (Stopped)
Default Web Site (Stopped)
domain1.com
domain2.com
domain3.com
domain4.com
domain5.com

- The server runs on FAT32
- Each domain has its own unique IP address
- PHP was installed using the installer (even picked up 
http://activex.microsoft.com/controls/vb6/MSCOMCTL.cab to ensure the 
installer would completely finish)
- Each domain's files were kept on another server

After installation, and placing a basic php script in domain1.com 
(test.php) with the following code:
<html>
     <head>
         <title>Example</title>
     </head>
     <body>
         <?php echo "Hi, I'm a PHP script!"; ?>
     </body>
</html>

I get the following error:

  "CGI Error
The specified CGI application misbehaved by not returning a complete set of 
HTTP headers. The headers it did return are:"


TROUBLESHOOTING

- The first thing I did was start the default web site, place the test.php 
file in that directory and tried it. This worked.
- I then looked at the domains, the fact that they were on another server 
using the "When connecting to this resource, the content should come from - 
A share located on another computer". THis was done for security reasons 
and eaiser control. I took these files on the local drive and PHP worked!


CONCLUSION

I appears as though PHP is able to support locating files on a different 
computer and a shared directory. I had initially thought that just using 
virutal directories was a problem for PHP, but this is not the case.

I hope this proves useful,
Kevin Costain


===============================
KCTS: http://www.kevincostain.com
416-463-6655
===============================






 From my experiences with this list I see a lot of replies (actually I 
DON'T SEE) go straight back to the original sender. Is there a way to 
set the list up so that when one replies to a message it comes to the 
list and not just the original sender ...

I know that replying to all will take care of this, I use that (when I 
remember) and then I take off the original recipient. But there are many 
times when we don't do this and potential answers to future questions 
are not documented .....

Not a complaint just a suggestion


-- 

Michael Kelley                  
[EMAIL PROTECTED] 
        
Programmer/Systems Analyst I    
New Mexico State University
Information and Communication Technologies
Work # (505)-646-1374
P.O. Box 30001
MSC: 3AT
Las Cruces, NM 88003









No, this won't happen.  And there are all sorts of reasons why.  Please
read through http://www.unicom.com/pw/reply-to-harmful.html if you are
interested in them

-Rasmus

On Tue, 24 Jul 2001, Michael Kelley wrote:

>  From my experiences with this list I see a lot of replies (actually I
> DON'T SEE) go straight back to the original sender. Is there a way to
> set the list up so that when one replies to a message it comes to the
> list and not just the original sender ...
>
> I know that replying to all will take care of this, I use that (when I
> remember) and then I take off the original recipient. But there are many
> times when we don't do this and potential answers to future questions
> are not documented .....
>
> Not a complaint just a suggestion
>
>
>





A take a sample of function COM.

$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";
$word->Visible = 1; // command that show window
$word->Documents->Add();
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");

The commands execute, but the window of word don't appears.

I make a test with Autocad too, but the window don't appears.
When a had a ohter version PHP, don't remember, the window appeared.

thanks

Luiz Fernando







Fernando:
Your script is fine, it should work on your server but, of course, do not
expect to open word on the client side....
Alain

On Tue, Jul 24, 2001 at 11:49:04AM +0100, Luiz Fernando Tuca" wrote:
> A take a sample of function COM.
> 
> $word = new COM("word.application") or die("Unable to instanciate Word");
> print "Loaded Word, version {$word->Version}\n";
> $word->Visible = 1; // command that show window
> $word->Documents->Add();
> $word->Selection->TypeText("This is a test...");
> $word->Documents[1]->SaveAs("Useless test.doc");
> 
> The commands execute, but the window of word don't appears.
> 
> I make a test with Autocad too, but the window don't appears.
> When a had a ohter version PHP, don't remember, the window appeared.
> 
> thanks
> 
> Luiz Fernando
> 
> 
> 
> 
> -- 
> 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]




SELECT * FROM asset WHERE hostname ='$hostname' and hostname != '';

Greetinx,
  Mike

Michael Rudel
- Web-Development, Systemadministration -

Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-düsseldorf in Halle 1 Stand E 16
_______________________________________________________________

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: Pete K. [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 4:29 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] duplicate entries
>
>
> Maybe someone can help.
> this script catches all duplicate entries, in the hostname field of my
> database. The problem is, if the hostname field is left
> blank, [not all
> devices have a DNS name], the script sees the blank field, and thinks
> it's a duplicate.
>
> How can I reword it, so it prevents typed hostnames [like it does now]
> but allows blank hostnames.
>
> Thanks in advance!
> Pete
>
>
>
> /*Chck for another item with the same hostname */
>
>      $result = mysql_query ("SELECT * FROM asset
>                               WHERE hostname ='$hostname'
>                             ");
>
>
>      // check if row is returned, if yes error, if no insert
>
>             if (mysql_num_rows($result) != 0)
>
>            {
>                     echo "I'm sorry, I can't do that. A duplicate
> hostname was found.";
>
>             }
>
>        else {
>                     // DO INSERT
> --
> _______________________________________
> Pete Kuczynski
> Sr. Field Engineer
> DHL Airways Inc.
> Infrastructure Technology & Services
> (773)-462-9758
> 24/7 Helpdesk 1-800-434-5767
>
>
> __________________________________________________________________
> Your favorite stores, helpful shopping tools and great gift
> ideas. Experience the convenience of buying online with
> Shop@Netscape! http://shopnow.netscape.com/
>
> Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


--
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]





That did it!

Much thanks!!!

Pete

"Michael Rudel" <[EMAIL PROTECTED]> wrote:

>SELECT * FROM asset WHERE hostname ='$hostname' and hostname != '';
>
>Greetinx,
>  Mike
>
>Michael Rudel
>- Web-Development, Systemadministration -
>
>Besuchen Sie uns am 20. und 21. August 2001 auf der
>online-marketing-düsseldorf in Halle 1 Stand E 16
>_______________________________________________________________
>
>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: Pete K. [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, July 24, 2001 4:29 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP-WIN] duplicate entries
>>
>>
>> Maybe someone can help.
>> this script catches all duplicate entries, in the hostname field of my
>> database. The problem is, if the hostname field is left
>> blank, [not all
>> devices have a DNS name], the script sees the blank field, and thinks
>> it's a duplicate.
>>
>> How can I reword it, so it prevents typed hostnames [like it does now]
>> but allows blank hostnames.
>>
>> Thanks in advance!
>> Pete
>>
>>
>>
>> /*Chck for another item with the same hostname */
>>
>>      $result = mysql_query ("SELECT * FROM asset
>>                               WHERE hostname ='$hostname'
>>                             ");
>>
>>
>>      // check if row is returned, if yes error, if no insert
>>
>>             if (mysql_num_rows($result) != 0)
>>
>>            {
>>                     echo "I'm sorry, I can't do that. A duplicate
>> hostname was found.";
>>
>>             }
>>
>>        else {
>>                     // DO INSERT
>> --
>> _______________________________________
>> Pete Kuczynski
>> Sr. Field Engineer
>> DHL Airways Inc.
>> Infrastructure Technology & Services
>> (773)-462-9758
>> 24/7 Helpdesk 1-800-434-5767
>>
>>
>> __________________________________________________________________
>> Your favorite stores, helpful shopping tools and great gift
>> ideas. Experience the convenience of buying online with
>> Shop@Netscape! http://shopnow.netscape.com/
>>
>> Get your own FREE, personal Netscape Mail account today at
>http://webmail.netscape.com/
>
>
>--
>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]
>
>


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/





testing mail
-- 
_______________________________________
Pete Kuczynski
Sr. Field Engineer
DHL Airways Inc.
Infrastructure Technology & Services
(773)-462-9758
24/7 Helpdesk 1-800-434-5767




Does anybody know how to disable php build-int function: phpinfo()? Or, it
cannot be disabled?
Because this function display so much information about the server to
others.

Thank you very much!








> Does anybody know how to disable php build-int function: phpinfo()? Or, it
> cannot be disabled?
> Because this function display so much information about the server to
> others.

It only displays this if you call the function, and every bit of
information is available through other means anyway so I don't see you
gaining anything by turning it off.  But sure, you can disable it by
putting:

disable_functions = phpinfo

In your php.ini file.

-Rasmus






it's a bit rediculus to see the most popular text editor on the world being
a closed source, meaning with no public information on its format...
Alain

On Tue, Jul 24, 2001 at 11:23:56AM +0200, Ziggi wrote:
> Thank you all for your input but it seems there is no satisfactory solution.
> I would rather ask the guy to "save as html" rather than fighting with COM.
> On the other hand - it's a bit rediculus to see the most popular text editor
> on the world neglected by the PHP community. I hope some clever programmer
> will see the opportunity soon and do the job...
> 
> Sincerely,
> Ziggi
> 
> 
> 
> -- 
> 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]




Yeah... true as well

Anyway - what about RTF (reach text format) ? I mean - I need to send
letters from Latin-2 charset to PHP... thus I need more than ASCII.

Ziggi
----------------------------------------------------------------------------
---------------------------
"Alain Samoun" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> it's a bit rediculus to see the most popular text editor on the world
being
> a closed source, meaning with no public information on its format...
> Alain
>
> On Tue, Jul 24, 2001 at 11:23:56AM +0200, Ziggi wrote:
> > Thank you all for your input but it seems there is no satisfactory
solution.
> > I would rather ask the guy to "save as html" rather than fighting with
COM.
> > On the other hand - it's a bit rediculus to see the most popular text
editor
> > on the world neglected by the PHP community. I hope some clever
programmer
> > will see the opportunity soon and do the job...
> >
> > Sincerely,
> > Ziggi
> >
> >
> >
> > --
> > 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 !

I work on Win2000 Pro (MS IIE Server) with PHP4 running as ISAPI (works
great by the way - despite many warnings here and there).

Strange problem. I use sessions to manage member login etc. Briefly - I have
a form, when the user can log-in. The result of this form (username and
pass) are being sent to a php script via post method. This php script is the
first one where a Session_Start() function exists. No problemo with
Explorer... everything goes smooth. But the problem with Netscape is... in a
moment of Session_Start() it tries to reload the page (I can see it trying
to do so) but - there are missing data from the post method and the result
is:

"This document resulted from a POST operation and has expired from the
cache. If you wish you can repost the form data to recreate the document by
pressing the reload button."

OK - after page reload it works fine again but... you understand I hope...

Changing method to get instead of post helps a little bit as page reloading
process does not bring an error but... it's ugly to send password with a
URL...

Nomen omen - any guess why starting sessions results with page reloading on
Netscape ? No way to correct this by preferences tweaks... :-(

Waiting your answer,
Ziggi






Can anybody here give us some hints about PHP and session management. For
instance - if I put "Session_Start()" on the frameset level - shall I do
this on each of it's pages ???

Ziggi






Hi guys. I need a little help.
I had made a small PHP script to generate a .jpeg dinamically. In IE it
works great, but when I try to get the same Web page from an Opera browser,
I get the Image box but not image at all.
By the other side, when I get the .jpeg in the IE and I try to print it or
save it, some text written in arial.ttf (the one that comes with Windows) is
not printed, not saved.
Any idea of this two little problems? Thank in advance.


gustavo.-








I would say that the Opera problem lies with the Opera browser itself.

I doubt there is anything to get around the problem. It all depends how the
image is saved. For example, I recently was viewing a website all about
Gnome, and none of the images or logos loaded in in IE, but when I looked at
the same site in Opera, they all appeared! It just depends on the way PHP
saves images. It just must be that Opera and JPEGs made with PHP are
incompatable. I can never get it to work in Opera either, so you're not
alone!:-)

I suggest asking the Opera company what they intend to do about it. After
all, PHP is a popular language, and if Opera doesn't support it properly,
the fault lies with them.

As for your arial.ttf problem, sorry but I can't be of any help:-(

Good luck,
Jefferrs


++++++++++++++++++++++++++++++++++++++++
http://www.webmastersdog.com
where website owners go. and talk about stuff.
++++++++++++++++++++++++++++++++++++++++

"Gustavo VáZquez" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi guys. I need a little help.
> I had made a small PHP script to generate a .jpeg dinamically. In IE it
> works great, but when I try to get the same Web page from an Opera
browser,
> I get the Image box but not image at all.
> By the other side, when I get the .jpeg in the IE and I try to print it or
> save it, some text written in arial.ttf (the one that comes with Windows)
is
> not printed, not saved.
> Any idea of this two little problems? Thank in advance.
>
>
> gustavo.-
>
>
>
>







Hi all,

I get this message when I try to delete a file using PHP:

Warning: Unable to fork [del wmd_banner.png.temp.png] in
c:\webspace\openhosting4\GB*******\webmastersdog.com\www\testfile.php on
line 608

the code I'm using is the 'ole   exec("del $file");    thingy you have to
use on Windows servers (rather than the usual PHP unlink() function which
only works on UNIX servers).

So...... why am I getting this message? What setting is it that I need to
switch on (or whatever)?

Thanks all,
Jefferrs


++++++++++++++++++++++++++++++++++++++++
http://www.webmastersdog.com
where website owners go. and talk about stuff.
++++++++++++++++++++++++++++++++++++++++








Hi there,

Here's a strange one for you: My provider just installed the latest version
of PHP on the server - and now whenever GD is used to alter images, it turns
them *orange*.

Take a look for yourself (try changing the width or height of the image):

http://www.webmastersdog.com/gd/gd_example1.php

Does anyone have the slightest idea why this is happening??!?!??

The version of the GD extension is "2.0 or higher" and it is "with freetype"
according to phpinfo(). It's on a Windows NT 5.0 server.

Thanks all,
Jefferrs


++++++++++++++++++++++++++++++++++++++++
http://www.webmastersdog.com
where website owners go. and talk about stuff.
++++++++++++++++++++++++++++++++++++++++








Hrm, it doesn't look more orange after I click "make changes" for me.

On Wed, 25 Jul 2001, G Schneider wrote:

> Hi there,
>
> Here's a strange one for you: My provider just installed the latest version
> of PHP on the server - and now whenever GD is used to alter images, it turns
> them *orange*.
>
> Take a look for yourself (try changing the width or height of the image):
>
> http://www.webmastersdog.com/gd/gd_example1.php
>
> Does anyone have the slightest idea why this is happening??!?!??
>
> The version of the GD extension is "2.0 or higher" and it is "with freetype"
> according to phpinfo(). It's on a Windows NT 5.0 server.
>
> Thanks all,
> Jefferrs
>
>
> ++++++++++++++++++++++++++++++++++++++++
> http://www.webmastersdog.com
> where website owners go. and talk about stuff.
> ++++++++++++++++++++++++++++++++++++++++
>
>
>
>
>
>





No, you have to change the width and height numbers to see the change!

Try putting in 500 width and 500 height - you'll see what I mean!:-)

Jefferrs




"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hrm, it doesn't look more orange after I click "make changes" for me.
>
> On Wed, 25 Jul 2001, G Schneider wrote:
>
> > Hi there,
> >
> > Here's a strange one for you: My provider just installed the latest
version
> > of PHP on the server - and now whenever GD is used to alter images, it
turns
> > them *orange*.
> >
> > Take a look for yourself (try changing the width or height of the
image):
> >
> > http://www.webmastersdog.com/gd/gd_example1.php
> >
> > Does anyone have the slightest idea why this is happening??!?!??
> >
> > The version of the GD extension is "2.0 or higher" and it is "with
freetype"
> > according to phpinfo(). It's on a Windows NT 5.0 server.
> >
> > Thanks all,
> > Jefferrs
> >
> >
> > ++++++++++++++++++++++++++++++++++++++++
> > http://www.webmastersdog.com
> > where website owners go. and talk about stuff.
> > ++++++++++++++++++++++++++++++++++++++++
> >
> >
> >
> >
> >
> >
>




Reply via email to