开发者

What is needed for a user to download and run a PHP application?

I'd like to develop a PHP application that users would download and then could run. The application will have a web service.

I assume they will need Apache, but my main question is what is needed for PHP to run on their machine? Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download开发者_JAVA技巧 (size, etc.).

Is anything else required that I did not mention?

Thank you,


They will need a web server with a compatible version of php. That's it.


Are you asking what is required to run a .php file on a windows machine? Do you mean like an executable or a web server script?

If like an executable need the php files:

Download the php installer from http://windows.php.net/download/, and then you can run php.exe script.php

If like a web site:

You need a webserver (like apache) and the php.exe files. I would suggest if testing to download a prebuilt webserver like XAMPP (download from http://www.apachefriends.org/en/xampp-windows.html)


It depends on the application. At a minimum it will need PHP.

Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download (size, etc.).

PHP. Presumably as difficult as it is for you, but it depends on the platform. OS X comes with it. Most Linux variants either come with it, or allow it to be installed with one command to the package manager. Windows users will have to download it seperately.

As for other things that might be needed…

If it has a GUI, it might need PHP-GTK.

If it expects to be accessed via HTTP then they will need a webserver which supports PHP. This could be Apache, IIS, or one of numerous other servers.

(It isn't clear if, when you say "The application will have a web service.", you mean "The application will access a web service" or "The application will provide a web service". If the latter, then a web server will be needed).

If you use any non-core modules, then they will be needed as well.


You need to describe your proposed application a bit better. Is there a reason the application must be in PHP? It may be possible, but it's certainly not common to code and distribute a desktop application written in PHP.


There are a few options.

  1. If you are just writing a script (command line, etc) you don't need a webserver. You just need PHP installed to run it (there are even downloadable installers for it).

  2. If you are writing a web-based tool, then you will need your users to have a webserver if they are meant to run it on their physical machines. And you don't need a framework... just think of it as a Webserver + PHP as a plugin. Some webserver options: Apache, nginx, lighttpd

    • Try having users install WAMP, MAMP, or Zend Server CE all of which are free and come with both a webserver and PHP.

    • If you really want a deployable PHP script/tool, maybe look into something like PHPDock, which gives your users a single installable app (embedded server, php). NuSphere PHPDock

Honestly, it's not the greatest language to use for this type of deployment, but it's certainly fun to try to figure out! Sorry for not linking out also, don't have enough rep points for all of the links I had intended to supply.


Actually you can run php script without the need to have a webserver installed. Just install php and then from command line:

$ php myscript.php

If you really want you can even build GUI application with php even though I would not suggest it.

Cheers Andrea


you could also try to use quercus.

Quercus is Caucho Technology's fast, open-source, 100% Java implementation of the PHP language (requires JDK 1.5).

This way you only will need a jvm+quercus. It also is platform independent this way because it runs in the JVM.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