getimagesize funktioniert nicht im selbst kompiliertem PHP 5.2.17

AlexD1979

Erfahrenes Mitglied
Hallo,
Ich habe eine Typo3 Webseite von einem Hoster auf einen eigenen Server umgezogen. In der Programmierung wird öftres mal ein getimagesize genutzt, um die Größe von swf zu ermitteln. Nun gibt es im Log die Fehlermeldung :
Code:
"The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled"

Mein Configure sah so aus:
Code:
./configure --prefix=/opt/php5.2 --with-config-file-path=/opt/php5.2 --with-mysqli --with-mysql --with-pdo-mysql --with-curl --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-cli --enable-fastcgi --enable-discard-path --enable-force-cgi-redirect --enable-mbstring --with-bz2 --enable-gd-native-ttf --enable-calendar --with-gmp --enable-bcmath --with-xpm-dir=/usr --enable-soap --with-openssl --with-zlib

Es ist ein Ubuntu 12.04.1 64 Bit mit Apache 2.2.22 aus Ubuntu-Quelle und einem PARALLEL installiertem PHP53 aus Ubuntu Quelle als Apache Modul. Das PHP5.2 ist als CGI eingehängt.

Für die Installation von ZLIB habe ich mich an die Anleitung gehalten, nur eben mit dem aktuellen Package 1.2.7
http://www.techsww.com/tutorials/libraries/zlib/installation/installing_zlib_on_ubuntu_linux.php
 
Versuch mal, zlib so zu konfigurieren:

Bash:
./configure --prefix=/usr/local/zlib --enable-static --disable-shared

EDIT: Kompletter Unsinn. Mit der Meldung ist sehr wahrscheinlich gemeint, dass zlib als PHP-Erweiterung nicht statisch gelinkt ist. Konfiguriere PHP mal mit --with-zlib=static.
 
Zuletzt bearbeitet:
Hi,
Danke für den Hinweis. WEnn ich PHP Configure mache, dann resultiert bei --with-zlib=static als Fehlermeldung:
checking whether to include ZLIB support... yes
configure: error: Cannot find libz
Ich probiere es gerade mit --with-zlib=/usr
 
Ich würde darauf tippen, das configure nach der libz.a sucht, auf deinem System aber nur die libz.so vorhanden ist. Führe das configure noch mal mit --with-zlib=static aus und hänge das config.log an.
 
Normalerweise im gleichen Ordner, in dem auch das configure Script liegt. Wird während des Konfigurationsvorgangs geschrieben. Mir ist klar, das configure dann abbricht. Warum, steht im config.log drin.

EDIT: Hab gerade gelesen, das man eine static Version der zlib braucht. Die erstellt man wie oben beschrieben mit --enable-static --disable-shared. Aber es gibt noch eine ganz andere Lösung für dein Problem: http://www.phpclasses.org/package/1653-PHP-Parse-header-of-Flash-files-to-extract-metadata.html
 
Zuletzt bearbeitet:
Code:
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char dn_skipname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dn_skipname();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_dn_skipname) || defined (__stub___dn_skipname)
choke me
#else
dn_skipname();
#endif

