问题1:
映射虚拟路径到:
Alias /phpmyadmin "/usr/local/src/phpMyAdmin-2.10.1/"
结果告诉我403,没有权限~
解决方法:httpd.conf里面添加:
<Directory "/usr/local/src/phpMyAdmin-2.10.1">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
问题2:乱码显示
phpMyAdmin - ?펳
Ξ??Ԙȫ mysql ?չ??<br />ǫ?첩 PHP Ťփ - ΄??
右键,更改编码为中文:
phpMyAdmin - 错误
无法载入 mysql 扩展,<br />请检查 PHP 配置 - 文档
问题3:问题2的中,出现的“无法载入 mysql 扩展”查找,原来是当时编译php时搞出来的东东:
configure -- prefix =/ usr / local / php -- with - apxs2 =/ etc / httpd / bin / apxs -- with - gd -- with - jpeg - dir -- with - ttf -- with - zlib - dir -- with - png - dir -- with - mysql - dir -- enable - track - vars
上面就是将 -- with - mysql后面添加了 - dir,至于为什么这样?我也不知道……
当时所谓的--with-mysql-dir参数,通过configure --help,看了下,根本没有,感觉是不是错误的参数就没有编译进去,也就没有加载mysql的功能,没有办法,我还是按照原来的方法,顺便加上了路径:
configure --prefix=/usr/local/php --with-apxs2=/etc/httpd/bin/apxs --with-gd --with-jpeg-dir --with-ttf --with-zlib-dir --with-png-dir --with-mysql=/usr/lib/mysql --enable-track-vars
这一次,configure成功,但是make时,遇到问题:
z -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -o libphp5.la
gcc: /usr/lib/mysql/libmysqlclient.so: No such file or directory
make: *** [libphp5.la] Error 1
找不到libmysqlclient.so文件,locate一下,仍然没有,那么,网上搜索了一下,还是没有,于是到:
http://dev.mysql.com/downloads/mysql/5.1.html
下载了一个Shared client libraries,安装:
rpm -ivh MySQL-shared-5.1.18-0.glibc23.i386.rpm
此时,make成功了,但是make install遇到这个问题:
[root@redhat php-5.2.2]# make install
Installing PHP SAPI module: apache2handler
/etc/httpd/build/instdso.sh SH_LIBTOOL='/etc/httpd/build/libtool' libphp5.la /etc/httpd/modules
/etc/httpd/build/libtool --mode=install cp libphp5.la /etc/httpd/modules/
cp .libs/libphp5.so /etc/httpd/modules/libphp5.so
cp .libs/libphp5.lai /etc/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.2.2/libs'
chmod 755 /etc/httpd/modules/libphp5.so
[activating module `php5' in /etc/httpd/conf/httpd.conf]
Installing PHP CLI binary: /usr/local/php/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing build environment: /usr/local/php/lib/php/build/
Installing header files: /usr/local/php/include/php/
Installing helper programs: /usr/local/php/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.1
[PEAR] Archive_Tar - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR - already installed: 1.5.1
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/php/include/php/ext/pdo/
[root@redhat php-5.2.2]# make install
Installing PHP SAPI module: apache2handler
/etc/httpd/build/instdso.sh SH_LIBTOOL='/etc/httpd/build/libtool' libphp5.la /etc/httpd/modules
/etc/httpd/build/libtool --mode=install cp libphp5.la /etc/httpd/modules/
cp .libs/libphp5.so /etc/httpd/modules/libphp5.so
cp .libs/libphp5.lai /etc/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/local/src/php-5.2.2/libs'
chmod 755 /etc/httpd/modules/libphp5.so
[activating module `php5' in /etc/httpd/conf/httpd.conf]
Installing PHP CLI binary: /usr/local/php/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing build environment: /usr/local/php/lib/php/build/
Installing header files: /usr/local/php/include/php/
Installing helper programs: /usr/local/php/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.1
[PEAR] Archive_Tar - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR - already installed: 1.5.1
Wrote PEAR system config file at: /usr/local/php/etc/pear.conf
You may want to add: /usr/local/php/lib/php to your php.ini include_path
目前该问题还没有解决,改天继续,睡觉了……
PS:
无敌了,今天还在考虑怎么解决上面的问题,还想着怎么卸载源码安装的软件,结果,随手看了下phpmyadmin,竟然可以用了,无语,难道,昨天我就那样重新编译了一把,就好了?不错,我真tmd 天才~
问题4:没有config.inc.php
这个问题,新版本出现的,因为人家有向导模式的配置文件生成方式了,直接执行./scripts/setup.php,可以有选项生成哪些功能,然后选择display,保存为config.inc.php,放到phpmyadmin目录下即可~