Menu ▾ ▴

#1663 lighttpd blank page

open
nobody
None
2018-02-05
2018-02-02
Anonymous
No

Originally created by: jm134

have a problem to work with lighttpd getting blank page please help
working fine with apache2

Discussion

  • Anonymous

    Anonymous - 2018-02-02

    Originally posted by: wagnered

    @jm134

    Need more information.

    Did you reinstall Ampache when you installed lighttpd?

    Did you reinstall php? A blank page often indicates a PHP module is not getting loaded.

    What version of Ampache are you running?

    What system is the lighttpd server running on: Linux, Windows, OS-X?

     
  • Anonymous

    Anonymous - 2018-02-03

    Originally posted by: jm134

    1 ampache already install from apache
    2 just cut folder ampache from apache2 to lighttpd webserver
    3 i think version 3.8.3
    4 raspbian , lighttpd linux

     
  • Anonymous

    Anonymous - 2018-02-03

    Originally posted by: jm134

    tried put this code /etc/lighhtpd/lighttpd.conf

    $HTTP["host"] == "example.com" {
    server.document-root = "/srv/http/vhosts/example.com/public/"
    url.rewrite-if-not-file += (
    "^/(.).(css|js|jpg|png|gif)$" => "$0",
    "^/rest/(.+).view$" => "/rest/index.php?ssaction=$1",
    "^/rest/fake/(.+)$" => "/play/$1",
    "^/play/art/([^/]+)/([^/]+)/([0-9]+)/thumb([0-9]
    ).([a-z]+)$" => "/image.php?object_type=$2&object_id=$3&auth=$1&thumb=$4&name=art.jpg",
    "^/play/([^/]+)/([^/]+)/([^/]+)/([^/]+)(/.)?$" => "/play/$5?$1=$2&$3=$4",
    "^/play/([^/]+)/([^/]+)(/.
    )?$" => "/play/$3?$1=$2",
    "^/play(/[^/]+|[^/]+/|/?)$" => "/play/index.php",
    "^/channel/([0-9]+)/(.*)$" => "/channel/index.php?channel=$1&target=$2"
    )
    }

     
  • Anonymous

    Anonymous - 2018-02-03

    Originally posted by: wagnered

    @jm134

    You first wrote:

    have a problem to work with lighttpd getting blank page

    Can you access Ampache from the web browser on the server?

    I just installed lighttpd and used it almost out of the box. All I had to do was set up fastcgi.conf so lighttpd could process php files and it worked.

    For accessing the subsonic api rewrite rules need to be set, but I'm not familiar with lighttpd rewrite rules. I am trying to learn about them though. Most Ampache users use Apache or ngx.

     
  • Anonymous

    Anonymous - 2018-02-03

    Originally posted by: wagnered

    @jm134,

    Here is the lighttpd rewrite rule for /rest/index.php:
    url.rewrite = ( "^/rest/([^\?]*)\.view(\?(.+))?$" => "/rest/index.php?ssaction=$1&$3",)

    This allows subsonic clients to access the Ampache Subsonic API.

    You should be able to use this as a template for the /play and /channel folders.

     
  • Anonymous

    Anonymous - 2018-02-04

    Originally posted by: jm134

    i still getting blank page when accessing ampache
    how do you get working ampache with lighttpd with fastcgi.conf?
    please give full tutorial

     
  • Anonymous

    Anonymous - 2018-02-04

    Originally posted by: jm134

    lighttpd error log

    2018-02-04 08:00:14: (log.c.164) server started
    2018-02-04 08:00:14: (server.c.1045) WARNING: unknown config-key: url.rewrite-if-not-file (ignored)
    2018-02-04 09:12:35: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Fatal error: Call to a member function quote() on null in /var/www/server/ampache/lib/class/dba.class.php on line 134

     
  • Anonymous

    Anonymous - 2018-02-04

    Originally posted by: wagnered

    @jm134

    please give a full tutorial

    I'm not a professor 😄 It is also difficult to do when I don't get enough information about the system

    Remove the hash tags (#) in fastcgi.conf and modify the fastcgi.server array like below:

    fastcgi.server = ( ".php" =>
    ( "php-local" =>
    (
    "socket" => socket_dir + "/php-fastcgi-1.socket",
    "bin-path" => "/usr/bin/php-cgi",
    "max-procs" => 1,
    "broken-scriptfilename" => "enable",
    ),
    ),
    )
    If you are running a "Redhat" based system, fastcgi.conf should be in /etc/lighttpd/conf.d/. Any file in this folder will automatically be loaded when lighttpd starts.

    Use which php-cgi on a command line interface to get the location of php-cgi and fill out the bin-path above.

    After making the change, don't forget to restart lighttpd

    url.rewrite-if-not-file doesn't exist for lighttpd: It's just url.rewrite = as I wrote in the previous comment.

     
  • Anonymous

    Anonymous - 2018-02-04

    Originally posted by: wagnered

    @jm134

    I was wrong on one point on the previous comment. On a redhat based system, /etc/lighttpd/modules.conf must be modified:

    The line include "conf.d/fastcgi.conf" must be uncommented (remove # at start of line). Debian based systems may enable the module differently.

     
  • Anonymous

    Anonymous - 2018-02-04

    Originally posted by: wagnered

    One more thing I forgot:

    in modules.conf. the lines

    "mod_redirect",
    "mod_rewrite",

    need to be uncommented. for lightttpd to be able to do the url.rewrite.

     
  • Anonymous

    Anonymous - 2018-02-04

    Originally posted by: jm134

    have try all your method above still getting blank page this is error log
    2018-02-04 18:49:21: (mod_fastcgi.c.2702) FastCGI-stderr: PHP Fatal error: Call to a member function quote() on null in /var/www/server/ampachee/lib/class/dba.class.php on line 134

     
  • Anonymous

    Anonymous - 2018-02-04

    Originally posted by: wagnered

    @jm134

    Actually, it looks like you are running Ampache-3.8.2-release or develop Somewhere in lib/init.php will be a line $results['version'] = '3.8.X' where X is the update version: In 3.8.2 it is line 70.

    I still don't have enough information from you. I suggest that you install the latest ampache release (ampache-3.8.5_all.zip) because Ampache has had large number of issues fixed and enhancements added since 3.8.2. See Ampache Releases.

    What version of php is installed? Are all the modules listed on the Ampache Repository page. Use /usr/bin/php -m from a command line to see the list of loaded modules.

    If you still have a problem, use the template on the issues page to give us as much information as possible.

     
  • Anonymous

    Anonymous - 2018-02-05

    Originally posted by: jm134

    with ampache version 3.8.5 all is working fine with lighttpd thanks a lot
    so now can i backup old database to new one?

     
  • Anonymous

    Anonymous - 2018-02-05

    Originally posted by: wagnered

    There were some changes in the database tables since 3.8.2 so I can't say for sure, but just importing the data to the new tables should be ok.

     
  • Anonymous

    Anonymous - 2018-02-05

    Originally posted by: jm134

    how to do that

     
  • Anonymous

    Anonymous - 2018-02-05

    Originally posted by: wagnered

    When You upgraded to 3.8.5, did you follow the instructions on the update page? It explains how to do it.

    If you didn't, I'm not sure the old data can be recovered, unless you took the time to dump the data to a *.sql file.

     
  • Anonymous

    Anonymous - 2018-02-05

    Originally posted by: jm134

    nope it okay i will do all over again

     

Log in to post a comment.