500 Internal Server Error [something interesting]...

Discussion in 'PHP' started by angelherriv, Jun 9, 2006.

  1. #1
    Hello, I have a very interesting problem, I have a php file on my web site with the below code, all files and folders on my site are with 755 permissions, this code work ok, but when I uncomment lines 07 and 08, and comment lines 09 and 10, the server throw me an error, specifically "500 Internal Server Error", and my error log says:
    "[Fri Jun 9 09:09:09 2006] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: /the/path/of/my/files/test.php ". I don't understaind where is the error, because on my local server both cases work properly and here not, for additional information, I have my site on http://www.100webspace.com with the "http://mysubdomain.idohost.com" domain, because "100webspace.com" offer the possibility to change from "100webspace" to "idohost", thanks for your help.


    [01]<?php
    [02] $dir = "imagenes/galeria";
    [03] $directory = dir($dir);
    [04] while ($file = $directory->read()) {
    [05] if (eregi("^[a-zA-Z0-9]+\.jpe?g$", $file)) {
    [06] $file = $dir."/".$file;
    [07]// $source = imagecreatefromjpeg($file);
    [08]// $array[] = array($file, imagesx($source), imagesy($source));
    [09] $array[] = array("one", "image", "found");
    [10] echo $array[0][0]." ".$array[0][1]." ".$array[0][2]."<br>";
    [11] }
    [12] }
    [13] $directory->close();
    [14] echo count($array)." images found<br>";
    [15]?>
     
    angelherriv, Jun 9, 2006 IP
  2. sacx13

    sacx13 Active Member

    Messages:
    438
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #2
    I think you don't have installed gd component or if you have it probably is crashing. Talk with the guys from http://www.100webspace.com to corect the problem, because is not normal to crash with 500.

    Regards
     
    sacx13, Jun 12, 2006 IP