Installing LightTPD and PHP on Windows
转自:http://www.winstonyw.com/2008/05/28/installing-lighttpd-and-php-on-windows/
This blog is in need of a makeover, and so I am trying to keep the procrastination habit at bay, practice some GTD and get started on creating a new template for it. First of all, I need a local development environment for PHP on Windows, since I am a Windows user. Previously, I would have installed IIS on Windows and used it as the server for PHP, but it’s always a chore trying to find my Windows CD.
Fortunately, I learnt about LightTPD recently in my work at Wego and how I can use it to replace IIS as the server for PHP. It’s easy installation and setup within minutes. Great! Let’s get started!
1. Download and Install PHPDownload PHP from PHP website. I chose the zip package and simply unzipped it into my directory of choice: Almighty C drive! So now, it’s residing at “C:"php”.
2. Download and Install LightTPDDownload a Win32 version of LightTPD from the WLMP Project; I chose the Setup Wizard (.exe) version.
Double-click on the downloaded executable to start the short installation process, during which you would specify the destination of the install. I installed mine at “C:"Program Files"LightTPD”.
3. Start and Test LightTPDTo start LightTPD, go to the LightTPD directory (i.e. “C:"Program Files"LightTPD”), find the file “TestMode.bat” and double-click on it. A console window would open and indicate that the server has been started.
To test that LightTPD is working at this moment, point your browser to http://localhost. You should see a “LightTPD Test Page”.
That was easy right? Now we just need to edit some configurations to make PHP work with LightTPD.
4. Editing LightTPD ConfigurationsEdit the file lighttpd-inc.conf (i.e. “C:"Program Files"LightTPD"conf"lighttpd-inc.conf”) with the following:
Remove the comment tag for “mod-cgi” (Line 20) Add this line (assuming that PHP was installed on C drive): cgi.assign = ( “.php” => “C:/php/php-cgi.exe” ) 5. Editing PHP ConfigurationsIn your PHP directory, rename the file php.ini-recommended to php.ini and edit php.ini with the following:
short_open_tag = On display_errors = On doc_root = “C:"Progra~1"LightTPD"htdocs” 6. Test PHP with LightTPDTo test that LightTPD now works with PHP, create a file with the following contents:
View Plain Copy to Clipboard Print ?
Place the file in your htdocs directory (i.e. “C:"Program Files"LightTPD"htdocs”), open up your browser and browse to the page. Walaa! You should be able to see the standard phpinfo() messages.
There you have it! A development environment for PHP on Windows in 6 simple steps. Now, to get started on the new template..

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

An official introduction to the non-blocking feature of ReactPHP in-depth interpretation of ReactPHP's non-blocking feature has aroused many developers' questions: "ReactPHPisnon-blockingbydefault...
