How to package php programs together with apache, mysql, and php into exe installation programs

Source: Internet
Author: User
Tags configuration php
How can I package php programs together with apache, mysql, and php into exe installation programs? may I ask you: how can I package php programs together with apache, mysql, and php into exe installation programs, you can use NSIS, innosetup, and other packaging tools to generate the installation package. you need to write a certain installation script on your own. you already have it online. you can simply decompress the package and run the php program together with apache, pack mysql and php together and make it into an exe installer
Excuse me:
How to package php programs together with apache, mysql, and php into exe installation programs

------ Solution --------------------
You can use NSIS, innosetup, and other packaging tools to generate the installation package. you need to write a certain installation script on your own.
------ Solution --------------------
I already have it on the internet. I just need to extract a bat package, just like the exe.
------ Solution --------------------
Pack PHP into EXE [post]

Principle. On the Internet, I found a package program make_exe(?phpnow=which can pack the file interface information after .7z + into an EXE running package and automatically run the batch files in the 7z compressed package after self-decompression. Make_exe.zip contains three files: Make_exe.cmd, PHPServer. sfx, and PHPServer. sfx. cf. You should have thought about this. First, compress PHPServer into the PHPServer.7z file and configure it. Modify the PHPServer. sfx. cf file and run Make_exe.cmd.

First: Make_exe.cmd code
Copy content to clipboard
Code:
Set v= 1.2
Copy/B/y PHPServer. sfx + PHPServer. sfx. cf + *. * phpserver?v=.exe | pause
Very clear! "Set v = 1.2" is the version, and then three files are required for packaging.
PHPServer. sfx. cf code. open the method and drag it directly to the TXT file.
Copy content to clipboard
Code:
;! @ Install @! UTF-8!
Title = "real estate information management system V1.2"
BeginPrompt = "# Real Estate Information Management System V1.2 installation package # \ n * confirm that you have not run other services that Occupy port 80, such as IIS. \ N * if you have other similar packages installed, stop or uninstall them first. \ N * Do not move the installation directory after installation. \ N author: Yuno QQ: 110026985 home http://www.xilo.cn. "
ExtractDialogText = "please wait and unzip the file ..."
ExtractTitle = "extracting ..."
ExtractPathText = "select the extract path (only English characters ):"
ExtractCancelText = "cancel"
CancelPrompt = "are you sure you want to exit? "
GUIFlags = "4 + 8 + 32 + 64 + 256 + 2048"
InstallPath = "D: \ PHPServer"
RunProgram = "cmd/c setup. cmd"
;! @ InstallEnd @!
I believe I will not explain this, but I will change it if I want to display it. Note that InstallPath = "D: \ PHPServer" is the installation directory, and RunProgram = "cmd/c setup is also run after decompression. cmd "this BAT, that is, the command to start apache and mysql services. The following is the setup. cmd command of PHPServer. Because there are too many simple comments!

Setup. cmd code:

Code:

@ Echo off
Rem -- http://www.xilo.cn
Rem -- By Yuno (QQ: 110026985)
Setlocal enableextensions
Call Pn \ config. cmd
Prompt-$ g
Title initialize PHPserver % pnver %-Apache + PHP + MySQL
Echo ____________________________________________________________
Echo ^ |
Echo ^ | ###### installing Haobo real estate information management system environment suite #######^ |
Echo ^ | ____________________________________________________________________ ^ |
Echo.

: Copy
Echo ____________________________________________________________
Echo ^ |
Echo ^ | start file processing... ^ |
Echo.
Rem create Directory
If not exist % apadir % \ conf \ extra md % apadir % \ conf \ extra
If not exist % apadir % \ logs md % apadir % \ logs
If not exist % SystemRoot % \ Temp \ session. save_path md % SystemRoot % \ Temp \ session. save_path
Rem initial configuration Apache
If not exist % apadir % \ conf \ magic copy % apadir % \ conf \ default \ magic % apadir % \ conf/y
If not exist % apadir % \ conf \ mime. types copy % apadir % \ conf \ default \ mime. types % apadir % \ conf/y
If exist % apadir % \ conf \ default \ httpd-win.conf (
% Pl % require_once './Pn/init. phpc'; init_apache_conf (^ );
) Else (
Type Pn \ conf. default \ httpd. conf> % apadir % \ conf \ httpd. conf
Type Pn \ conf. default \ pn_htd.conf> % apadir % \ conf \ httpd. conf
Copy Pn \ conf. default \ httpd-autoindex.conf % apadir % \ conf \ extra/y
)
If not exist % h_% copy Pn \ conf. default \ httpd-vhosts.conf % h_%
If not exist htdocs \ index. php copy Pn \ pn_info.ph _ htdocs \ index. php/y
Rem copy DLL
Copy % phpdir % \ php5ts. dll % apadir % \ bin/y
Copy % phpdir % \ libmhash. dll % apadir % \ bin/y
Copy % phpdir % \ libmcrypt. dll % apadir % \ bin/y
Copy % phpdir % \ libmysql. dll % apadir % \ bin/y

..................

Rem initial configuration php-. ini

..................

Rem initial configuration my. ini

..................

Echo ____________________________________________________________
Echo ^ |
Echo ^ | installing Apache... ^ |
Echo.
Cd % apadir %

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.