php-windows Digest 26 Feb 2002 08:03:19 -0000 Issue 1018

Topics (messages 12270 through 12291):

Re: comparing dates with oracle
        12270 by: Svensson, B.A.T. (HKG)
        12271 by: Sandeep Murphy
        12272 by: Svensson, B.A.T. (HKG)
        12273 by: Jerry Nelson
        12274 by: Sandeep Murphy

HELP!!
        12275 by: Lindsay Gillam

Again compiling under Windows
        12276 by: Piotr Pluciennik

Re: GD2 build
        12277 by: Frank M. Kromann
        12279 by: Joris Pinnoo
        12281 by: Frank M. Kromann

Help with XSL
        12278 by: Noel Billig
        12285 by: Phillip Fox
        12289 by: J Wynia

compiling from cvs with vc++.net
        12280 by: Christoph Grottolo
        12282 by: Devon Knowles

passthru() on Win98 ??
        12283 by: Sviss Cobazor
        12284 by: Shrock, Court
        12286 by: Sviss Cobazor
        12287 by: Shrock, Court
        12288 by: Sviss Cobazor
        12290 by: Shrock, Court

Re: opener header
        12291 by: "Spychała, Wojciech"

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


From: Sandeep Murphy
Sent: Monday, February 25, 2002 5:06 PM

>Hi,
>
>I am trying to compare dates between my form fields and my db field but so
>far keep getting a format error.. Am using an Oracle Db...
>
>my query reads like this:
>
>SQL = "SELECT DISTINCT to_char(DOCUMENT.doc_date,'dd/mm/yyyy')
>doc_date,DOCUMENT.document_code from Document where";

Did you miss a comma between to_char(DOCUMENT.doc_date,'dd/mm/yyyy') and
doc_date ?

>SQL += " doc_date BETWEEN '15/11/1258' AND '15/08/1988 '";
>
>can anyone pl tell me whats wrong up here??
--- End Message ---
--- Begin Message ---


-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 25 de Fevereiro de 2002 16:35
To: [EMAIL PROTECTED]
Cc: 'Sandeep Murphy'
Subject: RE: [PHP-WIN] comparing dates with oracle


 to_char(DOCUMENT.doc_date,'dd/mm/yyyy')  --> is for formatting the date and
"doc_date" after it is meant as an alias...

any mistake here???

I just need to obtain a code for a date which lies within the form inputted
date values...

From: Sandeep Murphy
Sent: Monday, February 25, 2002 5:06 PM

>Hi,
>
>I am trying to compare dates between my form fields and my db field but so
>far keep getting a format error.. Am using an Oracle Db...
>
>my query reads like this:
>
>SQL = "SELECT DISTINCT to_char(DOCUMENT.doc_date,'dd/mm/yyyy')
>doc_date,DOCUMENT.document_code from Document where";

Did you miss a comma between to_char(DOCUMENT.doc_date,'dd/mm/yyyy') and
doc_date ?

>SQL += " doc_date BETWEEN '15/11/1258' AND '15/08/1988 '";
>
>can anyone pl tell me whats wrong up here??
--- End Message ---
--- Begin Message ---
> to_char(DOCUMENT.doc_date,'dd/mm/yyyy')  --> is for formatting the date
and
>"doc_date" after it is meant as an alias...
>
>any mistake here???
>
>I just need to obtain a code for a date which lies within the 
>form inputted date values...

I don't know the Oracle syntax, but with in MS SQL you just write:

WHERE <datetime> BETWEEN <<datetime>|<vaild datestring>> AND
<<datetime>|<vaild datestring>>

Ain't one able to do the kind of same in Oracle? With other words: do you
really need to convert the first operand into a char string?

--- End Message ---
--- Begin Message ---
Oracle formats it's date differently.
Try this :

between to_date('15/11/1258', 'dd/mm/yyyy') and 
to_date('15/08/1988','dd/mm/yyyy')


*---------*-----------*----------*---------*---------*---------*--------*
Jerry Nelson
Project Manager / Analyst
Datanamics, Inc.
973-C Russell Ave
Gaithersburg, MD 20879
TEL: 301-948-3515

--- End Message ---
--- Begin Message ---
it works..!

thnx..

-----Original Message-----
From: Jerry Nelson [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 25 de Fevereiro de 2002 16:55
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] comparing dates with oracle


