Has anyone tried to install lighttpd and configure php on the CDP?

Home Forums MultiConnect OCG Has anyone tried to install lighttpd and configure php on the CDP?

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

    Hi,

    I would like to know if anyone has had the opportunity to install lighttpd and configure php on the MTCDP. The lighttpd can either be used in the fastcgi mode or the cgi mode. The problem however is that the php.ini file has to be edited in the following manner:

    The line: cgi.fix_pathinfo=1 has got to uncommented.

    On bitbaking the php recipe provided with the corecdp-base-image the php.ini is generated as php.ini-recommended in the location: build/tmp/work/armv5te-corecdp-linux-gnueabi/php-5.2.11-r10/php-5.2.11

    If the file is renamed and the php recipe bitbaked, the same file is generated again as php.ini-recommended and the above line commented.

    Since the recipe for php is already packaged to be loaded to the CDP, persistent errors will occur as the above line is still commented in the package.

    I would appreciate it if someone could let me know a solution to this problem. Is there a way to edit a package that has been bitbaked, prior to loading it to the CDP?

    Thank you very much and have a great day.

    Best Regards,

    JM

    #3506
    Jesse Gilles
    Blocked

    If you modify a file provided by a package which has already been built, it doesn’t get automatically rebuilt because it doesn’t know you changed anything.

    You either need to modify the bitbake recipe and increment the PR variable (package revision) or ‘clean’ the package and rebuild it. (bitbake package -c clean; bitbake package)

    #3507
    JM K
    Participant

    Dear Jessie,

    thank you very much for your response. I followed your advice and enabled mod_cgi instead of fastcgi and reinstalled lighttpd. This was the response:

    # opkg install lighttpd_1.4.18-r15.5 to 1.4.18-r16.1.5…

    Upgrading lighttpd on root from 1.4.18-r15.1.5 to 1.4.18-r16.1.5…

    Configuring lighttpd

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

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

    lighttpd.

    I did not get the previous errors that I got while trying to configure fastcgi. Does this mean lighttpd is successfully installed with php?

    To test php I found a suggestion on this link:

    http://redmine.lighttpd.net/wiki/1/TutorialLighttpdAndPHP#PHP-in-CGI-Mode

    I found the following suggestion under the sub heading PHP in CGI Mode:

    “Open your browser and go to http://localhost/, you should have a welcome page. You can put your PHP files in C:lighttpdhtdocs – To test PHP, just create a file named index.php, save it in the Lighttpd root directory (C:lighttpdhtdocs) and paste this content into this file:

    <?php

    phpinfo();

    ?>

    Accessing http://localhost/, you should get a page that lists all PHP variables and information.

    Please note that FastCGI doesn’t work on Windows at this time. Good luck! “

    What should be my ‘server.port’ value in the lighttpd.conf. If I use port 80 will that in any way affect the scp?

    I am a bit confused at this stage as I think the web browser is run from the native linux machine how to run it on the CDP?

    I would appreciate it if my questions are answered. Thank you very much and have a great day.

    Best Regards,

    JM

    #3508
    JM K
    Participant

    Hi,

    when I issue the command:

    # /etc/init.d/lighttpd start

    It returns:

    Starting Lighttpd Web Server: /usr/sbin/lighttpd is already running

    2182

    lighttpd.

    Looks like lighttpd is running fine. I am not able to find any php files (php.ini) in the /etc folder. I bitbaked php and did an scp to the CDP. I would appreciate it if someone could tell me if the php.ini file or any other php files exist at all in the /etc folder of the CDP. I feel I am missing out on some step while trying to install php.

    When I issue the following commands:

    # 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

    # php -v

    It returns:

    PHP 5.2.11 (cli) (built: Nov 7 2011 11:18:19)

    Copyright (c) 1997-2009 THE PHP Group

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

    Thank you and have a great day.

    Best Regards,

    JM

    #3509
    JM K
    Participant

    Dear Jessie,

    Thank you for your advice/suggestions. I got it to work. Thanks again.

    Best Regards,

    JM

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