Recommend an integrated environment XAMPP

Source: Internet
Author: User
Tags image processing library website server windows x86 contact form filezilla ftp ioncube webmail server what is joomla

Excerpt from: http://blog.sina.com.cn/s/blog_72c4b92501012ll7.html

A novice contact joomla! The process should look like this: After seeing the word, you first have to figure out "what is joomla!" and then you want to "try it out". However,joomla! is a Web application that requires a server environment to run. If you don't know whether joomla! is your idea or not, just go and buy server space to test it, I'm afraid you won't want to. So for an eager to test joomla! How to install, run, operate the novice, the most convenient is to build a local test server on their own PC.

This site has written about the Ravenswood Joomla Server integration package, which is my first contact joomla! The test server that is used. However, the RJS function is limited. Later I learned that XAMPP was more appropriate. In order to correct the previous article to the Novice's misleading, today I specifically introduce the use of XAMPP to build a local test server process and considerations.

XAMPP these 5 English letters, X stands for "diversity", "content rich", followed by 4 letters representing: Apache, MySQL, PHP and Perl, so it is a full-featured AMPP package.

XAMPP is also completely free, and it offers versions for Windows, Linux, MacOS and Solaris 8 operating systems. This article describes only the XAMPP for Windows version.

1, why Choose XAMPP?

Although it is possible to build a local server by installing Apache, MySQL, and PHP separately, it is obvious that this process is complicated. In particular, the first contact with the Apache server environment of the novice, you want to install and configure the server in a step, I am afraid it will cost a lot of effort. I am not against your spirit of study, but as a research joomla! For the purpose of the user, I hope you figure out what the focus is.

At the same time, I must remind those who are unable to abandon their "install Apache": Do not mistakenly think that the personal installation of the server will be a good performance, I have every reason to believe that xampp than your labor results.

Since we can build good one local server in 5 minutes, why do you have to toss it there? This is the reason why I recommend XAMPP.

2. What does XAMPP contain?

The names of the parts represented by these letters are described earlier, but this is far from the XAMPP. In short, the latest version of XAMPP 1.6.7 already includes:

    1. Apache 2.2.9
    2. MySQL 5.0.51b
    3. PHP 5.2.6 + php 4.4.9 + PEAR
    4. SQLite 2.8.15
    5. OpenSSL 0.9.8h
    6. PhpMyAdmin 2.11.7
    7. ADOdb 4.98
    8. Mercury Mail Transport System v4.52
    9. FileZilla FTP Server 0.9.25
    10. Webalizer 2.01-10
    11. Zend Optimizer 3.3.0
    12. Eaccelerator 0.9.5.3 for PHP 5.2.6

As can be seen from the above, with the help of XAMPP, you can not only get an Apache server, but also can start an FTP server and a webmail server, and you can choose between PhP4 and PHP5, it is convenient for those who develop PHP programs, OpenSSL can To provide cryptographic protocols such as https://, Webalizer is a well-known traffic analyzer, and Zend and Eaccelerator can provide parsing services for encrypted PHP code.

In addition to these, XAMPP also comes with a lot of useful small modules, such as GD image processing library, mod_rewrite URL rewrite module and so on. For more information, you can read the Readme.txt documentation in the XAMPP post installation root directory.

Imagine how long it would take you to install such a sprawling server from scratch and configure it to work together. Now with XAMPP, we can do it in just 5 minutes!

3, Installation XAMPP

First, download the XAMPP installer. If the official website cannot be downloaded, you can get it from the download section of this site. Although the file name is the. exe format, it is actually a 7-zip self-extracting file that is only decompressed after running and does not add anything to the Windows registry.

7-zip Self Decompression Package for XAMPP

Description: XAMPP Official website provides a variety of formats of download files, I chose 7-zip self-extracting package is because the format of the download file is the smallest, about 32MB, convenient to download. This is what the XAMPP looks like when it's downloaded to your computer.

Click on this. exe file and it will ask you to unzip the location. It is strongly recommended to select the root directory of a partition to decompress! For example: D:\. An XAMPP directory is automatically created in the root directory at the time of decompression. Do not move or rename any files after the decompression is complete. To enter the D:\XAMPP directory, you should see the following screen:

folder content of XAMPP for Windows

If you see a picture like this, the server installation is complete. So simple? It's so easy!

{Mospagebreak_scroll TITLE=XAMPP content introduction and First run &heading= why choose XAMPP and its installation process}

4, XAMPP folder content Introduction

