Suggestion regarding user interface.

Home Forums MultiConnect OCG Suggestion regarding user interface.

Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #2638
    JM K
    Participant

    Hi,

    I would like to know if GTK is a good choice for user interface application development for the CDP. Are there any known compatibility issues? I would appreciate any suggestion regarding GTK or any other graphical interface which is ideal for the CDP. Thank you very much.

    Best Regards,

    JM

    #3386
    Lonny Knudson
    Blocked

    Hi JM,

    The CDP doesn’t have a graphics chip onboard so I don’t think there would be much advantage in running graphical interface on the CDP processor.

    For devices like this I think the most common solution is a web based application where you use a web browser for the graphical display.

    #3387
    JM K
    Participant

    Hi Lonny,

    thank you for the response. Can you give me sort of an example how that would work? Would the user interface be like a webpage something that would resemble an Embedded Ethernet Device Server ? Thank you and have a great day.

    Best Regards,

    JM

    #3388
    Lonny Knudson
    Blocked

    Hi JM,

    Yes, the UI would be a webpage. Common examples would be configuration utilities in devices like WiFi access points, Cable and DSL modems, various internet appliances, etc…

    #3389
    JM K
    Participant

    Hi,

    thanks for your response, Lonny. I have gone through a couple of websites and some of them seemed to suggest that Cherokee was a pretty good web server. For the server side it requires PHP and Mysql. I am trying to understand the concept of implementation. So the user interface is in reality a web browser which relays the information to the web server. The server side program in PHP relays this request to the C program on the CDP and the response is sent through to the web browser again. The web browser is built from Dynamic HTML code that resides in the CDP. What purpose does the Mysql serve? Please correct me if my understanding is not correct and I would appreciate it if my question is answered. Thank you very much and have a great weekend.

    Best Regards,

    JM

    #3390
    Lonny Knudson
    Blocked

    Hi JM,

    I’m not a software developer so I don’t think I can provide the best insight on the advantages and disadvantages of different software packages. Since PHP was designed for web based applications, it’s almost always going to be a good choice for this type of application. I’m not sure why Mysql is required… maybe it fulfills a dependency for the PHP implementation, or maybe it just provides a fast way store and look up dynamic information when processing web forms or generating output to be sent back to the browser.

    #3391
    JM K
    Participant

    Hi,

    Lonny, thanks for the response. Can you suggest me any websites or documentation where I can learn more on developing Embedded HTTP Servers for ARM based systems? Thank you and have a great day.

    Best Regards,

    JM

    #3392
    Lonny Knudson
    Blocked

    Hi JM,

    Sorry, I don’t know of any.

    #3393
    Jesse Gilles
    Blocked

    JM K:

    There is a web server already on the MTCDP and php is already available for it. Both are installed in the corecdp-full-image, which is preflashed into the unit when it ships. Look at the image recipes located at: corecdp/openembedded/recipes/images/corecdp*

    You don’t need to develop an HTTP server, you just need to configure lighttpd the way you want and write some php code and put it in the web directory. Look at the config for lighttpd to see where. Also, there isn’t really anything different for making a PHP-based web interface on the MTCDP versus doing it on a regular Linux machine. Do some searching for building web apps with lighttpd and php and you should be fine. You don’t need anything ARM-specific.

    #3394
    JM K
    Participant

    Dear Jesse,

    thank you very much for your advice/suggestion. Is there any restriction with regard to the TCP server port (Can I use port 23 for instance?) that the lighttpd should listen? I think port 22 is used to ssh to the CDP yes? I am trying to get a better idea by going through some example config files for lighttpd. Also I bitbaked both lighttpd as well as php. Somehow I am not able to find php.ini in the recipes/php/ folder to configure it. Thank you and have a great day.

    Best Regards,

    JM

    #3395
    JM K
    Participant

    I do vaguely remember having seen both a folder called php5 in the openembedded/recipes/ folder containing the php.ini file. Somehow it no longer exists after I bitbaked php. Is there a way to reverse this? I would very much appreciate your suggestions. Thank you and have a great day.

    Best Regards,

    JM

    #3396
    JM K
    Participant

    Looks like I’ve found it. It is the same as php.ini-recommended I think.

    #3397
    JM K
    Participant

    Hi,

    I am not able to enable php with lighttpd because mod_fastcgi.so is missing in

    the extension directory

    Restarting lighttpd web server : no /usr/sbin/lighttpd found: none killed

    2011-11-27 16:55:30: (plugin.c.165) dlopen() failed

    for: /usr/lib/mod_fastcgi.so /usr/lib/mod_fastcgi.so:

    cannot open shared object file: No such file or directory

    2011-10-27 16:55:30: (server.c.621) loading plugins finally failed

    This was after I bitbaked ‘fastcgi’ and did an scp to the CDP.

    Someone was of the opnion that ‘lighttpd-fastcgi’ was supposed to be installed as a separate package in Fedora. I did try to install a package ‘lighttpd-module-fastcgi’ that existed in the armv5te folder but could not scp it to the CDP. Is this the missing package that has the missing .so file?

    I would appreciate any suggestions/advice on how to solve this one. Thank you and have a great day.

    Best Regards,

    JM

    #3398
    Jesse Gilles
    Blocked

    Yes, you need the lighttpd-module-fastcgi package. You may also need other modules. As I have suggested before, please look at the sample images provided by Multi-Tech. They are in openembedded/recipes/images. Have a look at corecdp-webserver-image.

    #3399
    JM K
    Participant

    Hi,

    thank you very much Jessie for the response. I installed all the required modules mentioned in the corecdp-webserver-image.bb and also uncommented the fastcgi module part in the lighttpd.conf and also uncommented the path_info part in the php.ini. The php.ini exists in armv5te-corecdp-linux-gnueabi/php-5.2.11-r4

    when I try to install lighttpd on the CDP this is the output:

    Installing lighttpd (1.4.18-r11.1.5) to root…

    Configuring lighttpd

    System startup links for /etc/init.d/lighttpd already exist.

    Restarting Lighttpd Web Server: no /usr/sbin/lighttpd found; none killed

    lighttpd.

    2011-10-28 15:47:55: (mod_fastcgi.c.990) chdir failed: No such file or directory /usr/local/bin/php

    2011-10-28 15:47:55: (mod_fastcgi.c.999) execve failed for: /usr/local/bin/php No such file or directory

    # 2011-10-28 15:47:55: (mod_fastcgi.c.1025) the fastcgi-backend /usr/local/bin/php failed to start:

    2011-10-28 15:47:55: (mod_fastcgi.c.1029) child exited with status 2 /usr/local/bin/php

    2011-10-28 15:47:55: (mod_fastcgi.c.1032) If you’re trying to run PHP as a FastCGI backend, make sure you’re using the FastCGI-enabled version.

    You can find out if it is the right one by executing ‘php -v’ and it should display ‘(cgi-fcgi)’ in the output, NOT ‘(cgi)’ NOR ‘(cli)’.

    For more information, check http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf this is PHP on Gentoo, add ‘fastcgi’ to the USE flags.

    2011-10-28 15:47:55: (mod_fastcgi.c.1336) [ERROR]: spawning fcgi failed.

    2011-10-28 15:47:55: (server.c.895) Configuration of plugins failed. Going down.

    I think for some reason the php is not getting installed as when I issue the command:

    # php -v

    The following is returned:

    -bash php: command not found

    When I however issue the command:

    # lighttpd -v

    The following is returned:

    lighttpd-1.4.18 – a light and fast webserver

    Build-Date: Oct 28 2011 14:08:03

    I would appreciate any suggestions/advice on this one. Thank you and have a great day.

    Best Regards,

    JM

    #3400
    JM K
    Participant

    I have also tried changing the path in the lighttpd.conf from /usr/local/bin/php to /usr/local/bin/php-cgi as suggested by:

    http://redmine.lighttpd.net/wiki/lighttpd/Docs%3AModFastCGI without any success.

    Regards,

    JM

    #3401
    JM K
    Participant

    After having made a few more changes now when I issue the command:

    # php-cgi -v

    It returns:

    PHP 5.2.11 (cgi-fcgi) (built: Nov 3 2011 11:06:13)

    Copyright (c) 1997-2009 THE PHP Group

    Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

    I think php-cgi is successfully installed however when I install lighttpd to the CDP I keep getting the same errors:

    2011-10-28 15:47:55: (mod_fastcgi.c.990) chdir failed: No such file or directory /usr/local/bin/php

    2011-10-28 15:47:55: (mod_fastcgi.c.999) execve failed for: /usr/local/bin/php No such file or directory

    # 2011-10-28 15:47:55: (mod_fastcgi.c.1025) the fastcgi-backend /usr/local/bin/php failed to start:

    2011-10-28 15:47:55: (mod_fastcgi.c.1029) child exited with status 2 /usr/local/bin/php

    2011-10-28 15:47:55: (mod_fastcgi.c.1032) If you’re trying to run PHP as a FastCGI backend, make sure you’re using the FastCGI-enabled version.

    You can find out if it is the right one by executing ‘php -v’ and it should display ‘(cgi-fcgi)’ in the output, NOT ‘(cgi)’ NOR ‘(cli)’.

    For more information, check http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf this is PHP on Gentoo, add ‘fastcgi’ to the USE flags.

    2011-10-28 15:47:55: (mod_fastcgi.c.1336) [ERROR]: spawning fcgi failed.

    2011-10-28 15:47:55: (server.c.895) Configuration of plugins failed. Going down.

    Any help/suggestions on how to fix this one would be very much appreciated.

    Best Regards,

    JM

    #3402
    Jesse Gilles
    Blocked

    Your lighttpd config is looking for php in /usr/local/bin. It isn’t installed there which is why it is failing…

    2011-10-28 15:47:55: (mod_fastcgi.c.990) chdir failed: No such file or directory /usr/local/bin/php

    Fix the path to php in your lighttpd config. Run ‘which php’ to see where it is located in $PATH.

    #3403
    JM K
    Participant

    Hi Jesse,

    Thank you for the response. I did check the path. It was in: /usr/bin/php-cgi. I changed the lighttpd.conf line:

    fastcgi.server = ( “.php” =>

    (“localhost” =>

    (

    “socket” => “/tmp/php-fastcgi-socket”‘

    “bin-path” => “/usr/bin/php-cgi”

    )

    )

    )

    Though I changed this one the lighttpd config still is searching for php in /usr/local/bin:

    2011-11-03 112:34:21: (mod_fastcgi.c.990) chdir failed: No such file or directory /usr/local/bin/php-cgi

    Is there some other place in the lighttpd.conf that I might have missed with regard to changing the path?

    Thank you and have a great day.

    Best Regards,

    JM

    #3404
    Jesse Gilles
    Blocked

    Not sure why it’s doing that. You may also want to try using the ‘cgi’ module instead of ‘fastcgi’ just to see if you can get that working — I think it’s a little simpler. Otherwise, I would look at the lighttpd docs on their website and go from there.

    #3405
    JM K
    Participant

    Hi Jessie,

    What is really strange is that no file called php.ini exists. There is only a file called php.ini-recommended in the location: build/tmp/work/armv5te-corecdp-linux-gnueabi/php-5.2.11-r10/php-5.2.11 The line:

    cgi.fix_pathinfo=1 has got to be uncommented. When I uncomment this one and rename this file as php.ini and then proceed to bitbake it, the same file again gets renamed as php.ini-recommended and the line: cgi.fix_pathinfo=1 gets commented. Is this unusual? Ideally where (path) should php.ini reside? Thank you and have a great day.

    Best Regards,

    JM

Viewing 21 posts - 1 through 21 (of 21 total)
  • You must be logged in to reply to this topic.