Oracle formats it's date differently.
Try this :

between to_date('15/11/1258', 'dd/mm/yyyy') and 
to_date('15/08/1988','dd/mm/yyyy')


*---------*-----------*----------*---------*---------*---------*--------*
Jerry Nelson
Project Manager / Analyst
Datanamics, Inc.
973-C Russell Ave
Gaithersburg, MD 20879
TEL: 301-948-3515


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

I am just starting out learning php and have printed off all the manual for
installing on windows. I have a Windows 2000 server using IIS. I have
followed all the instructions being:

goto registry editor and addd new string for the type of extention you will
be using for your .php files.
Installed the php installer
copied php4td.dll and php.exe to system root folder (also copied all other
dll's out of the dll's folder)
Installed the latest version of MDAC
copied the php.ini to winnt/system32
Downloaded and installed Cygwin
Downloaded and installed the rest of the build toold form php.net
Get source code for DNS resolver
Copied binary files for php over
Launch C++ and goto Tools, options and add entries on directory tab for
c:\cygnus\bin, c:\php-win32build\include and c:\php-win32build\lib

I have obviously missed something as I have a few simple .php files on the
root of the server just to use as a test to make sure it's working correctly
and I either get a blank page or I just see the code as I have typed it in.

Can anyone think of anything fundamental I have missed. Any suggestion would
be greatly appreciated!!

Linds

Lindsay Gillam
IT Support
Direct Line: 01423 877564
Fax: 01423 877466
E Mail:[EMAIL PROTECTED]
==============================================
InTechnology plc - Advanced Data Technology Services
Head Office:  Nidderdale House, Beckwith Knowle, Harrogate,  HG3 1SA.
Main:  01423 850000
Fax:  01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology's supplier accreditations visit 
our website accreditation page at 
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp

==============================================
InTechnology plc - Secure Offsite Data
Head Office:  Nidderdale House, Beckwith Knowle, Harrogate,  HG3 1SA.
Main:  01423 850000
Fax:  01423 858855
www.intechnology.co.uk

For a comprehensive list of InTechnology's supplier accreditations visit 
our website accreditation page at 
www.intechnology.co.uk/html/reseller/techserv_R/res_accred.asp

--- End Message ---
--- Begin Message ---
Hi, thank you very much,

but in this part of the manual there is no information
answering the question: How can I compile my own
extension (it means - not write but create
php_extxx.dll) in Windows?

TIA Piotr


--- Christoph Grottolo <[EMAIL PROTECTED]>
wrote:
> see in the manual under installation -> Windows
> (lower part of the page)
> 
> Christoph
> 
> "Piotr Pluciennik" <[EMAIL PROTECTED]> schrieb
> im Newsbeitrag
>
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> | Hi,
> |
> | I'd like to ask you where I can find informations
> how
> | I can compile and build PHP 4.x and extensions in
> | Windows environment.
> |
> | TIA
> |
> | Piotr
> |
> | __________________________________________________
> | Do You Yahoo!?
> | Yahoo! Sports - Coverage of the 2002 Olympic Games
> | http://sports.yahoo.com
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--- End Message ---
--- Begin Message ---

You can find this on http://kromann.info/php4.php. This site is updated with the 
latest version of PHP sources from CVS each morning. Not all extensions are supported 
at the moment though but both GD1 and GD2 are included.

- Frank

> where can I find a PHP-build with the latest GD-functionality?
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 



--- End Message ---
--- Begin Message ---
Thank you Frank,

but before I start using your latest build, I have an other question.

My php version 4.1.1 (downloaded from php.net a week ago) contains 2 files
in the extensions directory: php_gd.dll and php_gd2.dll

What's the difference between those 2 files? Is the second one the GD
library which contains truecolor support? imageCopyResampled? etc. (16bit)

If I register the second file (php_gd2.dll) and put it in the php.ini the
program crashes. Or is the php_gd2.dll file just an auxiliary library and
has it nothing to do with GD version 2.01 ?

What do you think? Thanks for your help.

Joris Pinnoo

"Frank M. Kromann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> You can find this on http://kromann.info/php4.php. This site is updated
with the latest version of PHP sources from CVS each morning. Not all
extensions are supported at the moment though but both GD1 and GD2 are
included.
>
> - Frank
>
> > where can I find a PHP-build with the latest GD-functionality?
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>