These directories and the names of the files have basically explained their identity, so I believe you can understand it at a glance. I only explain a few important places:

The Htdocs directory is equivalent to the public_html directory above the Unix virtual host, which is equivalent to the wwwroot on the IIS server, the so-called "Web root directory." The joomla! you want to test in the future, and any other PHP Web application, must be unzipped/uploaded to this directory to run.

Apache and PHP directories contain configuration files that may need to be accessed later to modify the settings.

You can also see that there are some. bat format DOS batch programs, such as Apache_start.bat, meaning is already obvious, still need to explain? Php-switch.bat is used to switch between PHP4 and PHP5. If you extract the XAMPP to a folder that is not the root of the partition, you must use Setup_xampp.bat to install it once to set the XAMPP run path.

Recognize two important. exe programs, one is Xampp_start.exe, the other is Xampp_stop.exe, and I believe you will understand their function at a glance. That's right! We're going to start and shut down the servers separately.

Some experts may scoff at this, they think that running Xampp-control.exe can be Apache, PHP, MySQL and so on directly into the Windows System Services (service), each time the boot automatically run, why so troublesome every start, Where's stop? My reason is: This test server is not the entire work on your PC, if you turn this server into a system service, it will slow down the computer. So I recommend manually starting and shutting down the server every time.

5. First Run XAMPP

So let's just click on the Xampp_start.exe, and you'll see a DOS window pop-up with an English hint that Apache is starting.

Start your Apache server by running Xampp_start.exe

If you don't see this screen, or if you see a DOS window flash away, it's likely that some other running program is taking up 80 ports. For example: Skype, the old version of Thunderbolt, and so on. The solution is to quit the software and start the server before running them. In fact, the same problem has happened in RJS. Members of the site next001 in the forum to check the port usage of the gadget, perhaps you find which software occupies 80 port is helpful.

It is not until you see a stable display of DOS windows above that you formally start the XAMPP server. You can minimize this window to make it easier for you to operate, but you can't close it, and once you close the window, the server shuts down.

Now open the browser, enter: http://localhost or http://127.0.0.1, you can see the following interface:

Access localhost homepage To verify the status of your XAMPP

At this point, you can fully demonstrate that your XAMPP is functioning properly.

For the back test joomla! Work smoothly, your browser may also need to enable cookies, your Windows may need to install Java Runtime environment, you may also need to have both IE browser and FireFox browser, you may also need to install Adobe Flash Player plugin, and so on. These things are not XAMPP's responsibility, but not good will affect the experience of your test, so please solve yourself.

{mospagebreak_scroll title=xampp initial parameters and in-depth adjustment}

6. Initial parameters of XAMPP

There is actually a lot of content on the screen just now, I do not know if you seriously read it? There are some newbies who don't always have a good learning habit, and I'm sure most people will not seriously study the content on the XAMPP initial page. The above "Install" and "phpinfo ()" Two should take a good look.

After the new installation, some of the default settings for XAMPP must be accounted for, otherwise you won't be in the back. It's actually all in the Readme file, but some people just don't see it. I had to repeat it again:

If you follow the example of this article to install XAMPP in the D:\XAMPP directory, then your site root directory is D:\xampp\htdocs; If you look into this directory, you will find that it is not empty. So, I do not recommend you to test joomla! directly or other web programs "upload" to the Htdocs directory, but should be inside a subdirectory, such as Joomla, to install the program into subdirectories to test. The advantage of doing this is to make the Htdocs directory look neat. Of course, you have to remember that the URL of your visit to Joomla is: Http://localhost/joomla.

The default username for the MySQL database is root, which is also the administrator user with the highest privileges, and the password is empty, that is, No. So when you are installing Joomla, do not fill in the database access password when asked. Of course, you are on the screen just now if you click on "Security", there will be a prompt to set a password. In this way, you must remember the new password you set.

So what about the database? You must create a new database yourself to install Joomla. The creation tool is phpMyAdmin, and the Access URL is: http://localhost/phpmyadmin/.

Before you start installing joomla! Before, I want you to remember these things, so as not to half find the password or do not know "database name" How to fill out and yell.

Now, you can put joomla! 1.5 of the installation packages are extracted to the D:\xampp\htdocs\joomla directory, and then the browser accesses Http://localhost/joomla to begin the installation process. You can refer to step 7 to complete the joomla! 1.5 Installation ".

{Mospagebreak_scroll title= in-depth adjustment of XAMPP setting parameters}

