Is there any way to run PHP on Android [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I've tried to open my PHP script in the built in Android browser, but I only see my code, as text, and the PHP doesn't run. Why is that ?
How can I run PHP on my Android device ? Is there a way to set up PHP and a web server on an Android device ?

Okay, this is a bit of a personal recommendation, but I've had success with the free Palapa Web Server (edit: doesn't seem to be on the playstore anymore, but here's the creator's website in case it helps you find it), which is essentially a web / mysql server which runs on Android, which will run your PHP scripts, and it will also work offline.
To use it, install the app, and copy your PHP / HTML files onto your phone. By default, the app uses /sdcard/pws/www/, so if you put your files there, it should pick them up. Then, launch the app, click "Start server", and go to http://127.0.0.1:8080 with your web browser on your android device, and it should work.
Note that setting up PHPMyAdmin (if you need that for managing databases) can be a bit tricky, as you will need to download the extra packages for it.
Let me know if it works for you. (Note: I'm not affiliated with this app, I'm just a mostly satisfied user.)

Related

How to run a PHP file to a server created by firebase [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have to test my webhook response. So i create a server using firebase. but don't know how to run a php file inside that server to check my webhook response. Anyone knows?
You don't understand what firebase is, based on your question. Firebase is not a VM that hosts server side code written in a server side language like php. It is a "Platform as a service" system that lets you piece together the server using their components.
In short firebase is used in place of a server with server side code. It doesn't seem appropriate to test a web hook you have on a server.
You should just be able to use curl, or a REST testing tool like Postman or any of a gazillion different web testing tools for this.
For PHP specifically here are is a very up to date article on php based web testing tools.

Run exe file from server, render to client [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I would like to know if it's possible to run a executable file (through any technology; PHP, JS, HTML...) on the web server, and render the image on the client.
I would like to do that to not share the exe file, but just let the client see what how the programm looks like without having him to download it. Also, using that way it won't affect the client PC.
It is possible to run application on server side and display result of application to client [1]. However, if your application uses GUI it might be difficult and required complex solution.
What if you:
Display screenshots of application
Let user book some online meeting where you would present the application through skype with shared desktop
Have public server where application would be installed and user could request username/password to server and try it itself (think about security!)

Why web servers are needed even for local web application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm searching for a means to overpass the need for a web server when using a local web application. Why aren't there browser extensions or special browsers to do so? It seems very easy to code to me. The browser or extension would call a php interpreter to compose web pages from php files. Local urls (file:///) would be used. No web service or port would be necessary. Is this just nonsense? Or am I the first person to think about this? In fact, this does already work with static html files.
First edit: I was looking for a server for testing purposes, being able to compose output from php files, without the need to communicate through network ports. Maybe I should have started from here, but Stackoverflow does not allow this kind of posts.
That sounds nice, please go ahead and build that technology. I will also use it. But oh, for now that has nothing to do with SO.
Why web servers are needed even for local web application
Because they are web applications. Technically you don't need a web server for local stuff if all your application code relies on client side programming. You can just go ahead open your html files in browser.
Browsers know how to interpret client side code already, so why re-invent the wheel? If you ever wish to write 1 line of server side code then obviously you'd need a web server at that point.

Deployment of php jqm mobile application on tablet/mobile [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have tried using phonegap , but the php scripts do not work?
Any other alternatives as to how the php jqm applications are deployed on tablet for testing?
PHP is meant to run on Proper Computer/Server as its a Server Side Language. So you need additional Software as the Browser does not have the ability to Interpret the PHP Language by Itself.
However its not a dead end if you wish to run PHP and JQM on a Device by itself.
On Android you can try KSWEB: server + PHP + MySQL Software which turns the device into a web server and includes PHP
Out of interest i just tested this software and it works. If you have an Android device download and install the software. The web server starts automatically. Transfer your whole folder (jqm+php scripts you have) in the htdocs folder on the phone, open a browser and type (localhost:8080/the-name-of-the-folder) and your jqm + php scripts will run ok.
https://play.google.com/store/apps/details?id=ru.kslabs.ksweb&hl=en
Alternatively Check Ubuntu touch, http://www.ubuntu.com/phone i think you can install anything on that like a LAMP server which includes PHP. Its a good choice because stuff like that is free. except for the device.

Steps to develop a website to upload files [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am planning to develop a webpage where anyone can upload a file. I want to do this because I want to make a webpage where my friends can upload a file, if they think that that file will help others (eg: a free tutorial pdf on Unix).
To develop and test this webpage what is needed ? As far as I think now:
Webserver ? I tried installing apache2 but had some issues
mysql-server ? I installed mysql-server ,but have issues with creating user for db
php
What else would I need ? (Assuming 'download' functionality will be added later, NOT NOW)
I am developing this in Ubuntu 12.04
Thanks
You don't need MySQL for the problem as described. All that would be required is a web server with a working PHP install. You can see the PHP documentation for how to handle the file uploads.
once you have installed and configured wamp/lamp.
platform(window, linux) doesnt matter a web application is not platform dependent. wamp/lamp will install mysql(database server), and apache(web server). thirdly determine you web scripting language(php, jsp, asp ect).if php, your php scripts must be executed by the web server ie you have to place them under c:\wamp\www\sitefolder\
How to: http://www.w3schools.com/php/php_file_upload.asp
you can test if on your local machine
then with Apache running, type in your browser www.localhost\sitefolder\yourscipt.php.
assuming you have an active domain and hosting account you may need to consider the
::::
-determine the upload size limit, location, and file type on the php
-you may require/though not a must client side scriptiing jquery- ajax for asynchronous requests.
-security will be of concern, you dont want some harmful data scripts on your site.
verify upload limit with your hosing provider..

Categories