php-windows Digest 29 Dec 2001 23:59:04 -0000 Issue 926

Topics (messages 11201 through 11209):

Re: header() problem
        11201 by: Christoph Grottolo
        11209 by: Ray

Real Simple, But I'm New!!
        11202 by: FiShcAkE
        11206 by: G Schneider

Re: Mathimatical equations in PHP
        11203 by: Mr Adam ALLEN
        11204 by: Ross Fleming
        11205 by: Ross Fleming

Building PHP on Win32
        11207 by: Woolsey, Fred

Re: Using Exec on windows
        11208 by: LaserJetter

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 ---
Make sure there is no sign before you start the file with '<?php...'.

Every sign (char, space, newline) outside the php script is interpreted as
part of the page and therefore sent to the browser. Header information has
to be sent before. If not, it won't be transmitted. See also
http://www.php.net/manual/en/function.header.php for this (very common)
error.

Christoph

"Jukka Pakkanen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000b01c18fbc$71813000$[EMAIL PROTECTED]">news:000b01c18fbc$71813000$[EMAIL PROTECTED]...
The test.php file only has:

<?php

header("Location: http://www.qnet.fi\r\n\n";);
exit();

?>

Result is a blank page, source code:

[!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"]
[HTML][HEAD]
[META http-equiv=Content-Type content="text/html;
charset=windows-1252"][/HEAD]
[BODY][/BODY][/HTML]

The webserver is Website Pro 3.  I've tried IE 5.5sp2 and IE 6.  You can try
it at http://www.karting.fi/test.php

Otherwise PHP works ok in the server.


> At 05:44 PM 12/28/2001 +0200, Jukka Pakkanen wrote:
> >Thanks Mike, but still no luck. Nothing happens. No errors, no redirects,
> >no nothing :(
>
> Hmmm.. have you tried just making a blank page with this code?  If so,
what
> shows up in the browser?  A blank page?  View the source, what does it
show?
>
> You're running Netscape 4, is that right?  Have you tried it in another
> browser?
>
> -Mike
>
>
> > > At 02:46 PM 12/28/2001 +0200, you wrote:
> > > >Running NT4sp6a and PHP4.1.0.
> > > >
> > > >I try to redirect the browser to a new location [<? header("Location:
> > > >http://www.qnet.fi";); ?>], but nothing happens in the browser. There
> > are no
> > > >extra spaces, CR's, LF's or anything, and output_buffers are on in
the
> > > >php.ini.
> > > >
> > > >Any ideas??
> > > >
> > > >I run in to this problem when trying to run some software which is
> > known to
> > > >work, and now I tested it with a simple test.php (above). Don't work.
> > >
> > > Try:
> > > <?php
> > >
> > >    header("Location: http://www.qnet.fi/\r\n\n";);
> > >    exit();
> > >
> > > ?>
> > >
> > >
> > >
> >
> >
> >--
> >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]
>
>                -=- Mike Flynn - Burlington, VT -=-
> [EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *
>   ...maintaining lawns, watching televised sports, birthing
>   children, listening to Top 40 music, and collecting
>   stuffed animals...
>
>
>



--- End Message ---
--- Begin Message ---
I use PHP 4.06, Using Apache, and running under windows.
This code is tested and works using IE;

      header ("Location: http://localhost/test/secure_1.php";);
      exit;

Like the other message(s) said, you must NOT output anything before you send
a header. If you do however, you will get a runtime error and it will be
displayed on the webpage (unless you supressed the errors).

But this will redirect you to another webpage. Exit is required, so this
script stops execution. Die might work as well, but that quits the script.
Exit simply exists the current function, but the rest of the program/script
(if inside a function) will contune to run.



--


Ray
[EMAIL PROTECTED]





"Christoph Grottolo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Make sure there is no sign before you start the file with '<?php...'.
>
> Every sign (char, space, newline) outside the php script is interpreted as
> part of the page and therefore sent to the browser. Header information has
> to be sent before. If not, it won't be transmitted. See also
> http://www.php.net/manual/en/function.header.php for this (very common)
> error.
>
> Christoph
>
> "Jukka Pakkanen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> 000b01c18fbc$71813000$[EMAIL PROTECTED]">news:000b01c18fbc$71813000$[EMAIL PROTECTED]...
> The test.php file only has:
>
> <?php
>
> header("Location: http://www.qnet.fi\r\n\n";);
> exit();
>
> ?>
>
> Result is a blank page, source code:
>
> [!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"]
> [HTML][HEAD]
> [META http-equiv=Content-Type content="text/html;
> charset=windows-1252"][/HEAD]
> [BODY][/BODY][/HTML]
>
> The webserver is Website Pro 3.  I've tried IE 5.5sp2 and IE 6.  You can
try
> it at http://www.karting.fi/test.php
>
> Otherwise PHP works ok in the server.
>
>
> > At 05:44 PM 12/28/2001 +0200, Jukka Pakkanen wrote:
> > >Thanks Mike, but still no luck. Nothing happens. No errors, no
redirects,
> > >no nothing :(
> >
> > Hmmm.. have you tried just making a blank page with this code?  If so,
> what
> > shows up in the browser?  A blank page?  View the source, what does it
> show?
> >
> > You're running Netscape 4, is that right?  Have you tried it in another
> > browser?
> >
> > -Mike
> >
> >
> > > > At 02:46 PM 12/28/2001 +0200, you wrote:
> > > > >Running NT4sp6a and PHP4.1.0.
> > > > >
> > > > >I try to redirect the browser to a new location [<?
header("Location:
> > > > >http://www.qnet.fi";); ?>], but nothing happens in the browser.
There
> > > are no
> > > > >extra spaces, CR's, LF's or anything, and output_buffers are on in
> the
> > > > >php.ini.
> > > > >
> > > > >Any ideas??
> > > > >
> > > > >I run in to this problem when trying to run some software which is
> > > known to
> > > > >work, and now I tested it with a simple test.php (above). Don't
work.
> > > >
> > > > Try:
> > > > <?php
> > > >
> > > >    header("Location: http://www.qnet.fi/\r\n\n";);
> > > >    exit();
> > > >
> > > > ?>
> > > >
> > > >
> > > >
> > >
> > >
> > >--
> > >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]
> >
> >                -=- Mike Flynn - Burlington, VT -=-
> > [EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *
> >   ...maintaining lawns, watching televised sports, birthing
> >   children, listening to Top 40 music, and collecting
> >   stuffed animals...
> >
> >
> >
>
>
>


--- End Message ---
--- Begin Message ---
Hey,

I've just started learning php and I need to know this...  What are the
commands I use to get i.e.  index.php?links   and  index.php?news    to
work?
I have a site, with the menu down one side, and I need to have the ?news
page as an include for news.html(or php), etc. etc.   I hope this makes
sense to someone, I think it does to me?!?!?

Lee...


--- End Message ---
--- Begin Message ---
Hi Lee,

I'm not quite sure what you mean, but to include other files into a PHP
script, you use the include("file.html"); function.

So, if you have a page called news.html and you want to include it into a
PHP page called display.php, you would use some code like this:

<?php
// this is display.php

if ( $page == "news" ) {
        include("news.html");
}

?>

And the link to the page would look like this: display.php?page=news

Hope this helps,

- Jefferrs

* e-mail: [EMAIL PROTECTED]
* homepage: http://webmastersdog.com
______________________________________
worlds' best webhosting:
http://www.openhosting.co.uk/default.asp?r=GB1500175
read the reviews:
http://www.findsp.com/Hosting/ShowReviews.asp?CompanyID=286





"Fishcake" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey,
>
> I've just started learning php and I need to know this...  What are the
> commands I use to get i.e.  index.php?links   and  index.php?news    to
> work?
> I have a site, with the menu down one side, and I need to have the ?news
> page as an include for news.html(or php), etc. etc.   I hope this makes
> sense to someone, I think it does to me?!?!?
>
> Lee...
>
>


--- End Message ---
--- Begin Message ---
This is a mailing list isn't it, where there is a certain amount of
email to be expected, I've not checked if there is a PHP-MATHS
mailing-list, I suspect not - questions need to be asked somewhere, if
we don't like them- ignore them then they will go away.. 

I have a key on my keyboard with the letters DEL on, I've assumed it
means delete, when I see a message I don't have any interest in I use
that DEL key, and it gets rid of the message... 

... Sometimes I forget to use that DEL key, and just leave them in the
inbox, and when I'm been particulary clever I will even remember the
subject of those messages I'm not interested in and automatically skip
over them.... granted there it takes a second or so for the e-mail to
download but If I was REALLY petty enough to argue about bandwidth
consumed by a mailing list I could un-subscribe (hango I can't find a
button marked UNS on my keyboard.) 

Like you say I really ought to check the CC line, that seems fine to me,
this is getting CC'd to he php-windows lists. I suppose what you REALLY
wanted me to check is the To line also, but since you've not asked for
that in such a rude way I'll not bother checking it. 

Anyway I'll make a suggestion to save everyone from this problem in the
future, only send messages to a mailing list if it is what every member
of the list wants to hear... to acheive this you must send a question
"CAN I ASK A MATHEMATICAL QUESTION RELATED TO PHP", which is 1 email,
then you must wait for the authorisation of every member many more
e-mails, and then you can ask the question, the original e-mail, then
you would still get the answers, the original e-mails.... increased
traffic, more messages..... the other solution is that little bit of
plastic with that word "DEL" written on. 


Just my thoughts on it. 
Adam 

On Fri, 2001-12-28 at 16:32, Svensson, B.A.T. (HKG) wrote: 
> Don't send CC message to those who does not need the information,
> pleeeeeeeeeeeeeeeese!!!
> 
> (I am starting to get pretty fucking annoyed about that people doesn't check
> those things before pressing the send button/key.)
> 
> >-----Original Message-----
> >From: Mike Flynn [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, December 28, 2001 5:32 PM
> >To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> >Subject: RE: [PHP-WIN] Mathimatical equations in PHP
> >
> >
> >Huh?  To average?  You just use addition and division.  It 
> >doesn't require 
> >a function.  A function would not only be silly but probably take more 
> >keystrokes just to type.
> >
> >Average = sum of units' values / number of units.
> >
> >Additionally, you can do this automatically if you're storing 
> >your values 
> >in a database such as MySQL, using built-in functions.  See the MySQL 
> >manual (www.mysql.com) or whatever database for more on this.
> >
> >-Mike
> >
> >At 05:11 PM 12/28/2001 +0100, Svensson, B.A.T. (HKG) wrote:
> >>I am kind of pessimistic by nature, and would not with out 
> >having checked
> >>out this thing believe the case is not in you favor this time.
> >>
> >>         /Anders
> >>
> >> >-----Original Message-----
> >> >From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> >> >Sent: Friday, December 28, 2001 5:04 PM
> >> >To: [EMAIL PROTECTED]
> >> >Subject: Re: [PHP-WIN] Mathimatical equations in PHP
> >> >
> >> >
> >> >That is not what I was looking for, is there a function in PHP
> >> >that does this?
> >> >
> >
> >
> 
> -- 
> 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]

--- End Message ---
--- Begin Message ---
I personally think that there was a bit of an over-reaction to Svenssons
emails.  Most of them are funny, and a lot of the questions do only need a
quick search of the manual.

As to the list of emails that someone found irritating and pointless, the
coffee one was, I think, pretty funny in a world that can be far too
serious.  Is there anything wrong with escapism?...

Oh, and here's the ultimate solution for anyone pissed off with messages
they don't want, (I seem to remember getting narked at someone (i don't
recall who) who had a full mailbox and any replies to would bounce to the
php list)...  This is also a newsgroup.

news.php.net is the server.

Ross



-----Original Message-----
From: Mr Adam ALLEN [mailto:[EMAIL PROTECTED]]
Sent: 29 December 2001 15:11
To: Svensson, B.A.T. (HKG)
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Mathimatical equations in PHP


This is a mailing list isn't it, where there is a certain amount of
email to be expected, I've not checked if there is a PHP-MATHS
mailing-list, I suspect not - questions need to be asked somewhere, if
we don't like them- ignore them then they will go away..

I have a key on my keyboard with the letters DEL on, I've assumed it
means delete, when I see a message I don't have any interest in I use
that DEL key, and it gets rid of the message...

... Sometimes I forget to use that DEL key, and just leave them in the
inbox, and when I'm been particulary clever I will even remember the
subject of those messages I'm not interested in and automatically skip
over them.... granted there it takes a second or so for the e-mail to
download but If I was REALLY petty enough to argue about bandwidth
consumed by a mailing list I could un-subscribe (hango I can't find a
button marked UNS on my keyboard.)

Like you say I really ought to check the CC line, that seems fine to me,
this is getting CC'd to he php-windows lists. I suppose what you REALLY
wanted me to check is the To line also, but since you've not asked for
that in such a rude way I'll not bother checking it.

Anyway I'll make a suggestion to save everyone from this problem in the
future, only send messages to a mailing list if it is what every member
of the list wants to hear... to acheive this you must send a question
"CAN I ASK A MATHEMATICAL QUESTION RELATED TO PHP", which is 1 email,
then you must wait for the authorisation of every member many more
e-mails, and then you can ask the question, the original e-mail, then
you would still get the answers, the original e-mails.... increased
traffic, more messages..... the other solution is that little bit of
plastic with that word "DEL" written on.


Just my thoughts on it.
Adam

On Fri, 2001-12-28 at 16:32, Svensson, B.A.T. (HKG) wrote:
> Don't send CC message to those who does not need the information,
> pleeeeeeeeeeeeeeeese!!!
>
> (I am starting to get pretty fucking annoyed about that people
doesn't check
> those things before pressing the send button/key.)
>
> >-----Original Message-----
> >From: Mike Flynn [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, December 28, 2001 5:32 PM
> >To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
> >Subject: RE: [PHP-WIN] Mathimatical equations in PHP
> >
> >
> >Huh?  To average?  You just use addition and division.  It
> >doesn't require
> >a function.  A function would not only be silly but probably take more
> >keystrokes just to type.
> >
> >Average = sum of units' values / number of units.
> >
> >Additionally, you can do this automatically if you're storing
> >your values
> >in a database such as MySQL, using built-in functions.  See the MySQL
> >manual (www.mysql.com) or whatever database for more on this.
> >
> >-Mike
> >
> >At 05:11 PM 12/28/2001 +0100, Svensson, B.A.T. (HKG) wrote:
> >>I am kind of pessimistic by nature, and would not with out
> >having checked
> >>out this thing believe the case is not in you favor this time.
> >>
> >>         /Anders
> >>
> >> >-----Original Message-----
> >> >From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
> >> >Sent: Friday, December 28, 2001 5:04 PM
> >> >To: [EMAIL PROTECTED]
> >> >Subject: Re: [PHP-WIN] Mathimatical equations in PHP
> >> >
> >> >
> >> >That is not what I was looking for, is there a function in PHP
> >> >that does this?
> >> >
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
aye, this is the one.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 29 December 2001 18:31
To: [EMAIL PROTECTED]
Subject: Re: RE: [PHP-WIN] Mathimatical equations in PHP


Mail not delivered to [EMAIL PROTECTED] The mailbox of the user has
exceeded the allotted limit. Try sending later.


--- End Message ---
--- Begin Message ---
Hi all,

Has anyone had luck building PHP from source on Windows?  In particular, has
anyone pulled it off using gcc rather than Visual C++?

Thanks,
Fred Woolsey
--- End Message ---
--- Begin Message ---
WinZip will need parameters to run from the command line for example to tell
it what file to unzip. Did you include these in the command string?
WinZip might be waiting for you to press a key or enter some information.
It might not be able to find files because the dos window could open at any
folder. Did you use absolute path names like c:\winzip\folder (not
..\winzip)?
Try using the other executing commands, I think passthru() might work.

LJ
"David" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I'm trying to execute a command line program using exec.
> I am tring to run a command line interface of Winzip, simpily by executing
> a string which works when it is typed into the command line.
>
> However, PHP just hangs there, I can see the program running the the
> background, but it does not do anything.
>
> When it is run from the command line it takes about 2 seconds to run, but
> using exec, it will never finish...
>
> Does anyone have any idea with this problem?
>
> Regards,
> David


--- End Message ---

Reply via email to