search
HomeBackend DevelopmentPHP TutorialTips Sharing PHP Server Setup_PHP Tutorial

Tips Sharing PHP Server Setup_PHP Tutorial

Jul 15, 2016 pm 01:34 PM
apachephponeDownload softwareshareISkillserverusefirst

PHP server setup [1] First download the software:

(apache) I use the Huajun software Park downloaded apache_1.3.26-win32-x86-no_src! !
(jdk!) There is a link on the home page.
(php4) Needless to say, it is available on code-labs. You can also check out the official website of php! !
(iasp) The most important software

PHP server setup [2] Install apache

1. Double-click the apache installation file and ordinary windows program The installation is the same, just click "next" along the way.
2. The installation program requires you to enter your network domain (network domain name: in the form of xxx.com); server domain (server domain name: in the form of www.xxx.com) and the e-mail of the website administrator. If there is any, please fill it in according to the actual situation. If not, individual users can fill in the form according to the format.
3. When it comes to choosing the installation path, I strongly recommend that you change the installation path to "c:", because this can save a lot of configuration trouble. 4. Go all the way to "next" until "finish". The installation is complete.

At this time, your apache has been started. You can enter: http://127.0.0.1 in the IE address bar to see. In the "Service" item of "Management Tools", you can also find the apache service. In the future, apache can be used as a Windows 2000 service and run as the machine starts!

PHP server setup [3] Configure apache

The main items to modify when opening the configuration file are:

(1), search for documentroot. This statement specifies the path of your website, which is the directory where your homepage is placed. You can use the default one or specify one yourself, but remember, do not add "/" at the end of this sentence.
(2). Find directoryindex. This is the first homepage displayed on your site. After index.html, add index.htm index.php index.php3 index.cgi index.pl index.asp and so on. Note that there must be a space between each type!
(3). A special note is the port (port number). If iis is not installed, keep it at 80. Otherwise, you need to change it (because the iis web service occupies 80). You can change it to 81. Wait, or simply change the default port number of iis! As you please.
(4). #bindaddress * Change to bindaddress 127.0.0.1 (open with notepad/then click edit/search)

Others are items that need to be configured for in-depth use in the future! After the installation is complete, run http://localhost/
to see the apache help file!

PHP server setup [4] Install xxx (note this is the most important thing) (turn off the apache service)

(1), install php below first install php to c:php4 (Don’t change the path! Otherwise, the future configuration...hum) I am using version 4.0.2 of php,
(2), next I need to copy msvcrt.dll to c:winntsystem32 The system will prompt you that the file is being used by Windows. It doesn't matter. It's normal! Overwrite any existing files.
(3). Rename c:php.ini-dist to php.ini and copy it to c:winnt.
(4). Now open the apache configuration file httpd.conf and add the following statement : (Anywhere can be used, but it must be on a separate line)

scriptalias /php4/ "c:/php4/"
addtype application/x-httpd-php4 .php
addtype application/x -httpd-php4 .php3
addtype application/x-httpd-php4 .php4
action application/x-httpd-php4 "/php4/php.exe"
directoryindex index.html
directoryindex index .htm
directoryindex index.php
directoryindex index.php3
directoryindex index.php4
directoryindex index.asp

(5), next modify the php.ini file

Find the windows extensions item: add

  1. extension_dir = c:php4
  2. extension=php_zlib.dll
  3. extension =php_ldap.dll
  4. extension =php_zlib.dll
  5. extension =php_calendar.dll
  6. extension =php_exif.dll
  7. extension =php_ftp.dll
  8. extension =php_mssql70.dll (Don’t add this item, there is no mssql7.0)
  9. extension =php_imap.dll

■ok save ko■

Create the test.php file in your documentroot directory

ok see php Test page now! ! At this point, the configuration of php has been completed!
Just install jdk by default below! Then add the path variable value c:j2sdk*bin (*: different versions have different installation path names) in the Windows environment variable

Okay, just install iasp using the default installation! After the installation process, the software will prompt you to set up the web server. First select:

instant asp native servlet surport option. Next, select apache server

and then ask you to select the version number of apche and httpd. After the conf path is selected, the system automatically configures it. If everything goes well, you can test it! !
Create test.asp


Now run http://localhost/test.asp and see helloworld! Okay, everything is done and you can use apache! ! !

PHP server setup [5]. The above mentioned the operating environment of windows+apache+php+asp. Today, let’s talk about how to make apache also support the operation of jsp on this basis.

1: The required software resin (resin2.1.4)resin http://www.caochu.com

Let’s talk about how to install it:

resin is After downloading, it is a .zip file. Just unzip it to the specified directory. Here I am using c:resin-ee-2.1.4 and use the command c:resin-ee-2.1.4binhttpd.exe -install(remove) Use resin as a service of win2000

ok! Next, find the environment variables of win2000 "Control Panel-->System-->Advanced-->Environment Variables" and add the variable "resin_home" variable value "c:resin-ee-2.1.4" if you have installed jdk Then there is no need to set anything!

Now modify the apache settings file httpd.conf if the following code:

loadmodule caucho_module c:/resin-ee-2.1.4/libexec/apache-1.3/mod_caucho.dll
addmodule mod_caucho.c


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445948.htmlTechArticlePHP server setup [1] First download the software: (apache) I use apache_1 downloaded from Huajun Software Park .3.26-win32-x86-no_src! ! (jdk!) There is a link on the home page. (php4) No...
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 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.

What is the importance of setting the httponly flag for session cookies?What is the importance of setting the httponly flag for session cookies?May 03, 2025 am 12:10 AM

Setting the httponly flag is crucial for session cookies because it can effectively prevent XSS attacks and protect user session information. Specifically, 1) the httponly flag prevents JavaScript from accessing cookies, 2) the flag can be set through setcookies and make_response in PHP and Flask, 3) Although it cannot be prevented from all attacks, it should be part of the overall security policy.

What problem do PHP sessions solve in web development?What problem do PHP sessions solve in web development?May 03, 2025 am 12:02 AM

PHPsessionssolvetheproblemofmaintainingstateacrossmultipleHTTPrequestsbystoringdataontheserverandassociatingitwithauniquesessionID.1)Theystoredataserver-side,typicallyinfilesordatabases,anduseasessionIDstoredinacookietoretrievedata.2)Sessionsenhances

What data can be stored in a PHP session?What data can be stored in a PHP session?May 02, 2025 am 12:17 AM

PHPsessionscanstorestrings,numbers,arrays,andobjects.1.Strings:textdatalikeusernames.2.Numbers:integersorfloatsforcounters.3.Arrays:listslikeshoppingcarts.4.Objects:complexstructuresthatareserialized.

How do you start a PHP session?How do you start a PHP session?May 02, 2025 am 12:16 AM

TostartaPHPsession,usesession_start()atthescript'sbeginning.1)Placeitbeforeanyoutputtosetthesessioncookie.2)Usesessionsforuserdatalikeloginstatusorshoppingcarts.3)RegeneratesessionIDstopreventfixationattacks.4)Considerusingadatabaseforsessionstoragei

What is session regeneration, and how does it improve security?What is session regeneration, and how does it improve security?May 02, 2025 am 12:15 AM

Session regeneration refers to generating a new session ID and invalidating the old ID when the user performs sensitive operations in case of session fixed attacks. The implementation steps include: 1. Detect sensitive operations, 2. Generate new session ID, 3. Destroy old session ID, 4. Update user-side session information.

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

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.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

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),

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version