Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 02-05-2008, 12:20 PM   #1
Christopher Derr
 
Christopher Derr's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Content-Type header

Well, after a longer-than-it-should-have-been bout with PHP3-4
Migration, everything works except one thing...

At the top of all PHP documents...I get the text:

Content-Type:

That's significantly reduced from what it was (X-powered-by PHP4...yadda
yadda yadda) by editing the php.ini file. But for the life of me, I
can't get that last thing to go away. My inkling is that somehow I
managed to download a beta version of 4.0 (used the front page oh
php.net to get the windows binaries so I don't know...) and that this
just occurs in the beta.

So where you can edit most of the stuff out, is in the line beginning
with:

; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.
; PHP's built-in default is text/html
default_mimetype =;
default_charset =;

You see that I've set the default types to, well, nothing. I've REMed
them out too, but that just makes the default "Content-type: text/html"
spring up instead.

Thanks for any help...

Chris

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 02-05-2008, 12:21 PM   #2
Stas Trefilov
 
Stas Trefilov's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PHP-WINDOWS] Content-Type header

Christopher Derr wrote:
>
> Well, after a longer-than-it-should-have-been bout with PHP3-4
> Migration, everything works except one thing...
>
> At the top of all PHP documents...I get the text:
>
> Content-Type:
>


You got to REM all your old PHP3 modules loading in php.ini, like
extension=php3_dbm.dll

> So where you can edit most of the stuff out, is in the line beginning
> with:
>
> ; As of 4.0b4, PHP always outputs a character encoding by default in
> ; the Content-type: header. To disable sending of the charset, simply
> ; set it to be empty.
> ; PHP's built-in default is text/html
> default_mimetype =;
> default_charset =;
>


Those were absolutely painless lines: you see the Content-type headers just
because when starting to process your file and before outputing any headers like
Content-type and X-Powered-By PHP4 outputs an error message about the fact it
can't load old extension file from your php.ini.
So this message is considered by a browser as a header, and real headers
following that message are considered a beginning of an html document.
You got to download new libraries from http://download.swwwing.com/php4/modules

--
Stas Trefilov
Moscow Russia
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 02-05-2008, 12:21 PM   #3
Stas Trefilov
 
Stas Trefilov's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PHP-WINDOWS] Content-Type header

Jens Lidgren wrote:
>
> I have just php4 installed on a Apache-server, and I use Wk2 pro. There's no
> modules from php3 left in my php.ini file but I still keep getting content
> type: at the top of all of my pages. Any other suggestions?
>



Anyway when you got the headers in place of html, it means that you have an
error message in place of headers.

Try to run the script from command line, type the following in your php-doc-dir:
php.exe test.php > aaa.txt
and watch the output. You got to see the error onscreen or in the file aaa.txt.
If not, the error is generated by Apache. This should not be the case. If it is,
we got to think thoroughly.

--
Stas Trefilov
Moscow Russia


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 02-05-2008, 12:21 PM   #4
Stas Trefilov
 
Stas Trefilov's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PHP-WINDOWS] Content-Type header

Jens Lidgren wrote:
>
> I have just php4 installed on a Apache-server, and I use Wk2 pro. There's no
> modules from php3 left in my php.ini file but I still keep getting content
> type: at the top of all of my pages. Any other suggestions?
>



Anyway when you got the headers in place of html, it means that you have an
error message in place of headers.

Try to run the script from command line, type the following in your php-doc-dir:
php.exe test.php > aaa.txt
and watch the output. You got to see the error onscreen or in the file aaa.txt.
If not, the error is generated by Apache. This should not be the case. If it is,
we got to think thoroughly.

--
Stas Trefilov
Moscow Russia


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags:




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
X-Powered-By: PHP... Content-Type: ... solved Stas Trefilov PHP 3 02-05-2008 12:21 PM
why every page show "X-Powered-By: PHP/4.0RC1 Content-type:" Aming PHP 2 02-05-2008 12:20 PM
Header warnings??? Why?? Phil Powell PHP 4 07-01-2007 5:10 PM
php header for images Ian.H [dS] PHP 0 07-01-2007 3:58 PM
Serial Port Header? Tom Lake Motherboards 1 06-11-2007 1:09 PM


Featured Websites




All times are GMT +1. The time now is 12:23 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98