--- End Message ---
--- Begin Message ---
Hi Joris,

> My php version 4.1.1 (downloaded from php.net a week ago) contains 2 files
> in the extensions directory: php_gd.dll and php_gd2.dll

This sounds like GD for version 1.x and 2.x. I'm not using any pre compiled versions 
of PHP so I have no idea of why the system is crashes. It could be caused by you 
enabling both version 1 and version 2 though. All functions from version 1 is included 
in version 2 so you only need to load one of the dll's.

GD 2.x is still experimental so you might find bugs in that module.

- Frank




--- End Message ---
--- Begin Message ---
Anybody out there get XSL transforms working with PHP4.1.1 and Apache1.3.22
(Win32)?

I'm a developer (not a server administrator) trying to set up a local box to
work on and I've been going through the install process (which has been
extremely frustrating so far), but I think I'm finally close, unfortunately,
now I'm getting:
"unknown encoding" errors, error number "66"

I have all of my input and output encodings set to "UTF-8" as per the
instructions in the FAQ on the sablotron website.

I did some searching and I'm guessing the problem has something to do with
the iconv.dll. I only have the php_iconv.dll (same thing?) which I installed
in my extensions folder and in my system32 folder, and now I get an alert
box error which reads as follows:

"The dyanmic link library iconv-1.3.dll could not be found in the specified
path"

which is followed by

"Unable to load dynamic library 'c:\PHP\extensions\php_iconv.dll" - The
specidifed module could not be found"

First off, I make no mention of iconv-1.3.dll in any of php.ini, so where
that name is coming from I can only guess, second off, php_iconv.dll is
definitely in the extensions folder (and linked through the php.ini file).

What the hell is going on here? I feel like I've hit a dead end...

If someone has got it all working smooth, and never hit this problem, then
can I ask what steps you went through, what does you configuration look like
now?

Noel


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


On Mon, 25 Feb 2002, Noel Billig wrote:
> Anybody out there get XSL transforms working with PHP4.1.1 and Apache1.3.22
> (Win32)?

Yes, I got it to work, but before I did I was getting the same encoding error as you.

I'm not sure what is causing your iconv dll errors though. I have a iconv-1.3.dll
that was part of the distribution and found in /php4/dlls directory 
located in my System32 dir. I am also using the copy of php_iconv.dll that 
came with the distribution.

This problem is discussed on bugs.php.net:
http://bugs.php.net/bug.php?id=14965


Basically, if you are transforming files, you need to refer to them like 
this:
file://C:/filePath/fileName.ext

rather than:
C:/filePath/fileName.ext

The page also has code for handling strings of XML and XSL.


It is unfortunate that the error that is returned is so misleading, 
but once you switch to one of the methods mentioned in the bug's discussion 
you should have no problems.

HTH!


--> Phillip Fox -- [EMAIL PROTECTED]
      405.773.WORX -- 1.888.772.WORX  --  http://www.TheWorxCo.Net/




--- End Message ---
--- Begin Message ---
I did an XSLT demo a while back for the Twin Cities PHP User Group. My notes
and demo code are available at http://www.tcphp.org/meeting_notes/xslt/.

I wrote the demo on Windows.

"Phillip Fox" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> On Mon, 25 Feb 2002, Noel Billig wrote:
> > Anybody out there get XSL transforms working with PHP4.1.1 and
Apache1.3.22
> > (Win32)?
>
> Yes, I got it to work, but before I did I was getting the same encoding
error as you.
>
> I'm not sure what is causing your iconv dll errors though. I have a
iconv-1.3.dll
> that was part of the distribution and found in /php4/dlls directory
> located in my System32 dir. I am also using the copy of php_iconv.dll that
> came with the distribution.
>
> This problem is discussed on bugs.php.net:
> http://bugs.php.net/bug.php?id=14965
>
>
> Basically, if you are transforming files, you need to refer to them like
> this:
> file://C:/filePath/fileName.ext
>
> rather than:
> C:/filePath/fileName.ext
>
> The page also has code for handling strings of XML and XSL.
>
>
> It is unfortunate that the error that is returned is so misleading,
> but once you switch to one of the methods mentioned in the bug's
discussion
> you should have no problems.
>
> HTH!
>
>
> --> Phillip Fox -- [EMAIL PROTECTED]
>       405.773.WORX -- 1.888.772.WORX  --  http://www.TheWorxCo.Net/
>
>
>
>


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

