BluRayCD Forum

 找回密码
 立即注册【分享大片】
查看: 688|回复: 0
收起左侧

[交流分享] Apache+PHP详细配置及PhpMyAdmin配置过程出现问题的解决方法

[复制链接]

410

主题

177

回帖

1万

积分

Forum CEO

金币
2568 枚
体力
11800 点
kmxmxy 发表于 2011-7-17 23:02:24 | 显示全部楼层 |阅读模式
1.Apache配置PHP个人认为首先要注意的是Apache和PHP的版本信息,不同的版本之间所要进行设置的参数是不同的,开始的盲目让自己受尽了苦头。
2.选择版本:Apache 2.2.14  PHP:5.2.5 具体细节不再赘述。。。
3.验证Apache和PHP是否安装成功:
  (1) Apache: https://localhost
(2)PHP:在dos窗口下运行php -i
4.PHP配置文件php.ini
  (1)修改:
extension_dir = “./”
    extension_dir = "C:/Program Files/PHP/ext" (自己安装PHP的实际目录下ext子目录的路径)
  (2)取消注释以支持mysql数据库
     extension=php_mysql.dll
     extension=php_mysqli.dll
  (3)环境变量:
PHPRC: C:\Program Files\PHP
Path中添加:C:\Program Files\PHP
将文件liblibmysql.dll 拷贝入C:\WINDOWS\system32
  (这一步不进行可能会报Httpd.exe错误)
5.Apache配置文件httpd.conf
(1)添加对php的支持
   LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"
   PHPIniDir "C:/Program Files/PHP"
(2)实际工作的目录:
    DocumentRoot "F:/ApcheWork"
   <Directory "F:/ApcheWork">
   <Directory "F:/WWW" >
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    allow from all
</Directory>
(3)添加对index.php的支持
    <IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>
  (4) 添加类型支持
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .html
    AddType application/x-httpd-php .php .phtml .php3 .php4
AddType application/x-httpd-php-source .phps

附:配置PhpMyAdmin过程中出现的问题及解决方法
问题1:没有找到 PHP 扩展 mbstring,而您现在好像在使用多字节字符集。没有 mbstring 扩展的 phpMyAdmin 不能正确分割字符串,可能产生意想不到的结果。
解决方法:
编辑PHP配置文件php.ini,

;extension=php_mbstring.dll
改成
extension=php_mbstring.dll

问题2:无法加载 mcrypt 扩展 请检查您的 php 配置。
解决方法:
(1)找到php目录下的libmcrypt.dll,并将libmcrypt.dll复制到C:\windows \system32目录中
(2)编辑PHP配置文件php.ini,,
将“;extension=php_mcrypt.dll”
改成extension=php_mcrypt.dll
问题3:链接表的额外特性尚未激活。
解决方法:
(1)选取目录下scripts/ create_tables.sql 文件,再点击执行,会自动生成一个名为phpmyadmin的数据库。
(2)用PHP编辑器打开config.inc.php文件,找到:
$cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable'] = ''; // 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = ''; // 'pma_relation'
$cfg['Servers'][$i]['table_info'] = ''; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = ''; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = ''; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = ''; // 'pma_column_info'
$cfg['Servers'][$i]['history'] = ''; // 'pma_history'
改成:
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; // 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = 'pma_relation'; // 'pma_relation'
$cfg['Servers'][$i]['table_info'] = 'pma_table_info'; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = 'pma_column_info'; // 'pma_column_info'
$cfg['Servers'][$i]['history'] = 'pma_history'; // 'pma_history'
问题4:配置文件现在需要一个短语密码。
解决方法:
编辑配置文件config.inc.php,修改下项参数:$cfg['blowfish_secret'] = '123456';
您知道吗,申请VIP会员可以免回复下载,无广告骚扰, 点此处申请

本版积分规则

小黑屋|手机版|Archiver|4K蓝光论坛

GMT+8, 2024-4-30 06:33

Copyright © 2001-2021, Gadaddy Cloud.

快速回复 返回顶部 返回列表