是否可以将 PHP/MySQL 应用程序包装为可以作为独立应用程序运行的二进制文件?

发布于 2025-01-05 18:38:40 字数 182 浏览 0 评论 0 原文

我的应用程序是用 PHP/MYSQL 编写的。我们正在寻找在客户端计算机上部署的选项。有什么选择以及如何做?除此之外,我们更关心保护我们的代码。因此,我们正在寻找可以为我们在 php/mysql 上开发的 Web 应用程序创建二进制应用程序的选项。

除此之外,是否有任何安装程序可以提取并安装 php/apache/mysql 堆栈?

I have my application written on PHP/MYSQL. We are looking at option for deployment at client site machine. What is the option and how to do it? Apart from that we are more concern about protecting our code. Hence, we're looking at the option that can make a binary application for our web application developed on php/mysql.

Apart from that is there any installer available that can extract and install php/apache/mysql stack ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

纵情客 2025-01-12 18:38:40

请参阅之前的回复到一个类似的问题,获取可用于将 PHP 代码编译/包装为 Windows 可执行文件的选项的完整列表

其他适用于非 Windows 的选项:

HPHP(Facebook 的HipHop)

https://github.com/facebook/hiphop-php/wiki /

https://github.com/facebook/hiphop-php

HipHop PHP 是 PHP 脚本代码的源代码转换器。 HipHop 以编程方式将 PHP 源代码转换为高度优化的 C++,然后使用 g++ 将其编译为机器代码。 HipHop 包括一个代码转换器、PHP 运行时系统的重新实现以及许多常见 PHP 扩展的重写,以利用这些性能优化。
HipHop 是 Facebook 创建的,旨在节省服务器资源。它以其超过 300,000 行用 C++ 和 C 编写的源代码作为免费软件根据 PHP 许可证版本 3.01 的条款进行分发。
Facebook 还开发了 HPHPi,这是一个实验性的解释器,专为开发而设计,无需在运行之前编译 PHP 源代码。

Roadsend 和 Roadsend Raven

http://www.roadsend.com/home /index.php

https://github.com/weyrick/roadsend-php/wiki

https: //github.com/weyrick/roadsend-php

Roadsend PHP 是 PHP 语言的开源实现。它将 PHP 源代码编译为独立的本机二进制文件,不需要解释器。 Roadsend Compiler 可以使用 Fast/CGI 构建在线 Web 应用程序、使用嵌入式 Web 服务器 (!MicroServer) 构建离线 Web 应用程序、使用 PHP-GTK 构建桌面 GUI 应用程序以及控制台应用程序。众所周知,它可以在 Linux、Windows(使用 mingw)、Mac OSX 和 FreeBSD 上构建。

Roadsend Compiler 还包含用于解释、分析和单步调试 PHP 代码的工具。

Roadsend PHP 是 PHP 语言和运行时环境的完全独立的实现,并且不基于原始实现(使用 Zend 引擎),原始实现可在 http://www.php.net。 Roadsend PHP 不需要 Zend PHP,也不会以任何方式使用 Zend PHP。

Roadsend 代码的最后一次更改是在 17 个月前(Ubuntu 10.04 llvm 软件包的补丁),在此之前是 21 个月前。自述文件在过去两周(撰写本文时)已更新,因此也许它会再次复活。
可以构建 Linux 可执行文件

Phalanger

http://www.php-compiler.net/< /a>

http://wiki.php-compiler.net/Phalanger_Wiki

http://phalanger.codeplex.com/

Phalanger 是一个由布拉格查尔斯大学启动并得到支持的项目由微软。它将用 PHP 脚本语言编写的源代码编译为 CIL(通用中间语言)字节码。它处理编译过程的开始,该过程由 .NET Framework 的 JIT 编译器组件完成。它不解决本机代码生成或优化问题。其目的是将 PHP 脚本编译成 .NET 程序集、包含 CIL 代码和元数据的逻辑单元。

phc

http://www.phpcompiler.org/

phc 是一个开源软件支持插件的 PHP 编译器。此外,它还可用于漂亮打印或混淆 PHP 代码,作为开发处理 PHP 脚本的应用程序的框架,或者将 PHP 与 XML 相互转换,从而能够使用 XML 工具处理 PHP 脚本。

phc for PHP 程序员(参见手册):

  • 将 PHP 源代码编译成(优化的)可执行文件(支持整个
    PHP 标准库)。
  • 将 Web 应用程序编译为(优化的)
    扩展(支持整个 PHP 标准库)。
  • 混淆 PHP 代码(--obfuscate 标志 - 实验性)。结合
    将许多 php 脚本放入一个文件中(--include 标志 - 实验性)。

phc 代码的最后一次更改是在 12 月 18 日,因此仍在积极进行开发。
可以构建 Linux 可执行文件
可用于构建 C 代码,并使用适当的 PHP“宏”进行扩展

ROSE 编译器

http://rosecompiler.org/

依赖于 phc 编译器来处理 PHP

