Page 6 of 6 FirstFirst ... 456
Results 76 to 79 of 79

Thread: thttpd problem

  1. #76
    thanks to the both of you.
    I used both things.
    .htpasswd to set up some security on the directory, and chown on the directory, so it's possible to delete a certain file...

  2. #77

    Question How to increase thttpd traces level? (crash)

    Hi,

    I try to install gallery 2.3.1, but at step 4 (storage creation) the installation is crashing with the server.

    I would like to take valuable traces from the web server or php, to know if the problem comes from my server configuration, a missing ipkg that is needed by a basic dev function of the gallery installer, or the gallery installer itself.

    After the click, it is like the webserver is freezed (no action: page is loading, no error page) and after 6-10minutes, the page becomes empty/released meanwhile the thttpd process is stopped.
    Here is the last line of the only server traces with no relevant information /opt/var/log/thttpd.log in our case:

    Code:
    192.168.3.254 - - [28/Feb/2010:23:28:34 +0100] "GET /gallery2/install/index.php?step=4 HTTP/1.1" 200 8493 "http://xxxxxxxxxx/gallery2/install/index.php?step=3" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; MS-RTC LM 8; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)"

    Is there a way to increase level of traces of php-thttpd webserver ?

    And/or do you have an idea of a missing ipkg?


    ANNEXES

    Here are my ipkg
    apr - 1.3.12-1
    apr-util - 1.3.9-1
    autoconf - 2.63-1
    automake - 1.10-2
    bash - 3.2.49-1
    bison - 2.4.1-1
    buildroot - 4.1.1-13
    bzip2 - 1.0.5-2
    coreutils - 8.4-1
    cyrus-sasl-libs - 2.1.23-1
    diffutils - 2.9-1
    e2fslibs - 1.41.9-1
    enhanced-ctorrent - dnh3.3.2-11
    expat - 2.0.1-1
    ffmpeg - 0.svn20080409-2
    file - 5.04-1
    findutils - 4.2.32-1
    flex - 2.5.35-1
    freetype - 2.3.6-1
    gawk - 3.1.7-1
    gdbm - 1.8.3-2
    groff - 1.19.2-2
    gzip - 1.2.4a-4
    imagemagick - 6.5.5.10-1
    ipkg-opt - 0.99.163-10
    libart - 2.3.17-2
    libdb - 4.2.52-3
    libidn - 1.16-1
    libjpeg - 6b-3
    liblcms - 1.15-1
    libpng - 1.2.42-1
    libtiff - 3.9.2-1
    libtool - 1.5.26-1
    libuclibc++ - 0.2.2-8
    libxml2 - 2.7.6-1
    libxslt - 1.1.26-1
    m4 - 1.4.13-1
    make - 3.81-2
    microperl - 5.8.8-11
    mysql - 4.1.22-3
    nano - 2.2.1-1
    ncurses - 5.7-1
    ncursesw - 5.7-1
    neon - 0.29.3-1
    openldap-libs - 2.3.43-1
    openssh-sftp-server - 5.3p1-1
    openssl - 0.9.7m-5
    optware-devel - 6.8-10
    patch - 2.6.1-1
    pcre - 8.01-1
    perl - 5.8.8-23
    php - 5.2.12-1
    php-mbstring - 5.2.12-1
    php-mysql - 5.2.12-1
    php-pgsql - 5.2.12-1
    php-thttpd - 2.25b-5.2.12-1
    pkgconfig - 0.15.0-2
    postgresql - 8.2.13-2
    python25 - 2.5.5-2
    readline - 6.1-1
    rrdtool - 1.2.30-1
    rsync - 3.0.7-1
    screen - 4.0.3-2
    sed - 4.2.1-1
    sqlite - 3.6.22-1
    svn - 1.6.9-1
    tar - 1.22-2
    tcl - 8.4.19-2
    termcap - 1.3.1-2
    uclibc-opt - 0.9.28-13
    wget-ssl - 1.12-2
    zlib - 1.2.3-3
    php-curl php-dev php-fcgi php-gd php-imap php-ldap php-mbstring php-pear php-xmlrpc


    Gallery suspected function causing thttpd crash:
    (otherwise probe html file would have been deleted)

    install/steps/StorageSetupStep.class
    function _isStoragePathWebAccessible

    Code:
        /**
         * Try to protect the given folder with a .htaccess file from direct web-access.
         * And then check if the given folder is web-accessible either way.
         * Precondition: gallery and g2data folders exist.
         *
         * @return array(boolean false if check procedure failed due to platform issues,
         *               boolean true if the folder is accessible from the web (=insecure))
         */
        function _isStoragePathWebAccessible($dir) {
            /* Check if we can use fsockopen. Else we can't test it at all. */
            if (!function_exists('fsockopen')
                    || in_array('fsockopen', preg_split('/,\s*/', ini_get('disable_functions')))) {
                return array(false, false);
            }
    
            /* Add a .htaccess file. */
            if (!secureStorageFolder($dir)) {
                return array(false, false);
            }
            /* Add a probe file. */
            $probeFileName = 'probe_' . substr(md5(uniqid(rand())), 0, 10) . '.html';
            $probeFilePath = $dir . $probeFileName;
            $checkString = md5(rand());
            $fh = @fopen($probeFilePath, 'w');
            if ($fh) {
                $contents = "<html><head><title>Probe</title><body>$checkString</body></html>";
                fwrite($fh, $contents);
                fclose($fh);
            }
    
            if (!file_exists($probeFilePath)) {
                return array(false, false);
            }
    
            /* Try to guess the URL to the g2data folder. */
            $storageUrlCandidates = array();
            /* Get the URL of the G2 folder. */
            $galleryUrl = getGalleryDirUrl();
            /* Get the relative path of the g2data folder to the gallery dir. */
            $storagePath = realpath($dir);
            $galleryPath = realpath(dirname(dirname(dirname(__FILE__))));
            if (strpos($storagePath, $galleryPath) === 0) {
                /* The g2data folder is within the gallery folder. */
                $relativeStoragePath = substr($storagePath, strlen($galleryPath) + 1);
                $relativeStoragePath = str_replace("\\", '/', $relativeStoragePath);
                $storageUrlCandidates[] = $galleryUrl . $relativeStoragePath . '/';
            } else {
                /*
                 * The g2data folder is in another directory tree.
                 * Try to remove the common part of the paths and then construct a URL.
                 */
                $galleryPathElements = explode(DIRECTORY_SEPARATOR, $galleryPath);
                $storagePathElements = explode(DIRECTORY_SEPARATOR, $storagePath);
                $max = 30;
                /* Before: e.g. /foo/bar/gallery2/ and /foo/bar/g2data/. */
                while (!empty($galleryPathElements) && !empty($storagePathElements) && $max-- > 0
                        && $galleryPathElements[0] == $storagePathElements[0]) {
                    array_shift($storagePathElements);
                    array_shift($galleryPathElements);
                }
                /* After, e.g. /g2data/ (common part removed). */
                $relativeStoragePath = implode('/', $storagePathElements);
    
                $storageUrlCandidates[] = getBaseUrl() . '/' . $relativeStoragePath . '/';
                if (preg_match('!^.*?://.*?/[^/]+!', $galleryUrl, $matches)) {
                    $storageUrlCandidates[] = $matches[0] . '/' . $relativeStoragePath . '/';
                }
            }
    
            /* Also try the default path and other common paths. */
            $storageUrlCandidates[] = $galleryUrl . basename($dir) . '/';
            $storageUrlCandidates[] = getBaseUrl() . '/' . basename($dir) . '/';
    
            /* Try to fetch the probe file. */
            $isAccessible = false;
            foreach ($storageUrlCandidates as $storageFolderUrl) {
                $url = $storageFolderUrl . $probeFileName;
                list ($urlFetched, $isAccessible) = $this->_isUrlAccessible($url, $checkString);
                if ($urlFetched && $isAccessible) {
                    $isAccessible = true;
                    break;
                }
            }
    
            /* Cleanup: Delete the probe file. */
            unlink($probeFilePath);
    
            return array(true, $isAccessible);
        }

  3. #78

    php problem module load(mysql thttpd zenphoto)

    Hello ppl,

    I am trying to get the Zenphoto gallery working on a wl500gp.

    I managed to get Mysql working.
    I tried with lighttpd but without success. Tried the Thttpd -- i think beter.

    The problem and the question:
    php.log gives me the following errors and I can't find anything on them or how to fix this:

    Code:
    Module compiled with module API=20060613, debug=0, thread-safety=1                                                                                           
    PHP    compiled with module API=20060613, debug=0, thread-safety=0
    AND this happens with every module I try to load. How to match thread-safety???

    HELP?

  4. #79
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    What exactly didn't work with the lighttpd?
    have you tried my how-to: http://wl500g.info/showthread.php?t=20306 if so, please tell me what went wrong so I can improve it

    lighttpd is a lot better for web packages like Zenphoto gallery, especially when you'd like to share it with the world.

Page 6 of 6 FirstFirst ... 456

Similar Threads

  1. WL-500gP and Asus support experience
    By Blezi in forum WL-500gP Q&A
    Replies: 6
    Last Post: 03-12-2006, 12:59
  2. Problem with dieing AIR-connection
    By BòóN in forum WL-500g Q&A
    Replies: 7
    Last Post: 26-10-2004, 12:04

Tags for this Thread

Posting Permissions

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