Php implements gzip configuration in apache environment, apachegzip
This example describes how to configure gzip in apache. Share it with you for your reference. The details are as follows:
1. conf/httpd. conf
1) Remove # comments before LoadModule
Tossing a half-day or so of time, successfully configured successfully under Win7_64bit PHP+APACHE+MIRIADB database+ Configuration tool Download and unzipApache HTTP Server 2.4.25 : HTTP://WWW.APACHEHAUS.COM/CGI-BIN/DOWNLOAD.PLX-About Version:
For static pages there is an etag.
First of all, look at this: Apache static page
The static page that Apache sends to the client typically contains the last-modified and ETag, the values of which are from the modified time of the static file and
In our web site can actually be accessed via IP directly, of course, in our testing is convenient, but once in the actual production server so allow IP direct access to the source site is a dangerous move, if your production server is malicious
The more efforts the more lucky ~!Install the environment to meet the problem ~ after attention!Precautions:1>not Found The file was not found (Apache httpd.conf config file)1>documentroot: "x:/php" When running php files, PHP files should be placed
A clean CentOS environment
Install the JDK and configure the environment variables
Direct installation via yum-y install httpd command
After installation enter Usr/sbin/apachectl start Apache.
Apache AB performs a stress test with the
Write a PHP file to test mysql as follows:Copy codeThe Code is as follows:$ Link = mysql_connect ('localhost', 'root', 'root ');If (! $ Link) echo "failed! ";Else echo "successful! ";Mysql_close ();?> The error message is: Fatal error: Call to
If you use PHP test.php in the server to run Exec,system,passthru and other command-related scripts can run successfully, in the Web page does not respond, then look at the Apache Error_log log, typically these functionsSystem () has been disabled
Write a test of MySQL PHP file is as follows:
Copy Code code as follows:
$link =mysql_connect (' localhost ', ' root ', ' root ');
if (! $link) echo "Failed!";
else echo "Success!";
Mysql_close ();
?>
Results reported
This article illustrates how PHP implements the Gzip configuration method in the Apache environment. Share to everyone for your reference. Specifically as follows:
1, conf/httpd.conf
1) Remove the #loadmodule headers_module modules/mod_headers.so
Recently there is a small program that needs to run in PHP, documenting the PHP environment configuration process. 1. First in the Download integration tool Wamp,wamp is the integrated installation environment that uses Apache, MySQL, and PHP on
Environment:CentOS 6.4MySQL detailed installation can refer to: http://www.cnblogs.com/yangxia-test/archive/2012/11/12/2766237.htmlApache detailed installation can be consulted:
Tools/Materials
Virtual machines and CentOS operating systems
Use of basic Linux commands
Method/Step
First of all, in order to build a stable lamp practice environment, make sure that your virtual machine can be connected,
Problem description in CentOS system using Apache server install GBK encoding program garbled, this is mainly because the default installation of Apache server character encoding for UTF-8, if the GBK program does not force encoding, garbled
The default encoding of php program written on windows platform is gb2312 and the default encoding of linux and apche are UTF-8, so the php program written on windows platform is uploaded to linux, browsing the Chinese web page is garbled. If the
After installing PHP in Windows, Apache may encounter the LoadModuletakestwoarguments error. The main cause is httpd. this sentence in conf: LoadModulephp5_moduleD: ProgramFilesPHPphp5apache2_2.dll the interpreter treats the null value in
Wrote a test for MySQL PHP file as follows:
Copy CodeThe code is as follows:
$link =mysql_connect (' localhost ', ' root ', ' root ');
if (! $link) echo "Failed!";
else echo "Success!";
Mysql_close ();
?>
Results reported error: Fatal error:call
1. open the Apache configuration file httpdconf, for example, etchttpdconfhttpdconfvietchttpdconfhttpdconf by default.
Problem description in CentOS system using Apache server install GBK encoding program garbled, this is mainly because the default
For static pages there is an etag.
First of all , look at this: Apache static page
The static page that Apache sends to the client typically contains the last-modified and ETag, the values of which are from the modified time of the static file and
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.