See this previous response to a similar question for a comprehensive list of the options available for compiling/wrapping PHP code as an executable for Windows

Other options available for non-Windows:

HPHP (Facebook's HipHop)

https://github.com/facebook/hiphop-php/wiki/

https://github.com/facebook/hiphop-php

HipHop for PHP is a source code transformer for PHP script code. HipHop programmatically transforms PHP source code into highly optimized C++ and then uses g++ to compile it to machine code. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.
HipHop was created by Facebook to save resources on its servers. It is being distributed with its over 300,000 lines of source code written in C++ and C as free software under the terms of version 3.01 of the PHP License.
Facebook has also developed HPHPi, which is an experimental interpreter designed for development with no need to compile the PHP source code before running it.

Roadsend and Roadsend Raven

http://www.roadsend.com/home/index.php

https://github.com/weyrick/roadsend-php/wiki

https://github.com/weyrick/roadsend-php

Roadsend PHP is an open source implementation of the PHP language. It compiles PHP source code to stand alone, native binaries which do not require an interpreter. Roadsend Compiler can build online web applications with Fast/CGI, offline web applications with an embedded web server (!MicroServer), desktop GUI applications with PHP-GTK, and console applications. It is known to build on Linux, Windows (using mingw), Mac OSX, and FreeBSD.

Roadsend Compiler also contains facilities for interpreting, profiling and step debugging PHP code.

Roadsend PHP is a completely independent implementation of the PHP language and runtime environment, and is not based on the original implementation (using the Zend engine) which is separately and freely available at http://www.php.net. Zend PHP is not required, and is not used in any way, by Roadsend PHP.

Last change to the roadsend code was 17 months ago (a patch for Ubuntu 10.04 llvm package), prior to that was 21 months ago. Readme's have been updated in the last two weeks (at time of writing this) so perhaps it's about to be resurrected again.
Can build Linux executables

Phalanger

http://www.php-compiler.net/

http://wiki.php-compiler.net/Phalanger_Wiki

http://phalanger.codeplex.com/

Phalanger is a project which was started at Charles University in Prague and was supported by Microsoft. It compiles source code written in the PHP scripting language into CIL (Common Intermediate Language) byte-code. It handles the beginning of a compiling process which is completed by the JIT compiler component of the .NET Framework. It does not address native code generation nor optimization. Its purpose is to compile PHP scripts into .NET assemblies, logical units containing CIL code and meta-data.

phc

http://www.phpcompiler.org/

phc is an open source compiler for PHP with support for plugins. In addition, it can be used to pretty-print or obfuscate PHP code, as a framework for developing applications that process PHP scripts, or to convert PHP into XML and back, enabling processing of PHP scripts using XML tools.

phc for PHP programmers (See Manual):

  • Compile PHP source into an (optimized) executable (supports entire
    PHP standard library).
  • Compile a web application into an (optimized)
    extension (supports entire PHP standard library).
  • Obfuscate PHP code (--obfuscate flag - experimental). Combine
    many php scripts into a single file (--include flag - experimental).

Last change to the phc code was on 18th December, so sill actively ongoing development.
Can build Linux executables
Can be used to build C code, with appropriate PHP "macros" for extensions

ROSE Compiler

http://rosecompiler.org/

Dependent on phc compiler for working with PHP

爱要勇敢去追 2025-01-12 18:38:40

查看 PHP 混淆器,示例:

http://www.seocompany.ca/software /free-cryption-software.html

https://stackoverflow.com/questions/908678/is-there-any-good-php-混淆器

混淆器不是 100%,但它们很容易实现,而且输出相当粗糙。

Look at PHP obfuscators, examples:

http://www.seocompany.ca/software/free-encryption-software.html

https://stackoverflow.com/questions/908678/is-there-any-good-php-obfuscator

Obfuscators aren't 100% but they are easy to implement and the output is pretty gnarly.

老子叫无熙 2025-01-12 18:38:40

我不确定 Windows 上的情况,但在 Linux 上你可以尝试使用 Facebook 的 HipHop 项目,当然,如果你不使用 eval() 和其他函数。获取更多信息以及如何在 Facebook Hiphop PHP - git

“php/apache”的任何安装程序/mysql”堆栈?是的,有一个 EasyPHP,您也可以获得便携式(提取并运行)版本。

如果您可以进行一些研发,请尝试使用适用于 Windows 平台的 vmware ThinApp。借助 VMware ThinApp,应用程序被打包成单个可执行文件,这些可执行文件彼此完全隔离且与操作系统完全隔离

I am not sure about windows but on Linux you can try using Facebook's HipHop project, Of cource if you are not using eval() and other functions. Get more info and how to on Facebook Hiphop PHP - git

Any installer for "php/apache/mysql" stack? yes there is one EasyPHP, you can get the portable(extract and run) version too.

If you can do some R&D try using vmware ThinApp for windows platform. With VMware ThinApp, applications are packaged into single executables that run completely isolated from each other and the operating system

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文