7, in-depth adjustment XAMPP setting parameters

In the previous step, I believe you have been able to install joomla! on your XAMPP server successfully. and run it. In order to make future test work smoother, it is necessary to understand some XAMPP setting parameters. I am not a server expert, so the following content only from the test needs, there are deficiencies or fallacies, please joomla! on this site Chinese forum post.

① Enable Mod_rewrite

Whether it's joomla! 1.0 or joomla!? 1.5, you need mod_rewrite support from Apache server when you need to turn on the SEF of the system. XAMPP, however, disables this module by default.

Enable method:

Open the xampp\apache\conf\httpd.conf file and find the following code on line 118th:

#LoadModule Rewrite_module modules/mod_rewrite.so

Delete the # symbol (the comment symbol) at the beginning of this line, and then save the file and restart the server.

② enabling Java

XAMPP also disables Java functionality by default, so you can install some joomla! You are experiencing problems with scaling. For example, if you need to install the Jpfchat Chat room component, the foreground will not see the chat room window if Java is not enabled.

Enable method:

Open the Xampp\apache\bin\php.ini file (Note: XAMPP has only one php.ini file on the new version, located in Xampp\php\php.ini), found in approximately 613 rows:

; Extension=php_java.dll

Remove the semicolon at the beginning of the line. Then restart the server.

③ Enable Curl

When you install the Booklibrary component, you will be asked to enable curl, and XAMPP is disabled by default.

Enable method:

Open the Xampp\apache\bin\php.ini file, found in approximately 582 lines:

; Extension=php_curl.dll

Remove the semicolon at the beginning of the line. Then restart the server.

④ Enable Fopen

Support for Fopen functionality is required when installing the Rwcards e-card component.

Enable method:

Open the Xampp\apache\bin\php.ini file, and on the No. 522 line, find the following code:

Allow_url_fopen = On

If you see this is OFF, please set it to ON.

⑤ Enable Eaccelerator

Eaccelerator is an Apache server plug-in that accelerates the operation of PHP code and provides encryption and decryption capabilities. The XAMPP is already self-brought, but is not enabled by default.

When installing the Joomlawiki component, you will find that the system needs eaccelerator support.

Enable method:

Opens the \xampp\apache\bin\php.ini file,

About 1296 rows or so, find

[Eaccelerator]

In this section, enable the following code (remove the beginning of the line; Semicolon):

Extension=eaccelerator.dll
Eaccelerator.shm_size = "0"
Eaccelerator.cache_dir = "\xampp\tmp"
eaccelerator.enable = "1"
Eaccelerator.optimizer = "0"
Eaccelerator.debug = "0"
Eaccelerator.check_mtime = "1"
Eaccelerator.filter = ""
Eaccelerator.shm_max = "0"
Eaccelerator.shm_ttl = "0"
Eaccelerator.shm_prune_period = "0"
Eaccelerator.shm_only = "0"
eaccelerator.compress = "1"
Eaccelerator.compress_level = "9"
Eaccelerator.keys = "Shm_and_disk"
Eaccelerator.sessions = "Shm_and_disk"
Eaccelerator.content = "Shm_and_disk"

Note: Joomlawiki may recommend installing Turck MMCache, but with eaccelerator, you do not have to install MMCache. Because "Eaccelerator is a further development of MMCache."

⑥ Adjusting Memory limits

If your PC is not performing well enough, you may sometimes encounter "out of memory" prompts while running XAMPP. This is because XAMPP defaults to an Apache server that allocates only 32MB of memory.

Open the \xampp\apache\bin\php.ini file, around line No. 246, to find:

Memory_limit = 32M;

Modify this value, for example:

Memory_limit = 500M;

PCs are now generally at least 1GB in memory, so allocating more than 128MB of memory here will not affect the PC's operation.

⑦ Adjusting Program Execution time

If the joomla! Installing some of the larger extensions, such as installing package zip files over 1MB, sometimes encounter "Fatal error:maximum execution time of seconds exceeded in ..." This error indicates that the extension will not install successfully.

This is because XAMPP the default program execution time (execution times) is too short.

Extension Program Execution Time:

Open the \xampp\apache\bin\php.ini file, around line No. 244, to find:

Max_execution_time = 60; Maximum execution time of each script, in seconds

Here default 60 seconds, you can add a 0 or two zero, you can extend 10 times times or 100 times times, hehe.

⑧ installation Ioncube