; return 0; }
configure:15568: checking for __dn_skipname
configure:15596: gcc -o conftest -g -O2   conftest.c -lresolv -lm -ldl -lnsl  1>&5
configure:15915: checking for ANSI C header files
configure:16023: checking for dirent.h that defines DIR
configure:16061: checking for opendir in -ldir
configure:16202: checking for inttypes.h
configure:16202: checking for stdint.h
configure:16202: checking for dirent.h
configure:16202: checking for ApplicationServices/ApplicationServices.h
configure:16202: checking for sys/param.h
configure:16202: checking for sys/types.h
configure:16202: checking for sys/time.h
configure:16202: checking for netinet/in.h
configure:16202: checking for alloca.h
configure:16202: checking for arpa/inet.h
configure:16202: checking for arpa/nameser.h
configure:16202: checking for assert.h
configure:16202: checking for crypt.h
configure:16202: checking for fcntl.h
configure:16202: checking for grp.h
configure:16202: checking for ieeefp.h
configure:16202: checking for langinfo.h
configure:16202: checking for limits.h
configure:16202: checking for locale.h
configure:16202: checking for monetary.h
configure:16202: checking for netdb.h
configure:16202: checking for pwd.h
configure:16202: checking for resolv.h
configure:16202: checking for signal.h
configure:16202: checking for stdarg.h
configure:16202: checking for stdlib.h
configure:16202: checking for string.h
configure:16202: checking for syslog.h
configure:16202: checking for sysexits.h
configure:16202: checking for sys/ioctl.h
configure:16202: checking for sys/file.h
configure:16202: checking for sys/mman.h
configure:16202: checking for sys/mount.h
configure:16202: checking for sys/poll.h
configure:16202: checking for sys/resource.h
configure:16202: checking for sys/select.h
configure:16202: checking for sys/socket.h
configure:16202: checking for sys/stat.h
configure:16202: checking for sys/statfs.h
configure:16202: checking for sys/statvfs.h
configure:16202: checking for sys/vfs.h
configure:16202: checking for sys/sysexits.h
configure:16202: checking for sys/varargs.h
configure:16202: checking for sys/wait.h
configure:16202: checking for sys/loadavg.h
configure:16202: checking for termios.h
configure:16202: checking for unistd.h
configure:16202: checking for unix.h
configure:16202: checking for utime.h
configure:16202: checking for sys/utsname.h
configure:16202: checking for sys/ipc.h
configure:16202: checking for dlfcn.h
configure:16202: checking for assert.h
configure:16247: checking for mach-o/dyld.h
configure:16288: checking for fopencookie
configure:16348: gcc -c -g -O2  conftest.c 1>&5
configure:16399: gcc -o conftest -g -O2   conftest.c -lresolv -lm -ldl -lnsl  1>&5
configure: In function 'main':
configure:16392:5: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
configure:16463: checking for broken getcwd
configure:16478: checking for broken libc stdio
configure:16567: checking whether struct tm is in sys/time.h or time.h
configure:16601: checking for tm_zone in struct tm
configure:16673: checking for missing declarations of reentrant functions
configure:16682: gcc -c -g -O2  conftest.c 1>&5
configure:16707: gcc -c -g -O2  conftest.c 1>&5
configure:16732: gcc -c -g -O2  conftest.c 1>&5
configure:16757: gcc -c -g -O2  conftest.c 1>&5
configure:16782: gcc -c -g -O2  conftest.c 1>&5
configure:16803: checking for fclose declaration
configure:16812: gcc -c -g -O2  conftest.c 1>&5
configure:16838: checking for tm_gmtoff in struct tm
configure:16874: checking for struct flock
configure:16916: checking for socklen_t
configure:16959: checking size of size_t
configure:16998: checking size of long long
configure:17037: checking size of long long int
configure:17076: checking size of long
configure:17115: checking size of int
configure:17156: checking size of intmax_t
configure:17236: checking size of ssize_t
configure:17316: checking size of ptrdiff_t
configure:17396: checking for st_blksize in struct stat
configure:17431: checking for st_blocks in struct stat
configure:17471: checking for st_rdev in struct stat
configure:17506: checking for size_t
configure:17539: checking for uid_t in sys/types.h
configure:17575: checking for struct sockaddr_storage
configure:17609: checking for field sa_len in struct sockaddr
configure:17646: checking for IPv6 support
configure:17676: checking for vprintf
configure:17863: checking for alphasort
configure:17863: checking for asctime_r
configure:17863: checking for chroot
configure:17863: checking for ctime_r
configure:17863: checking for cuserid
configure:17863: checking for crypt
configure:17863: checking for flock
configure:17863: checking for ftok
configure:17863: checking for funopen
configure:17863: checking for gai_strerror
configure:17863: checking for gcvt
configure:17863: checking for getloadavg
configure:17863: checking for getlogin
configure:17863: checking for getprotobyname
configure:17863: checking for getprotobynumber
configure:17863: checking for getservbyname
configure:17863: checking for getservbyport
configure:17863: checking for getrusage
configure:17863: checking for gettimeofday
configure:17863: checking for gmtime_r
configure:17863: checking for getpwnam_r
configure:17863: checking for getgrnam_r
configure:17863: checking for getpwuid_r
configure:17863: checking for grantpt
configure:17863: checking for inet_ntoa
configure:17863: checking for inet_ntop
configure:17863: checking for inet_pton
configure:17863: checking for isascii
configure:17863: checking for link
configure:17863: checking for localtime_r
configure:17863: checking for lockf
configure:17863: checking for lchown
configure:17863: checking for lrand48
configure:17863: checking for memcpy
configure:17863: checking for memmove
configure:17863: checking for mkstemp
configure:17863: checking for mmap
configure:17863: checking for nl_langinfo
configure:17863: checking for perror
configure:17863: checking for poll
configure:17863: checking for ptsname
configure:17863: checking for putenv
configure:17863: checking for realpath
configure:17863: checking for random
configure:17863: checking for rand_r
configure:17863: checking for regcomp
configure:17863: checking for res_search
configure:17863: checking for scandir
configure:17863: checking for setitimer
configure:17863: checking for setlocale
configure:17863: checking for localeconv
configure:17863: checking for setenv
configure:17863: checking for setpgid
configure:17863: checking for setsockopt
configure:17863: checking for setvbuf
configure:17863: checking for shutdown
configure:17863: checking for sin
configure:17863: checking for snprintf
configure:17863: checking for srand48
configure:17863: checking for srandom
configure:17863: checking for statfs
configure:17863: checking for statvfs
configure:17863: checking for std_syslog
configure:17863: checking for strcasecmp
configure:17863: checking for strcoll
configure:17863: checking for strdup
configure:17863: checking for strerror
configure:17863: checking for strftime
configure:17863: checking for strnlen
configure:17863: checking for strptime
configure:17863: checking for strstr
configure:17863: checking for strtok_r
configure:17863: checking for symlink
configure:17863: checking for tempnam
configure:17863: checking for tzset
configure:17863: checking for unlockpt
configure:17863: checking for unsetenv
configure:17863: checking for usleep
configure:17863: checking for utime
configure:17863: checking for vsnprintf
configure:17917: checking for nanosleep
configure:18068: checking for getaddrinfo
configure:18158: checking for strlcat
configure:18158: checking for strlcpy
configure:18158: checking for getopt
configure:18213: checking whether utime accepts a null argument
configure:18260: checking for working alloca.h
configure:18293: checking for alloca
configure:18493: checking for declared timezone
configure:18540: checking for type of reentrant time-related functions
configure:18639: checking for readdir_r
configure:18689: checking for type of readdir_r
configure:18788: checking for in_addr_t
configure:18827: checking for crypt_r
configure:19012: checking whether to include gcov symbols
configure:19175: checking whether to include debugging symbols
configure:19226: checking layout of installed files
configure:19261: checking path to configuration file
configure:19295: checking where to scan for configuration files
configure:19331: checking whether to enable safe mode by default
configure:19366: checking for safe mode exec dir
configure:19410: checking whether to enable PHP's own SIGCHLD handler
configure:19448: checking whether to enable magic quotes by default
configure:19486: checking whether to explicitly link against libgcc
configure:19566: checking whether to enable short tags by default
configure:19604: checking whether to enable dmalloc
configure:19692: checking whether to enable IPv6 support
configure:19722: checking how big to make fd sets
configure:19793: checking size of long
configure:19832: checking size of int
configure:19872: checking for int32_t
configure:19920: checking for uint32_t
configure:19977: checking for sys/types.h
configure:19977: checking for inttypes.h
configure:19977: checking for stdint.h
configure:19977: checking for string.h
configure:19977: checking for stdlib.h
configure:20017: checking for strtoll
configure:20017: checking for atoll
configure:20017: checking for strftime
configure:20471: checking whether to enable LIBXML support
configure:20519: checking libxml2 install dir
configure:20548: checking for xml2-config path
configure:20706: checking whether libxml build works
configure:21098: checking for OpenSSL support
configure:21145: checking for Kerberos support
configure:21834: checking for DSA_get_default_method in -lssl
configure:21895: checking for pkg-config
configure:22574: checking for PCRE support
configure:23428: checking for ZLIB support
configure:23475: checking if the location of ZLIB install directory is defined
 
Zuletzt bearbeitet von einem Moderator:
Hi,
Danke für deine Hilfe, ich bin aber noch nicht weiter. Wenn ich folgendes mache gibt es eine Fehlermeldung
root@ip-10-0-0-204:/home/ubuntu/zlib-1.2.7# ./configure --prefix=/usr/local/zlib --enable-static --disable-shared
unknown option: --enable-static
./configure --help for help
 
Zurück