1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

500 Internal Server Error [OTRO DATO]...

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

  1. #1
    [reply me in english]

    Hola tengo un problema con el siguiente código, se supone que liste los nombres de todas las imágenes dentro del directorio "imagenes/galeria" con sus respectivas dimensiones. En mi servidor apache local, que tengo montado en mi ordenador corre normalmente, pero cuando lo subo para el servidor me da error, específicamente: "500 Internal Server Error", he probado cambiándole los permisos a los archivos a todos los permisos que el servidor me deja cabmiárselos, pero sigo teniendo el mismo error. Mi sitio está hospedado por: www.100webspace.com y es del dominio: [____].idohost.com (100webspace.com permite cambiar el dominio si lo deseas de 100webspace.com a idohost.com).
    Gracias de antemano.

    -----------------------------
    [EL OTRO DATO]
    mi "errorlog" dice:
    [Fri Jun 9 09:09:09 2006] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: /the/path/of/my/web/files/test.php
    -----------------------------

    <?php
    function getImagesList($dir) {
    $directory = dir($dir);
    while ($file = $directory->read()) {
    if (eregi("^[a-zA-Z0-9]+\.jpe?g$", $file)) {
    $file = $dir."/".$file;
    $source = imagecreatefromjpeg($file);
    $array[] = array($file, imagesx($source), imagesy($source));
    }
    }
    $directory->close();
    return $array;
    }
    $arr = getImagesList("imagenes/galeria");
    while(list($i, $imagesArray) = each($arr)) {
    echo $imagesArray[0].": ".$imagesArray[1].", ".$imagesArray[2]."<br>";
    }
    ?>
     
    angelherriv, Jun 9, 2006 IP