I try to compile latest cvs with visual studio.net according to the
instructions in the manual.

I'm always getting the following linking error:

 php4ts fatal error LNK1104: cannot open file 'php4ts_debug.lib'

Can anybody help me with that?

Christoph





--- End Message ---
--- Begin Message ---
I've had the exact same problem. If you ever get it to work I'd be thankful
to hear how you did it.

- Devon Knowles


--- End Message ---
--- Begin Message ---
Hi everyone.

I've posted earlier about this problem but haven't gotten any solution yet.
I'm using HTMLDOC application for html > pdf convertion but I can't get
passthru() to work.
I'm using Win98/Apache/PHP 4.1.1/MySQL and everything so far has been
smooth.
I have tested my header() funktion with a simple redirection script and it
works. I've also tested htmldoc.exe from the command line and it works too.
I have also tried with full path for both htmldoc.exe and html page but it's
still a no go :(

Here is an example that should show a pdf file in the browser:

<?
function topdf($filename, $options = "") {
    header("Content-Type: application/pdf");
    flush();
 passthru("htmldoc -t pdf --quiet --jpeg --webpage $options \'$filename\'");
}

$file = "full path to some html page";
$option = "";

topdf($file, $option);
?>

This gives me a blank page in my browser. Looking at the source in this page
it seems that not even the header is being send. I have tried with system()
and exec() too but it makes no difference. I have application/pdf pdf added
in my mime.types file.
If you have an idea about how to get this to work please note that an
example from WinNT or Win2k may not be of any use because I think that the
fact that I'm using Win98 is very important in this case.

Please help if you can.
Thanks....
~ Sviss



--- End Message ---
--- Begin Message ---
Have you tried to telnet to localhost:80 and given it a valid request header
to see what your response from teh webserver is?

when connected via telnet to port 80, type:
GET / HTTP/1.1[enter]
Host: yourhost.com[enter]
[enter]
[enter]

You should see something like:
HTTP/1.1 200 OK
Date: Mon, 25 Feb 2002 23:20:35 GMT
Server: Apache/1.3.20 (Unix) PHP/4.0.6 mod_ssl/2.8.4 OpenSSL/0.9.6
X-Powered-By: PHP/4.0.6
Transfer-Encoding: chunked
Content-Type: application/pdf

This will tell you if the data is indeed being transferred....hope it helps.
Court

> -----Original Message-----
> From: Sviss Cobazor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 3:14 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] passthru() on Win98 ??
> 
> 
> Hi everyone.
> 
> I've posted earlier about this problem but haven't gotten any 
> solution yet.
> I'm using HTMLDOC application for html > pdf convertion but I 
> can't get
> passthru() to work.
> I'm using Win98/Apache/PHP 4.1.1/MySQL and everything so far has been
> smooth.
> I have tested my header() funktion with a simple redirection 
> script and it
> works. I've also tested htmldoc.exe from the command line and 
> it works too.
> I have also tried with full path for both htmldoc.exe and 
> html page but it's
> still a no go :(
> 
> Here is an example that should show a pdf file in the browser:
> 
> <?
> function topdf($filename, $options = "") {
>     header("Content-Type: application/pdf");
>     flush();
>  passthru("htmldoc -t pdf --quiet --jpeg --webpage $options 
> \'$filename\'");
> }
> 
> $file = "full path to some html page";
> $option = "";
> 
> topdf($file, $option);
> ?>
> 
> This gives me a blank page in my browser. Looking at the 
> source in this page
> it seems that not even the header is being send. I have tried 
> with system()
> and exec() too but it makes no difference. I have 
> application/pdf pdf added
> in my mime.types file.
> If you have an idea about how to get this to work please note that an
> example from WinNT or Win2k may not be of any use because I 
> think that the
> fact that I'm using Win98 is very important in this case.
> 
> Please help if you can.
> Thanks....
> ~ Sviss
> 
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
I'm sorry but I'm not very familiar with telnet usage. If you can give me an
example I'll try it asap.


"Court Shrock" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Have you tried to telnet to localhost:80 and given it a valid request
header
> to see what your response from teh webserver is?
>
> when connected via telnet to port 80, type:
> GET / HTTP/1.1[enter]
> Host: yourhost.com[enter]
> [enter]
> [enter]
>
> You should see something like:
> HTTP/1.1 200 OK
> Date: Mon, 25 Feb 2002 23:20:35 GMT
> Server: Apache/1.3.20 (Unix) PHP/4.0.6 mod_ssl/2.8.4 OpenSSL/0.9.6
> X-Powered-By: PHP/4.0.6
> Transfer-Encoding: chunked
> Content-Type: application/pdf
>
> This will tell you if the data is indeed being transferred....hope it
helps.
> Court
>
> > -----Original Message-----
> > From: Sviss Cobazor [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 25, 2002 3:14 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] passthru() on Win98 ??
> >
> >
> > Hi everyone.
> >
> > I've posted earlier about this problem but haven't gotten any
> > solution yet.
> > I'm using HTMLDOC application for html > pdf convertion but I
> > can't get
> > passthru() to work.
> > I'm using Win98/Apache/PHP 4.1.1/MySQL and everything so far has been
> > smooth.
> > I have tested my header() funktion with a simple redirection
> > script and it
> > works. I've also tested htmldoc.exe from the command line and
> > it works too.
> > I have also tried with full path for both htmldoc.exe and
> > html page but it's
> > still a no go :(
> >
> > Here is an example that should show a pdf file in the browser:
> >
> > <?
> > function topdf($filename, $options = "") {
> >     header("Content-Type: application/pdf");
> >     flush();
> >  passthru("htmldoc -t pdf --quiet --jpeg --webpage $options
> > \'$filename\'");
> > }
> >
> > $file = "full path to some html page";
> > $option = "";
> >
> > topdf($file, $option);
> > ?>
> >
> > This gives me a blank page in my browser. Looking at the
> > source in this page
> > it seems that not even the header is being send. I have tried
> > with system()
> > and exec() too but it makes no difference. I have
> > application/pdf pdf added
> > in my mime.types file.
> > If you have an idea about how to get this to work please note that an
> > example from WinNT or Win2k may not be of any use because I
> > think that the
> > fact that I'm using Win98 is very important in this case.
> >
> > Please help if you can.
> > Thanks....
> > ~ Sviss
> >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >


--- End Message ---
--- Begin Message ---
Sure,

go to http://www.chiark.greenend.org.uk/~sgtatham/putty/latest/x86/putty.exe
and download it.  It is PuTTY, an open source telnet/ssh client that is far
superior than the telnet included in windows.  Instructions are prefaced
with a *.

*run the exe
*type in the HostName field: localhost
*make sure that the telnet protocol is selected
*type in the Port field: 80
*uncheck the box: Close Window on Exit
*click open
*type the following (you will not see the keypresses; replace "[enter]" by
pressing the enter key; it is case-sensitive):
GET / HTTP/1.1[enter]
Host: localhost[enter]
[enter]
*you should now see something like the following:
HTTP/1.1 200 OK
Date: Tue, 26 Feb 2002 00:46:52 GMT
Server: Apache/1.3.20 (Unix) PHP/4.0.6 mod_ssl/2.8.4 OpenSSL/0.9.6
Connection: close
Content-Type: application/pdf

*your data should follow the line after the blank line after the
"Content-Type"


> -----Original Message-----
> From: Sviss Cobazor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 3:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] passthru() on Win98 ??
> 
> 
> I'm sorry but I'm not very familiar with telnet usage. If you 
> can give me an
> example I'll try it asap.
--- End Message ---
--- Begin Message ---
I followed your instructions and got:

HTTP/1.1 400 bad request
> Date: Tue, 26 Feb 2002 01:05:57 GMT
> Server: Apache/1.3.20 (Win32)
> Connection: close
> Content-Type: text/html charset=iso-8859-1

... And then the same in html source ... (in the putty window)

So I didn't get what was expected but either way I'm not sure what to do if
I did.


"Court Shrock" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Sure,
>
> go to
http://www.chiark.greenend.org.uk/~sgtatham/putty/latest/x86/putty.exe
> and download it.  It is PuTTY, an open source telnet/ssh client that is
far
> superior than the telnet included in windows.  Instructions are prefaced
> with a *.
>
> *run the exe
> *type in the HostName field: localhost
> *make sure that the telnet protocol is selected
> *type in the Port field: 80
> *uncheck the box: Close Window on Exit
> *click open
> *type the following (you will not see the keypresses; replace "[enter]" by
> pressing the enter key; it is case-sensitive):
> GET / HTTP/1.1[enter]
> Host: localhost[enter]
> [enter]
> *you should now see something like the following:
> HTTP/1.1 200 OK
> Date: Tue, 26 Feb 2002 00:46:52 GMT
> Server: Apache/1.3.20 (Unix) PHP/4.0.6 mod_ssl/2.8.4 OpenSSL/0.9.6
> Connection: close
> Content-Type: application/pdf
>
> *your data should follow the line after the blank line after the
> "Content-Type"
>
>
> > -----Original Message-----
> > From: Sviss Cobazor [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 25, 2002 3:38 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] passthru() on Win98 ??
> >
> >
> > I'm sorry but I'm not very familiar with telnet usage. If you
> > can give me an
> > example I'll try it asap.


--- End Message ---
--- Begin Message ---
To explain the 400 bad request, you most likely had a typo when you typed in
the HTTP request.  The request is case-sensitive and very particular.  Most
likely, the "Host: localhost" portion of the request messed up somehow.

When you get a "HTTP/1.1 200 OK" response, that means that the webserver
accepted the request and will process your request.  In order to test
whether or not the passthru function is doing things properly, you are
verifying what is being sent to the browser by simulating what the browser
would send to your webserver and then what the browser is getting in
response.  It will all start to make sense when you start seeing your files
output--of course, in the request that I had you type, I assumed the file
that returns the pdf is named "index.php" or whatever file your webserver
will retrieve when it gets a root "/" request.  If this is not the case, you
need to replace the "GET / HTTP/1.1" line with "GET /yourfile.php HTTP/1.1"
or even "GET /yourfile.php?var1=whatever__yougettheidea HTTP/1.1".

passthru is working properly if you see something like:
HTTP/1.1 200 OK
Date: Mon, 25 Feb 2002 23:20:35 GMT
Server: Apache/1.3.20 (Unix) PHP/4.0.6 mod_ssl/2.8.4 OpenSSL/0.9.6
X-Powered-By: PHP/4.0.6
Transfer-Encoding: chunked
Content-Type: application/pdf

[lots of binary data]

it isn't working if you see something like this:
HTTP/1.1 200 OK
Date: Mon, 25 Feb 2002 23:20:35 GMT
Server: Apache/1.3.20 (Unix) PHP/4.0.6 mod_ssl/2.8.4 OpenSSL/0.9.6
X-Powered-By: PHP/4.0.6
Transfer-Encoding: chunked
Content-Type: text/html

<html>some stupid html, or nothing at all</html>

in which case, I would try a different method to verify that data is
properly passing between php and htmldoc.exe.

I hope this has addressed some of the confusion.
Court

> -----Original Message-----
> From: Sviss Cobazor [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 5:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] passthru() on Win98 ??
> 
> 
> I followed your instructions and got:
> 
> HTTP/1.1 400 bad request
> > Date: Tue, 26 Feb 2002 01:05:57 GMT
> > Server: Apache/1.3.20 (Win32)
> > Connection: close
> > Content-Type: text/html charset=iso-8859-1
> 
> ... And then the same in html source ... (in the putty window)
> 
> So I didn't get what was expected but either way I'm not sure 
> what to do if
> I did.
--- End Message ---
--- Begin Message ---
yea but i need exactly something else i want to cheat script. If script
wants to know what HTTP_REFERER is I want to show him something else than
realy is 
hmm is that clear?

-----Original Message-----
From: Alexander Gräf [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 9:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: opener header



i think HTTP_REFERER is what you want.
this variable holds the url of the page that linked to you.


"Wojciech Spychala" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> Some scripts recognize what was previos page on your browser befor u get
to
> this script (opener)
> and if address isn't correct script may not allow to do anything
>
> is it possible send by php header in information that we for example
running
> script from different location than this is realy??
>
> Sorry for my horrible english
>
> Thanks very much
>
> Wojtek



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

Reply via email to