Project

General

Profile

[UserError] lightpd 1.4.45 with php 5.6.31 - XML HTTP Request Fails

Added by gopi219 over 6 years ago

Hi,

Am trying to setup a web server with lighttpd1.4.45 and php 5.6.31. The php scripts on the web application have some AJAX calls. With my current setup - The pages requested using AJAX or XHR is returning 403 Error page.

Below is my configuration:

config {                                                                                                        
    var.CWD                        = "/var/www"                                                                 
    server.modules                 = (                                                                          
        "mod_rewrite",                                                                                          
        "mod_redirect",                                                                                         
        "mod_access",                                                                                           
        "mod_accesslog",                                                                                        
        "mod_auth",                                                                                             
        "mod_setenv",                                                                                           
        "mod_fastcgi",                                                                                          
        "mod_cgi",                                                                                              
        "mod_csrf",                                                                                             
        # 9                                                                                                     
    )                  
    fastcgi.server                 = (                                                                          
        ".php" => (                                                                                             
            "localhost" => (                                                                                    
                "host"     => "0.0.0.0",                                                                      
                "port"     => 8080,                                                                             
                "bin-path" => "/usr/bin/php-cgi -c /etc/php.ini",                                               
                # 3                                                                                             
            ),                                                         
        ),                                                             
    )             
    $SERVER["socket"] == "[::]:443" {                                                     
        # block 4                                                                           
        server.use-ipv6 = "enable"                                                          
        ssl.engine      = "enable"                                                          
        ssl.pemfile     = "/etc/server.pem"                                                 

    }                                           

In my setup, previously I was using lighttpd 1.4.39 and all PHP code was working fine.

Also, I would like to know
1. Is the PHP version and Lighted version am using are compatible with each other
2. Does fast-cgi mode am using for PHP has any issue with lightttpd 1.4.45
3. Is there any configuration change or mod needs to be added to enable XHR Handling

Thanks,


Replies (2)

RE: lightpd 1.4.45 with php 5.6.31 - XML HTTP Request Fails - Added by gstrauss over 6 years ago

What have you done to troubleshoot? What were the results?
Have you written a simple "Hello World!" PHP program and tested it with your config and lighttpd 1.4.45?
Have you looked in the lighttpd error log?
There's a 99+% chance this is a problem with your setup somewhere.

lighttpd 1.4.45 was released 9 months ago. What leads you to believe that you are the first person to use lighttpd 1.4.45 with PHP, and that there is a chance that lighttpd 1.4.45 is somehow incompatible with an independent PHP process?

RE: lightpd 1.4.45 with php 5.6.31 - XML HTTP Request Fails - Added by gopi219 over 6 years ago

The web application already has PHP login forms and they are all working fine. But when I give a POST request using XHR, the page returned 403 error.
Also seen the permission for the php files an folders are -rwxr-xr-x

I agree, there is no compatibility issues between version of PHP and Lighttpd - tested new setup on a PC with simple PHP application. But this issue am facing on RaspberryPi and just in case to know any patch or module or configuration we were missing.

Will diagnose from other perspective to discover issue.

Thanks

    (1-2/2)