Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Run PHP on N800

    Reply
    Page 1 of 2 | 1   2   | Next
    scottw01 | # 1 | 2007-08-06, 20:57 | Report

    I have searched this forum for php related entries but found none.

    How can I run a PHP file on the N800.

    I have installed:
    http://maemo-hackers.org/php5-fastcgi.install (PHP5)
    http://maemo-hackers.org/nginx.install (HTTP Server)

    When I attempt to run a file.php with
    <?php
    print("MyName");
    ?>
    in it, all i get is a listing of the contents, not processed by PHP.

    What am I missing??

    Many years programming, limited Linux.

    Thanks
    SW

    Edit | Forward | Quote | Quick Reply | Thanks

     
    jweinel | # 2 | 2007-08-06, 21:08 | Report

    Sorry, I can't help you with php but when I search this forum using "php" (just to figure out what it is), I get two pages of threads (granted most are from 770 owners but there are some N800-related threads).

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Naranek | # 3 | 2007-08-06, 21:20 | Report

    This is just a shot in the dark as I don't have experience of php with maemo, but I've used it elsewhere. I assume you're trying to run the program in command line. If you're trying to view the page with web browser, this won't help you.

    First you have to give the file execute privileges by issuing:

    chmod u+x file.php

    and after that you can run

    ./file.php

    assuming you're in the same directory as the file.

    If it doesn't work, you should see if php is installed correctly by writing

    which php

    You should get something like /bin/php
    Add to the beginning of the php-file:

    #!/bin/php

    or whatever it is you get from the previous command. I don't know how it goes with N800, but at least this is the way it works in linux generally.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Naranek; 2007-08-06 at 21:27.

     
    scottw01 | # 4 | 2007-08-06, 21:45 | Report

    Thanks jweinel,

    I was thinking of a different forum when I wrote that. I have read those posts and some have said that they have php running, but I haven't had any luck with getting a response from the right people.
    Still looking.

    Thanks Naranek,
    I am trying to run this from the browser. I will give the command line a shot, though.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Khertan | # 5 | 2007-08-07, 05:10 | Report

    As apache you must set the configuration of nginx to use php. By default php is not enabled.

    The config file can be found in /etc/nginx/

    Edit | Forward | Quote | Quick Reply | Thanks

     
    sam-network | # 6 | 2007-10-20, 20:00 | Report

    I've managed to get Nginx running with PHP. I just installed php5-cli, php5-fastcgi and nginx from the Maemo hackers repository (http://maemo-hackers.org bora/main).

    Nginx was already configured to work with PHP by default and all I had to do was change the Document Root in /etc/nginx/nginx.conf.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    theredbaron | # 7 | 2007-12-18, 16:50 | Report

    I have PHP5-fastcgi installed and HTTPD in Os2008. Everything installed fine. I am think HTTPD is running because when I go to http://localhost/ I get a message saying it works. My problem is that when I put a .php file into the htdocs folder at /user/htdocs and go to the file in my web browser (ie http://localhost/helloworld.php) it is not rendering the PHP...it just shows the PHP code (ie <?php echo 'hello world!'; ?> .

    I tried to make some changes to the httpd.conf file but how do I edit it? I can see the file in the terminal /etc/conf/http.conf but I don't know how to launch the file in a text editor to edit it. Any ideas?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    hordeman | # 8 | 2007-12-19, 00:32 | Report

    Originally Posted by theredbaron View Post
    I have PHP5-fastcgi installed and HTTPD in Os2008. Everything installed fine. I am think HTTPD is running because when I go to http://localhost/ I get a message saying it works. My problem is that when I put a .php file into the htdocs folder at /user/htdocs and go to the file in my web browser (ie http://localhost/helloworld.php) it is not rendering the PHP...it just shows the PHP code (ie <?php echo 'hello world!'; ?> .

    I tried to make some changes to the httpd.conf file but how do I edit it? I can see the file in the terminal /etc/conf/http.conf but I don't know how to launch the file in a text editor to edit it. Any ideas?
    I've only gotten PHP to work with the nginx web server --- i never figured out how to get it work with Apache. Something tells me that PHP would need be recompiled to be used with Apache.

    BTW, does anybody know if PHP + nginx work on OS2008?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    theredbaron | # 9 | 2007-12-19, 19:03 | Report

    Hordeman,

    PHP and NGINX do work with OS2008. I uninstalled Apache and installed NGINX yesterday and sure enough PHP worked and I am running OS2008. Does anyone know if PHPMyAdmin could be installed on OS2008? It is just a PHP website really so I am guess if you just untar PHPMyAdmin in the /var/www folder in NGINX it should work. This would give a GUI to mySQL which would be amazing! Anyone try this?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Joschi | # 10 | 2007-12-20, 06:31 | Report

    Originally Posted by theredbaron View Post
    Does anyone know if PHPMyAdmin could be installed on OS2008? It is just a PHP website really so I am guess if you just untar PHPMyAdmin in the /var/www folder in NGINX it should work. This would give a GUI to mySQL which would be amazing! Anyone try this?
    I tried it a few weeks ago without success. PHP (php5-fastcgi) comes with no MySQL-Support...

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 1 of 2 | 1   2   | Next
vBulletin® Version 3.8.8
Normal Logout