Ioncube is a PHP code encryption program, many commercial software through the Ioncube code to encrypt, and then sell out. For example, the well-known Clexus station internal components are encrypted with Ioncube. When the user installs Clexus, it is necessary to enable the Ioncube decryption program on the server. XAMPP does not have a ioncube program, so it needs to be installed manually.

First of all, download Ioncube decryption program from http://www.ioncube.com/loaders.php (free), this is a DLL file, currently the latest version is Ioncube_loader_win_5.2.dll, download to find the corresponding The version of Windows x86, download and get a compressed file, unzip the DLL file can be obtained.

Copy the Ioncube_loader_win_5.2.dll file to the D:\xampp directory, and then open the \xampp\apache\bin\php.ini file:

Find [Zend] This section, probably on line 1264th, immediately following this line to add a new line of code:

Zend_extension_ts = "\xampp\ioncube_loader_win_5.2.dll"

Then restart XAMPP to enable Ioncube.

Note: The name and version of this DLL file may be updated, so you have to be flexible with the file name you get.

⑨ Installing Python

XAMPP has no support for Python, but some advanced users may need Python functionality to develop and debug Python programs on their PCs. Then you might consider manually installing Python.

The following installation methods refer to a post in the XAMPP official forum.

First download activepython:http://www.activestate.com/products/activepython/

Then download mod_python:http://www.modpython.org/to get an. exe file.

Run ActivePython.exe to install Python, install the directory to install to D:\xampp\python, it is easier to manage.

Then run the Mod_python installation file, ask the Python installation location (automatically detected), and then ask the Apache installation location, manually navigate to the D:\xampp\apache directory, after installation it will be in D:\xampp\apache\module An mod_python.so file is added to the S directory, which is the Python module for the Apache server.

Now configure Python:

Open the D:\xampp\apache\conf\httpd.conf file and insert a line:

LoadModule Python_module modules/mod_python.so

Insert at the end of the httpd.conf file:

<ifmodule python_module>
<directory "D:\xampp\htdocs\test" >
AddHandler Mod_python. py
Pythonhandler Mptest
Pythondebug on
</Directory>
</IfModule>


Restart the Apache server. The Python server is already enabled.

Now test if Python can run:

Save the following code as a mptest.py file and then save it to the D:\xampp\htdocs\test directory:

From Mod_python import Apache

def handler (req):
Req.content_type = ' Text/plain '
Req.write ("Hello world!")
return Apache. Ok

Then open the browser and visit:

http://localhost/test/mptest.py

You'll see the page appear:

Hello world!


This proves the Python installation was successful!

