Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Server errors using php/soap/lighttpd

Options
  • 16-05-2013 11:46am
    #1
    Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,091 Mod ✭✭✭✭


    I am using buildroot to build an image and put it on a switch. I messed around for a day and it all worked. I rebuilt the image and I enabled lighttpd/soap/php by default but I get an error when I try to run the web interface. A normal php test file works find. I had this web interface working fine, I know the code is fine. So it is a configuration issue.

    Here is the error I receive:
    Warning: SoapClient::SoapClient([url]http://127.0.0.1:18083/SoftCoreSOAP.wsdl[/url]) [soapclient.soapclient]: failed to open stream: Connection refused in /jffs2/usbflash0/ran/www/includes/library.php on line 35
    
    Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "http://127.0.0.1:18083/SoftCoreSOAP.wsdl" in /jffs2/usbflash0/ran/www/includes/library.php on line 35
    
    Warning: Cannot modify header information - headers already sent by (output started at /jffs2/usbflash0/ran/www/includes/library.php:35) in /jffs2/usbflash0/ran/www/includes/library.php on line 45
    
    Fatal error: Call to a member function __soapCall() on a non-object in /jffs2/usbflash0/ran/www/includes/library.php on line 71
    

    Configuration from php.info:
    './configure' '--target=arm-linux' '--host=arm-linux' '--build=i686-pc-linux-gnu' '--prefix=/usr' '--exec-prefix=/usr' '--sysconfdir=/etc' '--disable-gtk-doc' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-all' '--without-pear' '--with-config-file-path=/etc' '--localstatedir=/var' '--enable-soap' '--enable-simplexml' '--disable-cli' '--enable-cgi' '--enable-fastcgi' '--enable-sockets' '--enable-posix' '--enable-spl' '--enable-session' '--with-openssl=/home/buildmaster/svn_main_vm/buildroot/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr' '--enable-libxml' '--with-libxml-dir=/home/buildmaster/svn_main_vm/buildroot/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-zlib=/home/buildmaster/svn_main_vm/buildroot/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr'
    

    Here is an error log:
    (mod_fastcgi.c.2605) FastCGI-stderr: ---------Filename: 127.0.0.1:18083/SoftCo
    reSOAP.wsdl
    (mod_fastcgi.c.2605) FastCGI-stderr: NULL client
    

    Here is the full php.info

    https://www.dropbox.com/s/jxjdh6g2wc9eb04/Untitled%20Document.htm

    If I go to my server I can see the wsdl code on port 80, but not the port in the error 18083.
    Changing the WSDL url to 80/SoftCoreSOAP.wsdl or configuring lighttpd so that it listens on 18083 jsut gives different issues and I know this was working a few days ago.
    Any ideas on what I have not configured correctly?


Comments

  • Registered Users Posts: 16,411 ✭✭✭✭Trojan


    Oh no, Tar! You're still using PHP!? You should use perl, it's far more user friendly and easier to maintain.

    I think you should read this anti-PHP article which isn't relevant to your problem: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/


  • Registered Users Posts: 2,021 ✭✭✭ChRoMe


    Trojan wrote: »
    Oh no, Tar! You're still using PHP!? You should use perl, it's far more user friendly and easier to maintain.

    I think you should read this anti-PHP article which isn't relevant to your problem: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

    :p


  • Registered Users Posts: 16,411 ✭✭✭✭Trojan


    (To actually answer the question, check to see if you're outputting anything before the headers are sent, as per this Q/A - it's a fairly common occurrence with PHP where's an error, warning, or simple some whitespace after a PHP close tag that is causing that error later. HTH)


  • Registered Users Posts: 2,021 ✭✭✭ChRoMe


    Trojan wrote: »
    (To actually answer the question, check to see if you're outputting anything before the headers are sent, as per this Q/A - it's a fairly common occurrence with PHP where's an error, warning, or simple some whitespace after a PHP close tag that is causing that error later. HTH)

    Damn you :) i came back to this thread to post that it amused me that your post was as useless as mine.


  • Registered Users Posts: 16,411 ✭✭✭✭Trojan


    Sorry to disappoint :)


  • Advertisement
  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,091 Mod ✭✭✭✭Tar.Aldarion


    Trojan wrote: »
    (To actually answer the question, check to see if you're outputting anything before the headers are sent, as per this Q/A - it's a fairly common occurrence with PHP where's an error, warning, or simple some whitespace after a PHP close tag that is causing that error later. HTH)

    I am not personally coding any php, so chrome should be happy. :P I'm just sticking a web interface I'm given(that works on other systems) onto a switch, which happens to be php/soap.
    The issue here has little to do with the code I feel, due to this being provided by another company and working perfectly a few days ago with no modifications. I thought the issue was with port 18083 being closed so i edited lighttpd to open that port:

    server.port = 80                                                                                                                                                                                                       
    $SERVER["socket"] == ":18083"{                                              
    server.document-root = "/jffs2/usbflash0/ran/www"                           
    }
    

    Now my webpage took 5 minutes to load and gave a different error so I removed the 18083 port code I put in and the errors from the OP disappeared. That is how dodgy this stuff is. The port is still closed but it doesn't complain about it. And there is no delay in opening the webpage. Nonsensical stuff really? It just doesn't care that the port is closed now. In fact I suspect the port was never open when the web interface was working the last time.


    Now it gives this new error:

    Warning: require(/class_main.php) [function.require]: failed to open stream: No such file or directory in /jffs2/usbflash0/ran/www/includes/config.php on line 4
    
    Fatal error: require() [function.require]: Failed opening required '/class_main.php' (include_path='.:') in /jffs2/usbflash0/ran/www/includes/config.php on line 4
    

    config.php:

    <?php^M
            require($_SERVER['DOCUMENT_ROOT'].'/includes/errors.php');^M
            require($_SERVER['DOCUMENT_ROOT'].'/includes/library.php');^M
            require(get_structures_directory().'/class_main.php');  ^M
            error_log(get_structures_directory());
            require(get_structures_directory().'/class_softcore.php');^M
            require($_SERVER['DOCUMENT_ROOT'].'/includes/format.php');^M
    ?>^M
    

    Which looks for class_main.php in here:
    1.0.1/  1.0.3/  2.0.5/  2.0.7/  3.0.10/ 3.0.12/ 3.0.3/  3.0.5/  3.0.7/  3.0.9/
    1.0.2/  1.0.4/  2.0.6/  3.0.1/  3.0.11/ 3.0.2/  3.0.4/  3.0.6/  3.0.8/
    

    Now class_main.php is in some of these version folders and not in some of them. Guess I can try to hardcode one. This stuff is really like, what random error should I throw today?


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,091 Mod ✭✭✭✭Tar.Aldarion


    Just put on the image again for the 20th time and now it works, the wonders of not working for 2 days for no reason.


Advertisement