How the PHP program is packaged together with apache,mysql,php to make an EXE installer

Source: Internet
Author: User
Tags configuration php
How the PHP program is packaged together with apache,mysql,php to make EXE installer
May I ask you:
How the PHP program is packaged together with apache,mysql,php to make EXE installer

------Solution--------------------
You can use NSIs, or innosetup and other packaging tools to build the installation package, you need to write a certain installation script
------Solution--------------------
Online has already, decompression point a bat processing can, and you say exe like
------Solution--------------------
PHP packaged as EXE "reprint"
2007-12-19 15:19
Principle. I found a wrapper on the Internet. Make_exe (from Phpnow) can play the. 7z+ packaged file interface information into an EXE run package and automatically run the batch file in the 7z archive after running self-extracting. Make_exe.zip bag has make_exe.cmd, phpserver.sfx,phpserver.sfx.cf three files. See this, we should have a train of thought. First, press phpserver into the phpserver.7z file and configure it. Modify the PHPServer.sfx.cf file, and then run the 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
It's clear! "Set v=1.2" is a version, then requires three files, packaged.
PHPSERVER.SFX.CF code, open method, drag directly to TXT on the line
Copy Content to Clipboard
Code:
; [Email protected]@! utf-8!
Title= "Real Estate Information management system V1.2"
beginprompt= "# Real Estate Information Management System V1.2 installation package #\n\n * Confirm that you are not running IIS and other services that occupy port 80. \ n * If you have other similar packages installed, please stop or uninstall them first. \ n * Do not move the installation directory when the installation is complete. The author: Xilo qq:110026985 home http://www.xilo.cn. "
Extractdialogtext= "Please later, you are extracting the file ..."
Extracttitle= "Extracting ..."
extractpathtext= "Please select the decompression path (English characters only):"
Extractcanceltext= "Cancel"
Cancelprompt= "Are you really going to quit?"
Guiflags= "4+8+32+64+256+2048"
Installpath= "D:\\phpserver"
runprogram= "Cmd/c setup.cmd"
; [Email protected]@!
I believe it or not, I explained it, and what I want to show is changed. Note This sentence installpath= "D:\\phpserver" for the installation directory, as well as the decompression run runprogram= "cmd/c setup.cmd" This bat, that is, the command to start the Apache,mysql service. The following is the order of Phpserver's setup.cmd. Because too many simple paste a few words!

Setup.cmd Code:

Code:

@echo off
REM--http://www.xilo.cn
REM-by Xilo (qq:110026985)
Setlocal enableextensions
Call Pn\config.cmd
prompt-$g
Title Initialization Phpserver%pnver%-Apache + PHP + MySQL
Echo ____________________________________________________________
Echo ^| ^|
Echo ^| ###### is installing the gallant Real Estate Information Management System Environment Kit ###### ^|
Echo ^|____________________________________________________________^|
Echo.

: Copy
Echo ____________________________________________________________
Echo ^| ^|
Echo ^| Start file processing ... ^|
Echo.
REM Build 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%vh% copy pn\conf.default\httpd-vhosts.conf%vh%
If not exist htdocs\index.php copy pn\pn_info.ph_ htdocs\index.php/y
REM Replication DLLs
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%
  • Related Article

    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.