*************************************************************
*****************zend framework配置****************************
*************************************************************
httpd.conf
1、cmd ?進(jìn)行 netstat -aon|findstr "80"?? 如果占用,則改端口
#Listen 12.34.56.78:80
Listen 80
立即學(xué)習(xí)“PHP免費(fèi)學(xué)習(xí)筆記(深入)”;
>>
#Listen 12.34.56.78:80
Listen 8080
2、# LoadModule rewrite_module modules/mod_rewrite.so.??
注意:是mod_rewrite 前面的"#"去掉
3、文檔中所有凡是出現(xiàn) AllowOverride為None的..請(qǐng)一定把None都改成All.這樣你寫.htaccess這樣的文件才會(huì)起到作用..
4、DocumentRoot "C:/wamp/www"?? apache 配置虛擬路徑 ??
注意:請(qǐng)確保路徑正確,且路徑存在?? 否則apache不能啟動(dòng)
5、如果此時(shí)訪問(wèn)應(yīng)該會(huì)出現(xiàn)權(quán)限不夠的問(wèn)題
???? 所以我們還需應(yīng)用訪問(wèn)的權(quán)限AllowOverride到指定的apache配置的虛擬路徑下?
php.ini
將library 放置好然后php.ini里配置include ?library
; UNIX: "/path1:/path2";include_path = ".:/php/includes";; Windows: "\path1;\path2"include_path = ".;c:\library"
******************apache 虛擬主機(jī)配置***************************
************************************************************
1去掉apache httpd.conf下面兩句話前面的#
LoadModule vhost_alias_module modules/mod_vhost_alias.so
Include conf/extra/httpd-vhosts.conf
2在C:\Windows\System32\drivers\etc下找到hosts文件
配置
127.0.0.1?tools.localhost
127.0.0.1 website.localhost
3找到C:\wamp\bin\apache\Apache2.2.11\conf\extra下的httpd-vhost.conf文件
配置如下數(shù)據(jù)
NameVirtualHost *:8080## VirtualHost example:# Almost any Apache directive may go into a VirtualHost container.# The first VirtualHost section is used for all requests that do not# match a ServerName or ServerAlias in any <VirtualHost> block.#<VirtualHost *:8080> ServerName website.localhost ServerAdmin webmaster@test.tools.directhr.net DocumentRoot "C:\Users\n.zhang\Documents\Website\DHR3" <Directory "C:\Users\n.zhang\Documents\Website\DHR3"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog "logs/test.tools.directhr.net-error.log" CustomLog "logs/test.tools.directhr.net-access.log" common</VirtualHost><VirtualHost *:8080> ServerName tools.localhost ServerAdmin webmaster@test.tools.directhr.net DocumentRoot "C:\Users\n.zhang\Documents\Tools" <Directory "C:\Users\n.zhang\Documents\Tools"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog "logs/test.tools.directhr.net-error.log" CustomLog "logs/test.tools.directhr.net-access.log" common</VirtualHost>
4修改php.ini的下面兩個(gè)配置(允許上傳大文件)
post_max_size = 500M
upload_max_filesize = 500M
5 若root的密碼為123456,登錄phpmyadmin有一下幾種方式
打開(kāi)C:\wamp\apps\phpmyadmin3.2.0.1下的config.inic.php
【一】使用config授權(quán)模式,也是默認(rèn)的方式
?$cfg['Servers'][$i]['auth_type'] = 'config';?? //授權(quán)模式
?$cfg['Servers'][$i]['user'] = 'root';???? ??? //mysql教程登陸用戶
?$cfg['Servers'][$i]['password'] = '123456';??? //mysql登陸用戶密碼
?$cfg['Servers'][$i]['AllowNoPassword'] = true;
?【二】使用cookie授權(quán)模式, 需要登錄
? 將'auth_type'改為'cookie',然后修改'blowfish_secret'用一個(gè)任意字符串作為cookie的加密字符串,如果沒(méi)有加密鑰匙,系統(tǒng)會(huì)顯示"配置文件現(xiàn)在需要絕密的短語(yǔ)密碼(blowfish_secret) " ,配置文件如下:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['blowfish_secret'] = '44e2f5aece2855.93921574';?
【三】用http授權(quán)模式? http授權(quán)模式的登陸窗口
?$cfg['Servers'][$i]['auth_type'] = 'http';
? 注意事項(xiàng):如果mysql服務(wù)器端采用了4.1以上版本,而客戶端連接用的是mysql4.1一下版本,對(duì)用戶設(shè)置密碼時(shí)注意使用OLD_PASSWORD函數(shù),舉例:
?mysql > SET PASSWORD = OLD_PASSWORD('12345')
?mysql > /G
?附錄:(以下內(nèi)容是自己寫的)除了上述三種phpmyadmin自帶的方法外,還可以使用apache的配置來(lái)限制登錄,在phpmyadmin目錄下放置一個(gè).htaccess文件,指定使用的密碼記錄文 件。然后用htpasswd來(lái)生成密碼保存在該密碼記錄文件中(文件的內(nèi)容是加密的,使用方法htpasswd /etc/php_passwd username)。
???? httpd.conf中的內(nèi)容:phpmyadmin's directory"> AllowOverride AuthConfig
?.htaccess文件的內(nèi)容
?authtype basic authuserfile /etc/php_passwd authname information require valid-user
?我們可以看到/etc/php_passwd文件中的內(nèi)容類似這樣:
?username:2Y2CD6nfJuwL6
8
php.ini修改
max_input_time = -1
max_execution_time = -1 ?
PHP怎么學(xué)習(xí)?PHP怎么入門?PHP在哪學(xué)?PHP怎么學(xué)才快?不用擔(dān)心,這里為大家提供了PHP速學(xué)教程(入門到精通),有需要的小伙伴保存下載就能學(xué)習(xí)啦!
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://www.miracleart.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)