Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032

    php problem? Apache problem? Mime? Script can't do upload....

    I have tried and tested the script on 2 seperate servers. And one is able to load music or audio file formats like mp3 or mpg but the other doesn't....

    one running Apache 1.3 and php 4.3.11 with this configuration and teh script works fine
    php Configuration
    './configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' '--with-jpeg-dir=/usr/lib' '--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf' '--with-db' '--with-gdbm' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared' '--enable-xml' '--enable-ftp' '--disable-debug' '--with-libdir=/usr/lib' '--with-db3' '--with-interbase=shared'

    Apache Configuration
    mod_ssl, mod_php4, mod_casp2, mod_setenvif, mod_unique_id, mod_auth, mod_auth_pam_external, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_frontpage, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_define, mod_env, mod_perl, mod_so, http_core
    the one loaded here don't work at all...
    php Configuration
    core prefork http_core mod_so mod_perl sapi_apache2 mod_python mod_ssl mod_access mod_auth mod_auth_anon mod_auth_dbm mod_auth_digest mod_include mod_log_config mod_env mod_mime_magic mod_cern_meta mod_expires mod_headers mod_usertrack mod_unique_id mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_proxy proxy_ftp proxy_http proxy_connect mod_cgi mod_layout

    Apache Configuration
    './configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'
    When loading certain files through that script in the problem server, the script will generate a "The page cannot be displayed" on IE

    I suspect that certain modules are leftout or not compile for the Apache2.0.52 and php4.3.10 either that or could it be that the server can't understand extensions and i got to write it on to the httpd.conf file myself??

    I am confused....

    If you would like to see the happenings on both servers below is the infrmation

    --- Working Server ---
    http://members.galacnet.com/shp.php
    userID : tester
    password : tester

    --- Non-Working Server ---
    http://www.sky-zone.net/shp.php
    userID : tester
    password : tester

    Thanks for your help.
    -=- GQ Hong -=-
    GalacNet WebMaster

  2. #2
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Can you compare directives for mod_mime and mod_mime_magic in httpd.conf on both servers and also compare mime.types files httpd.conf includes?

    Also inspect AddType directives on both.


    When loading certain files through that script in the problem server, the script will generate a "The page cannot be displayed" on IE
    And what does error_log say to this?

  3. #3
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    the error generated was

    [Mon May 30 21:00:16 2005] [error] an unknown filter was not added: PHP
    [Mon May 30 21:00:16 2005] [error] [client 210.193.34.221] Requested content-length of 3454864 is larger than the configured limit of 524288, referer: http://www.sky-zone.net/shp.php
    Strange... I already set the upload to 16megabytes....

    mime.tyes in the faulty server shows that the extension is available
    audio/mpeg mpga mp2 mp3
    -=- GQ Hong -=-
    GalacNet WebMaster

  4. #4
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    And a little question....
    When uploaded, do I need to AddType to make it work??

    Doesn't stream at all for loading small files up.... Worse yet... I can't find where is the upload limiter.... from phpinfo() it says 16M
    -=- GQ Hong -=-
    GalacNet WebMaster

  5. #5
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    Strange... I already set the upload to 16megabytes....
    Look here:

    After checking "/var/log/httpd/error_log" I am getting the following error message.

    "Requested content-length of 660173 is larger than the configured limit of 524288"

    This problem is solved by increasing value of "LimitRequestBody" in "/etc/httpd/conf.d/php.conf" file from default value 524288 to 8MB and "memory_limit" value from 8M to 32M in "/etc/php.ini".

    so increase the LimitRequestBody 524288.


    Taken from here:

    http://bugs.informationgateway.org/p....php?bug_id=96


    For the faulty Apache 2 and unknown filter. Do you have


    AddType application/x-httpd-php .php .php4 .php3 .phtml


    or similar in your httpd.conf?


    If not, try putting it. If you have it and doesn't work, try replacing it with:


    AddHandler php-script php
    AddType text/html php

    # PHP Syntax Coloring
    # (optional but useful for reading PHP source for debugging):
    AddType application/x-httpd-php-source phps

    Note 1: The php documentation recommends AddType application/x-httpd-php php instead of the above. However, it causes problems with the "MultiViews" feature of HTTP. That is, if the .php extension is left off a URL, and with certain browser Accept headers, Apache will not know .php (application/x-httpd-php) is HTML and will return a 406 Not Acceptable error. Using the AddType and AddHandler as shown above fixes this problem.


    Source taken from here:

    http://dan.drydog.com/apache2php.html


    And if that doesn't work, try commenting it out and adding:


    Code:
    <Files *.php> 
       SetOutputFilter PHP 
       SetInputFilter PHP
       #Put your desired sizes here!
       LimitRequestBody 524288 
    </Files> 
    
    <Files *.phtml>
       SetOutputFilter PHP
       SetInputFilter PHP
    </Files>
    Try what you need in the order I gave you, using SecOutputFilter as the last resort.

    Reference: http://www.apacheref.com/ref/http_co...questBody.html
    http://httpd.apache.org/docs-2.0/mod...etoutputfilter

  6. #6
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    So to make it stream vidoe and music I add

    AddType audio/mpeg mpga mp2 mp3

    to php.conf??
    -=- GQ Hong -=-
    GalacNet WebMaster

  7. #7
    Join Date
    Jan 2004
    Location
    Singapore
    Posts
    1,032
    Opps Got it running
    Once again you were a life saver

    Thank You.
    -=- GQ Hong -=-
    GalacNet WebMaster

  8. #8
    Join Date
    Jul 2004
    Location
    Reporting Live from Marrz
    Posts
    257
    No problem, glad you got it workin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •