php zend framework及php虛擬機器主機 配置

來源:互聯網
上載者:User
*************************************************************

*****************zend framework配置****************************

*************************************************************

httpd.conf
1、cmd 進行 netstat -aon|findstr "80" 如果佔用,則改連接埠

  #Listen 12.34.56.78:80
  Listen 80

  >>

  #Listen 12.34.56.78:80
  Listen 8080

2、# LoadModule rewrite_module modules/mod_rewrite.so.

  注意:是mod_rewrite 前面的"#"去掉
3、文檔中所有凡是出現 AllowOverride為None的..請一定把None都改成All.這樣你寫.htaccess這樣的檔案才會起到作用..
4、DocumentRoot "C:/wamp/www" apache 配置虛擬路徑

  注意:請確保路徑正確,且路徑存在 否則apache不能啟動
5、如果此時訪問應該會出現許可權不夠的問題
所以我們還需應用訪問的許可權AllowOverride到指定的apache配置的虛擬路徑下
  


php.ini
將library 放置好然後php.ini裡配置include library

; UNIX: "/path1:/path2";include_path = ".:/php/includes";; Windows: "\path1;\path2"include_path = ".;c:\library"


************************************************************

******************apache 虛擬機器主機配置***************************

************************************************************

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檔案

配置如下資料

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  block.#  ServerName website.localhost    ServerAdmin webmaster@test.tools.directhr.net    DocumentRoot "C:\Users\n.zhang\Documents\Website\DHR3"   Options Indexes MultiViews FollowSymLinks  AllowOverride All  Order allow,deny  Allow from all         ErrorLog "logs/test.tools.directhr.net-error.log"    CustomLog "logs/test.tools.directhr.net-access.log" common  ServerName tools.localhost    ServerAdmin webmaster@test.tools.directhr.net    DocumentRoot "C:\Users\n.zhang\Documents\Tools"   Options Indexes MultiViews FollowSymLinks  AllowOverride All  Order allow,deny  Allow from all         ErrorLog "logs/test.tools.directhr.net-error.log"    CustomLog "logs/test.tools.directhr.net-access.log" common


4修改php.ini的下面兩個配置(允許上傳大檔案)

post_max_size = 500M

upload_max_filesize = 500M

5 若root的密碼為123456,登入phpmyadmin有一下幾種方式
開啟C:\wamp\apps\phpmyadmin3.2.0.1下的config.inic.php
【一】使用config授權模式,也是預設的方式
$cfg['Servers'][$i]['auth_type'] = 'config'; //授權模式
$cfg['Servers'][$i]['user'] = 'root';    //mysql教程登陸使用者
$cfg['Servers'][$i]['password'] = '123456'; //mysql登陸使用者密碼
$cfg['Servers'][$i]['AllowNoPassword'] = true;

【二】使用cookie授權模式, 需要登入
將'auth_type'改為'cookie',然後修改'blowfish_secret'用一個任一字元串作為cookie的加密字串,如果沒有加密鑰匙,系統會顯示"設定檔現在需要絕密的短語密碼(blowfish_secret) " ,設定檔如下:
  $cfg['Servers'][$i]['auth_type'] = 'cookie';
  $cfg['blowfish_secret'] = '44e2f5aece2855.93921574';

【三】用http授權模式 http授權模式的登陸視窗
$cfg['Servers'][$i]['auth_type'] = 'http';
注意事項:如果mysql伺服器端採用了4.1以上版本,而用戶端串連用的是mysql4.1一下版本,對使用者佈建密碼時注意使用OLD_PASSWORD函數,舉例:
mysql > SET PASSWORD = OLD_PASSWORD('12345')
mysql > /G
附錄:(以下內容是自己寫的)除了上述三種phpmyadmin內建的方法外,還可以使用apache的配置來限制登入,在phpmyadmin目錄下放置一個.htaccess檔案,指定使用的密碼記錄文 件。然後用htpasswd來產生密碼儲存在該密碼記錄檔案中(檔案的內容是加密的,使用方法htpasswd /etc/php_passwd username)。
httpd.conf中的內容:phpmyadmin's directory"> AllowOverride AuthConfig
.htaccess檔案的內容
authtype basic authuserfile /etc/php_passwd authname information require valid-user
我們可以看到/etc/php_passwd檔案中的內容類別似這樣:
username:2Y2CD6nfJuwL6

8

php.ini修改

max_input_time = -1

max_execution_time = -1

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.