Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-15 Thread BBC
 On Sun, July 9, 2006 12:00 pm, BBC wrote:
  Hi list... Thank for answering my questions before. I love to be a
  member of
  this list. Guys... I got another problem with GD library v2. I don't
  know
  why every time the script run the syntax which uses GD, the page
  turned
  becomes source code view. So when we need that page in normal view, we
  had
  to push the 'back button' twice.
 
 Show us the URL to your page, and its source...
 
 We cannot guess from this description what you've managed to do.
Sorry the code I was talking about is in administrator page group, so you need 
to insert username and password to get into it.
I don't think I can give you the username and password through this list. And 
thank for the next input for error_log()..

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



[PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread BBC
Hi list... Thank for answering my questions before. I love to be a member of
this list. Guys... I got another problem with GD library v2. I don't know
why every time the script run the syntax which uses GD, the page turned
becomes source code view. So when we need that page in normal view, we had
to push the 'back button' twice.

This is insecure for my page cause every body can see the source which I
should hide it. And it'll take some more time, every time we need to keep it
working normally; pushing the 'back button' twice is needed.

Does anyone have any ideas how to get page runs normally? I mean it was ok
the browser can do the script but it couldn't' show the page in normal view

Thank for your input.
 Best Regards
BBC
 **o0o**

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



Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread Kim Christensen

On 7/9/06, BBC [EMAIL PROTECTED] wrote:

I don't know why every time the script run the syntax which uses GD, the page 
turned
becomes source code view. So when we need that page in normal view, we had
to push the 'back button' twice.


I guess we would need to see some code samples to get things going,
preferrably the GD part which seems to be the issue :-)

Best regards
--
Kim Christensen

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



Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread BBC


 On 7/9/06, BBC [EMAIL PROTECTED] wrote:
  I don't know why every time the script run the syntax which uses GD, the 
  page turned
  becomes source code view. So when we need that page in normal view, we had
  to push the 'back button' twice.
 
 I guess we would need to see some code samples to get things going,
 preferrably the GD part which seems to be the issue :-)

Here are the Codes I used :

$tumbsize = 150;
$imgfile = $some_where;
$imgdst = $where_to;
header('Content-type: image/jpeg');
list($width,$height) = getimagesize($imgfile);
$imgratio = $width/$height;
if($imgratio1)
{
 $newwidth = $tumbsize;
 $newheight = (int)($tumbsize / $imgratio);
}else{
 $newheight = $tumbsize;
 $newwidth = (int)($tumbsize * $imgratio);
}
$tumb = ImageCreateTrueColor($newwidth,$newheight);
$source = ImageCreateFromJpeg($imgfile);
$hai = 
ImageCopyResized($tumb,$source,0,0,0,0,$newwidth,$newheight,$width,$height);
ImageJpeg($tumb,$imgdst,100);
if ($hai)
{
echo Resizing is successfulbr ;
}else{
copy($some_where,$where_to);
}

And thank for your input..

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



Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread Andrei

I think you should make up your mind what u display to user... image
or text...

Andrei

BBC wrote:
 
 On 7/9/06, BBC [EMAIL PROTECTED] wrote:
 I don't know why every time the script run the syntax which uses GD, the 
 page turned
 becomes source code view. So when we need that page in normal view, we had
 to push the 'back button' twice.
 I guess we would need to see some code samples to get things going,
 preferrably the GD part which seems to be the issue :-)
 
 Here are the Codes I used :
 
 $tumbsize = 150;
 $imgfile = $some_where;
 $imgdst = $where_to;
 header('Content-type: image/jpeg');
 list($width,$height) = getimagesize($imgfile);
 $imgratio = $width/$height;
 if($imgratio1)
 {
  $newwidth = $tumbsize;
  $newheight = (int)($tumbsize / $imgratio);
 }else{
  $newheight = $tumbsize;
  $newwidth = (int)($tumbsize * $imgratio);
 }
 $tumb = ImageCreateTrueColor($newwidth,$newheight);
 $source = ImageCreateFromJpeg($imgfile);
 $hai = 
 ImageCopyResized($tumb,$source,0,0,0,0,$newwidth,$newheight,$width,$height);
 ImageJpeg($tumb,$imgdst,100);
 if ($hai)
 {

Well either you display an image (which you should do bcuz you set
already the header) or you display a text...

 echo Resizing is successfulbr ;
 }else{
 copy($some_where,$where_to);
 }
 
 And thank for your input..
 

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



Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread Richard Lynch
On Sun, July 9, 2006 12:00 pm, BBC wrote:
 Hi list... Thank for answering my questions before. I love to be a
 member of
 this list. Guys... I got another problem with GD library v2. I don't
 know
 why every time the script run the syntax which uses GD, the page
 turned
 becomes source code view. So when we need that page in normal view, we
 had
 to push the 'back button' twice.

Show us the URL to your page, and its source...

We cannot guess from this description what you've managed to do.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread Richard Lynch
On Fri, July 14, 2006 3:34 am, BBC wrote:
 On 7/9/06, BBC [EMAIL PROTECTED] wrote:

 $tumbsize = 150;
 $imgfile = $some_where;
 $imgdst = $where_to;
 header('Content-type: image/jpeg');
 list($width,$height) = getimagesize($imgfile);
 $imgratio = $width/$height;
 if($imgratio1)
 {
  $newwidth = $tumbsize;
  $newheight = (int)($tumbsize / $imgratio);
 }else{
  $newheight = $tumbsize;
  $newwidth = (int)($tumbsize * $imgratio);
 }
 $tumb = ImageCreateTrueColor($newwidth,$newheight);
 $source = ImageCreateFromJpeg($imgfile);
 $hai =
 ImageCopyResized($tumb,$source,0,0,0,0,$newwidth,$newheight,$width,$height);
 ImageJpeg($tumb,$imgdst,100);
 if ($hai)
 {
 echo Resizing is successfulbr ;

This right here is going to mess things up...

You've told the browser that you are sending a JPEG.

The text above is not part of a valid JPEG.

Use error_log() and check your Apache/whatever error logs when
generating non HTML output.

 }else{
 copy($some_where,$where_to);
 }

 And thank for your input..

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




-- 
Like Music?
http://l-i-e.com/artists.htm

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