![]() |
Run PHP on N800
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 |
Re: Run PHP on N800
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).
|
Re: Run PHP on N800
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. |
Re: Run PHP on N800
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. |
Re: Run PHP on N800
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/ |
Re: Run PHP on N800
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. |
Re: Run PHP on N800
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? |
Re: Run PHP on N800
Quote:
BTW, does anybody know if PHP + nginx work on OS2008? |
Re: Run PHP on N800
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? |
Re: Run PHP on N800
Quote:
|
All times are GMT. The time now is 16:50. |
vBulletin® Version 3.8.8