{Mospagebreak_scroll title= How to enable XAMPP's own mail server}

How to enable XAMPP-brought mail server

The contents of this page were added on July 13, 2009. Originally wrote this article did not take into account the activation of the XAMPP to bring the mail service, one reason is I am not familiar with the Mercury mail server, another reason is that I feel that the local test almost does not use the mail function, really want to use, just fill in their own real SMTP server can also run.

There are two reasons to add today: first, many people in the local test, in the default settings to test membership registration, submit contact e-mail, encountered the "No activation Mail" problem, everywhere to help, and second, considering that some people may use XAMPP own computer installed Joomla, allow others to pass IP Address, and other ways to access this local server.

Before I wrote the following, I searched the internet for 30 minutes, but unfortunately, no one has ever described in detail how to enable XAMPP's own mail server to work with Joomla. So if you're looking for information on this, you're basically not going anywhere else. Anyway

First, explain why the "activation email is not received when registering a member" after XAMPP local installation of Joomla?

The reason is simple: After the XAMPP server starts, it does not start its own Mercury mail server by default. and the default setting of Joomla background is to use the local mail server, this server does not start, how can you send mail to?

Some users may be using Control Panel to start the XAMPP, the Control Panel on the Mercury Mail server button, he also clicked the "Start" button to start the mail server, or can not send activation mail, why?

The reason is simple: the XAMPP default setting is that the Mercury mail server cannot send messages directly. It must be set in a little bit. The steps are as follows:

0. Introduction of test environment

The environment in which I do the following is: Windows XP SP3 + XAMPP 1.7.0 + Joomla 1.5.12

Where the XAMPP installation location is: D:\xampp\. If your installation location is different, please be careful to adjust accordingly.

1. Launch Mercury mail server

The name of the mail server XAMPP comes with is Mercury. Set up you have launched Apache and MySQL, now click on the XAMPP root directory mercury_start.bat can start the mail server directly, or you can start the Mercury mail server through the Control Panel mentioned above.

Start Mercury Mail Server

2. Send Test mail

As a step, the Mercury mail server is already running and able to send mail. However, it can only be sent by Mercury itself. Let's test this feature first.

On the Mercury main panel, click on the top Menu "File-, send mail Message", you will pop up a Simple mail compose window, fill in your own regular mailbox as the recipient, casually fabricate a subject and text, click "Send" sent out. I tested it in Gmail's mailbox, and I got it in about 2 minutes. Look at the following two:

Mercury Test Mail received

However, this time if you use the SMTP account described earlier to try to set the Joomla background mail settings, or try to use Outlook Express with this SMTP to send mail, will fail. JOOMLA error messages do not provide any valuable reference, and OE will prompt you:

553 We do not relay non-local mail, sorry

Let's solve this problem, but it's just a small setup:

3, set the Mercury mail server and the default account password

Click on "Configuration-MercuryS SMTP Server" on the Mercury's top menu and click on the "Connection Control" tab on the Popup dialog box to remove the "

Mercury SMTP Server Settings

After you remove the above item, you can send an outgoing message. However, Mercury's default account is no password, and a password must be set to connect to the SMTP server. For the convenience of memory, our test account password is set to the same as the user name: it is postmaster.

If: Click on "Configuration-Manage Local Users" on the top menu of the Mercury main panel, select Postmaster This user on the pop-up dialog, click on the "Change" button on the right, and then in the popup dialog box " Mail Password "Fill postmaster here, click" OK ".

Mercury SMTP account password

With these two-point settings, the Mercury mail server can be used to send outgoing mail. Next you want to set up this SMTP account in Joomla background:

4. Use Mercury's SMTP server in Joomla

Log in to the Joomla 1.5.x backend as an administrator, click "Global Settings" on the control Panel, go to the "Servers" tab, and fill in the "Mail Settings" as shown here:

Joomla Use Mercury SMTP server

First select "SMTP Server" mode. The sender address is filled in [email protected]alhost. Because Mercury's SMTP server does not require authentication by default, select No in SMTP authentication. The user name and password are postmaster, the host is the address of the SMTP server, where the "localhost" is filled, the port is the default 25.

If you need to use this local Mercury mail server to send and receive messages in Outlook Express, you can also set them according to the above parameters. The address of the POP3 server is still localhost and the port is 110.

It's done by now. After you save the global settings, you can test each new member in the foreground and send it through the contact form, and you should be able to receive it.

Finally, a reminder: Some people may also want to play "Mail Settings" inside the Sendmail mode, which is almost meaningless.

Sendmail was originally a Linux platform program, in XAMPP for Windows, there is also a Sendmail.exe file, which can only be considered "pseudo-Sendmail" (fake Sendmail), rather than the real Sendmail.

It is called "pseudo-SendMail" because on the Windows platform, this sendmail.exe actually sends mail through an SMTP server, not by itself. In other words, if you want to play sendmail, then you must also follow the above mentioned settings, fully adjust the Mercury's SMTP server, now choose SendMail mode to work properly. But what is the point? It is better to send it directly with the SMTP parameter.

{Mospagebreak_scroll TITLE=XAMPP security issues}

XAMPP's security issues

XAMPP was originally an easy-to-install server package developed for local testing. It is generally not recommended to be used as an official website server. If you really want to use XAMPP to do Web server, then you should first consider the security of XAMPP.

Even if it is a local test, in order to fully imitate the virtual host, we should also improve the security settings of XAMPP.

XAMPP The default MySQL database username is root and the password is empty. This is all XAMPP users know, so you have to modify it.

You will see some hints when you visit the http://localhost/security/index.php page through a browser. There are red "unsafe" and green "safe".

Follow the onscreen prompts, and the ultimate goal is to show the green "safe" for all items.

Note: If you have installed joomla! on XAMPP before you modify these security settings or other web programs, you must open the appropriate configuration file after you modify these passwords (joomla! Is the/configuration.php in the root directory), and the original blank password is changed to the new password.

XAMPP the tools above to manage the database phpMyAdmin its access paths are well known. Fortunately, PhpMyAdmin allows users to modify the name of the installation directory, so it is recommended that you modify it to another name, which greatly reduces the risk of being hacked. Of course, after the installation directory has been modified, the URL of the access is changed.

If you want to use XAMPP as the official web server, there may be more security issues to consider. Users of this requirement are advised to read carefully the documentation and tips of the XAMPP official website.

Recommend an integrated environment XAMPP

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.