php_gd2.dll - anyone using (and can help)?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
sikoriusz
-


Joined: 25 Mar 2004
Posts: 5
Location: Krakow, Poland, Europe

PostPosted: Wed Oct 06, 2004 10:08 pm    Post subject: php_gd2.dll - anyone using (and can help)? Reply with quote

Hi, I'm a newbie to graphics in php. Using command:
Quote:
<?php
header("Content-type: image/jpeg");
(etc.)

(thats a tutorial example), I get :
Quote:
Warning: Cannot modify header information - headers already sent by (output started at C:\internet\Abyss Web Server\htdocs\index2.php:2) in C:\internet\Abyss Web Server\htdocs\index2.php on line 2

Any suggestions? The dll is in the extensions folder and php.ini, so I got no idea how to solve this.
Back to top View user's profile Send private message Visit poster's website
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Thu Oct 07, 2004 9:14 am    Post subject: Reply with quote

the "header" command must be sent before any other output is produced. this command alters the url in the address bar and redirects the user to that page.

There is output sent to the browser from line 2 of your script preventing this command from running.
_________________
Olly
Back to top View user's profile Send private message
sikoriusz
-


Joined: 25 Mar 2004
Posts: 5
Location: Krakow, Poland, Europe

PostPosted: Fri Oct 08, 2004 11:53 am    Post subject: Reply with quote

You have to excuse me, but I don't get it...
Back to top View user's profile Send private message Visit poster's website
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Fri Oct 08, 2004 6:18 pm    Post subject: Reply with quote

To use

header("Content-type: image/jpeg");

no other information can be sent to the user BEFORE this line. Your script is returning an error because something is being sent from another part of your script. If you read your error message again it gives you the location. It doesn't get any simpler than that...
Back to top View user's profile Send private message
Karasu Kami
-


Joined: 22 Sep 2003
Posts: 712
Location: Colorado

PostPosted: Mon Nov 01, 2004 11:00 am    Post subject: Reply with quote

It seems the msot recent versions of PHP outdate packages (Like the Zpanel.) and make it so they don't find the proper directory for the extensions.

To fix this, i just copied the php_GD2.dll into whatever directory that it asked for, it could be c:/php4 or c:/php rather then c:/php/extensions. Try them all.
_________________
Thank you all. Aprelium most importantly.
*Some may not be complete*
http://paeon-hosting.com
http://quartermoon.info
http://loc.paeon-hosting.com
http://genjipoetry.paeon-hosting.com
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Kent
-


Joined: 12 Jan 2003
Posts: 137

PostPosted: Sun Nov 07, 2004 7:47 pm    Post subject: extension_dir = "c:\php" Reply with quote

when php refuses to find your dlls and asks for a php4 dir and your crap is in a dir called php go into your php.ini file in your c:/windows dir and add the following into it
extension_dir = "c:\php"
this will solve your problems of having to create un-needed dirs on your box.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group