php-windows Digest 4 Nov 2004 18:53:13 -0000 Issue 2454

Topics (messages 24881 through 24884):

Re: Headers Already Sent - How To Overcome????
        24881 by: Vail, Warren
        24883 by: Sudeep

Warning: Unknown: 1 result set(s) not freed. Use mysql_free_result
        24882 by: kutuu

cookies on IIS - php5
        24884 by: Sean S. Karshis

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 ---
Any "echo" or "print" statements executed prior to executing the header
statement (such as displaying variables for debugging) will cause this to
occur.  The line number mentioned in the warning message should tell you
which statement actually produced output prior to the header (if there are
several, you may have to eliminate them one at a time).  Another common
cause is switching to html mode ?> where even blank lines will generate
output prior to the header statement.

Hth,

Warren Vail

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of MikeA
Sent: Wednesday, November 03, 2004 3:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Headers Already Sent - How To Overcome????


I am trying to do the following

 header ("Location: wlserver/index.php?userKey=$userKey&show=$userKey");

but I keep getting

 Warning: Cannot modify header information - headers already sent by ...

The code on the header line above is not executing so I am assuming the
previous headers being sent is causing this command to not execute.  Part of
the problem is that I am modifying software written by someone else to fit
my needs.  I do not want to make a lot of alterations because I don't want
to pull my hair out when the next release shows up.

Is there a command or someway to get around this problem without hacking out
all of the other header sending code?

I appreciate any help.

Thank you.

Mike

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

--- End Message ---
--- Begin Message ---
Hi,
 
Add this line at the top of the page:
 
<?php ob_start(); ?>
 
Your problem will be solved.
 
...SuDeEp...

MikeA <[EMAIL PROTECTED]> wrote:
I am trying to do the following

header ("Location: wlserver/index.php?userKey=$userKey&show=$userKey");

but I keep getting

Warning: Cannot modify header information - headers already sent by ...

The code on the header line above is not executing so I am assuming the
previous headers being sent is causing this command to not execute. Part of
the problem is that I am modifying software written by someone else to fit
my needs. I do not want to make a lot of alterations because I don't want
to pull my hair out when the next release shows up.

Is there a command or someway to get around this problem without hacking out
all of the other header sending code?

I appreciate any help.

Thank you.

Mike

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


                        
---------------------------------
Do you Yahoo!?
 Check out the new Yahoo! Front Page.  www.yahoo.com/a

--- End Message ---
--- Begin Message ---
Hello everyone.

I have managed to solve my connection problem. Thanks to everyone who has
been helpfull.
I will write a file explaining what I have had to do for them
(mysql-apache2-php5-phpmyadmin) to work.

Meanwhile I have a problem.

Phpmyadmin has this message at the bottom of its index page.

"Warning: Unknown: 1 result set(s) not freed. Use mysql_free_result to free
result sets which were requested using mysql_query() in Unknown on line 0"

Anyone have a clue on how to fix this? Hopefully its a simple problem.


G�n. : )

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

-----Original Message-----
From: Armando [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 02, 2004 10:47 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Displaying An Image / Non-Web accessible Dir

Hi Jason,

I wonder if permissions are my problem, but... When I try and fopen the
file (using rb flags for read and binary) and try to do an fstat it
doesn't return any of the specific file information at all (lots of
zeros). I'm running Apache 2.0.51 under the LocalSystem account, and so
I assume that PHP which is loaded as an Apache module would attempt to
access the file as whatever user the Apache service is using. In which
case LocalSystem SHOULD have access. It's frustrating because I know I'm
probably missing something simple!

Armando

-----Original Message-----
From: Jason Barnett [mailto:[EMAIL PROTECTED] 
Sent: November 2, 2004 7:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Displaying An Image / Non-Web accessible Dir


> Can you or someone suggest how I can access an image file on my drive 
> which is not part of the http-accessible directories (say in
> C:\images\somepic.jpg) and display the filetype? I think once I can at
> least get that to work, the rest should be fairly simple.

If all goes well, the only thing you should need to do to open that file
would 
be to open a file with a file pointer and then do whatever you want with
the 
file pointer.  Your PHP user will need read and / or write access to the
file(s) 
in question, you can right-click them to check on this.

<?php

// any file, so long as PHP user can read it
$file = 'C:\\images\\somepic.jpg';
$fp = fopen($file, 'r');
// do stuff, not sure what you wanted ewxactly but this gives you an
idea echo 'Is this a directory?  '; echo is_dir($fp) ? 'yes' : 'no';
echo '<pre>'; print_r(fstat($fp)); echo '</pre>'; // etc.

?>

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

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

I have two servers running IIS 5/php 5.02. One can write php cookies,
while the other can't.  
The one that works is on a LAN while the public machine is giving me
trouble.  
Their .ini files (for cookies/sessions) are identical, as is the
script...  which seems to only leave IIS (which I am not extra familiar
with).  Is there some setting in IIS that would not allow cookies to be
sent from a server?

Thanks,
Sean

--- End Message ---

Reply via email to