search

PHPnow 筹建 PHP

Jun 13, 2016 am 11:56 AM
mysqlphpphpmyadminphpnow

PHPnow 搭建 PHP

搭建 PHP 其实不很难,只是有点繁琐。要是自己搭建一次 PHP + MySQL 环境很是费时。更糟的是,很多新手在配置 PHP 时常常出现这样那样的问题。诸如 mysql 扩展、zend 安装失败等等问题。这时,我们需要一个快速、标准且专业的 PHP 套件包。PHPnow 就这样应运而生,为你快速搭建专业的虚拟主机。

与 PHPnow 的名字一样,让我们一起 PHPNow!

首先从?http://servkit.org/download?下载 最新版 PHPnow。PHPnow 有两种封装,一是 exe 自解压版(推荐,本文针对此版),二是纯 7z 档案(没有 exe 自解压)。

执行 PHPnow-1.4.x.exe 出现下图所示。回车即可。



图-1:解压对话框



在自动解压完毕后,将自动执行 Init.cmd 进行初始化动作。如 图-2 示:
期间可能出现防火墙提示,请允许。



图-2:Init.cmd 过程




图-3:解除防火墙



Init.cmd 十秒钟即可完成。全部完成后,将自动打开默认页。
(如果没有,试试手动打开?http://127.0.0.1



图-4:搭建成功



如果你只想搭建一个网站,上面的环境已经足够。很都时候我们需要开设多个独立的网站。例如论坛和主页分开、和朋友共享服务器等等。这时就要用到 虚拟主机 了。

下面说说 PHPnow 虚拟主机的使用。很简单。

双击执行 D:\PHPnow\PnCp.cmd (可能你的安装路径不是 D:\PHPnow),输入 2 后回车。
按照提示输入新建虚拟主机信息。如 图-5 所示。



图-5:开设虚拟主机



输入完信息回车后,将自动重启 Apache 以便生效。
然后访问刚才添加的域名,注意事先解析好域名指向你的服务器 IP。

如果没有域名或者不会用,可以通过编辑 C:\WINDOWS\system32\drivers\etc\hosts 来使用“虚拟域名”。
本例中的 bbs.test.com 就是在 “127.0.0.1 localhost” 的下一行添加一行 “127.0.0.1 bbs.test.com” 实现的。



图-6:虚拟主机开设成功



可能你还需要为每个虚拟主机分配 MySQL 数据库,下面介绍下如何使用 phpmyadmin 分配用户和数据库。

打开?http://127.1/phpMyAdmin;用 root 登陆。
然后点击 “权限”再点击 “添加新用户”。
填写好新的 用户名 和 密码;
选择第二项 “Create database with same name and grant all privileges”。
其他的保持默认;需要提的是,全局权限可不要选,除非必要,否则全不选。
点击 [执行] 即可完成。难明白就看看图吧。



图-7:添加数据库用户。



把刚才添加的用户名和密码交给用户即可。注意 root 拥有最高权限,不要轻易把密码交给别人。

好了!你现在拥有了一个专业的 PHP 服务器环境。什么 Discuz! 6.0、PHPWind、DeDe、PHPCms 全不是问题,马上开始你的建站旅程。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What is the difference between unset() and session_destroy()?What is the difference between unset() and session_destroy()?May 04, 2025 am 12:19 AM

Thedifferencebetweenunset()andsession_destroy()isthatunset()clearsspecificsessionvariableswhilekeepingthesessionactive,whereassession_destroy()terminatestheentiresession.1)Useunset()toremovespecificsessionvariableswithoutaffectingthesession'soveralls

What is sticky sessions (session affinity) in the context of load balancing?What is sticky sessions (session affinity) in the context of load balancing?May 04, 2025 am 12:16 AM

Stickysessionsensureuserrequestsareroutedtothesameserverforsessiondataconsistency.1)SessionIdentificationassignsuserstoserversusingcookiesorURLmodifications.2)ConsistentRoutingdirectssubsequentrequeststothesameserver.3)LoadBalancingdistributesnewuser

What are the different session save handlers available in PHP?What are the different session save handlers available in PHP?May 04, 2025 am 12:14 AM

PHPoffersvarioussessionsavehandlers:1)Files:Default,simplebutmaybottleneckonhigh-trafficsites.2)Memcached:High-performance,idealforspeed-criticalapplications.3)Redis:SimilartoMemcached,withaddedpersistence.4)Databases:Offerscontrol,usefulforintegrati

What is a session in PHP, and why are they used?What is a session in PHP, and why are they used?May 04, 2025 am 12:12 AM

Session in PHP is a mechanism for saving user data on the server side to maintain state between multiple requests. Specifically, 1) the session is started by the session_start() function, and data is stored and read through the $_SESSION super global array; 2) the session data is stored in the server's temporary files by default, but can be optimized through database or memory storage; 3) the session can be used to realize user login status tracking and shopping cart management functions; 4) Pay attention to the secure transmission and performance optimization of the session to ensure the security and efficiency of the application.

Explain the lifecycle of a PHP session.Explain the lifecycle of a PHP session.May 04, 2025 am 12:04 AM

PHPsessionsstartwithsession_start(),whichgeneratesauniqueIDandcreatesaserverfile;theypersistacrossrequestsandcanbemanuallyendedwithsession_destroy().1)Sessionsbeginwhensession_start()iscalled,creatingauniqueIDandserverfile.2)Theycontinueasdataisloade

What is the difference between absolute and idle session timeouts?What is the difference between absolute and idle session timeouts?May 03, 2025 am 12:21 AM

Absolute session timeout starts at the time of session creation, while an idle session timeout starts at the time of user's no operation. Absolute session timeout is suitable for scenarios where strict control of the session life cycle is required, such as financial applications; idle session timeout is suitable for applications that want users to keep their session active for a long time, such as social media.

What steps would you take if sessions aren't working on your server?What steps would you take if sessions aren't working on your server?May 03, 2025 am 12:19 AM

The server session failure can be solved through the following steps: 1. Check the server configuration to ensure that the session is set correctly. 2. Verify client cookies, confirm that the browser supports it and send it correctly. 3. Check session storage services, such as Redis, to ensure that they are running normally. 4. Review the application code to ensure the correct session logic. Through these steps, conversation problems can be effectively diagnosed and repaired and user experience can be improved.

What is the significance of the session_start() function?What is the significance of the session_start() function?May 03, 2025 am 12:18 AM

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment