期间遇到好多问题:
1.lampp文件拷出时出现无法拷贝的问题,建议:压缩文件再拷贝。
2.将lampp.tar.gz(CentOS中/lampp的压缩文件)拷入Fedora。
3. 解压后,执行/opt/lampp/lampp start又出现了很多问题,详见下面。
安装Xampp时出现的问题:
1. Apache、MySQL、ProFTPD服务已经运行。
[root@localhost 下载]#/opt/lampp/lampp start
Starting XAMPP for Linux1.7.7...
XAMPP: XAMPP-Apache is alreadyrunning.
XAMPP: XAMPP-MySQL is alreadyrunning.
XAMPP: XAMPP-ProFTPD is alreadyrunning.
XAMPP for Linuxstarted.
解决:分别利用命令:(1)pkill httpd (2)pkill mysql (3)pkill ftp来终止上述三项已开启的服务。
2. 不能启动MySQL服务
[root@localhost opt]# ./lampp/lamppstart
Starting XAMPP for Linux1.7.7...
Deprecated: Directive 'register_globals' isdeprecated in PHP 5.3 and greater in Unknown on line0
XAMPP: Starting Apache with SSL (andPHP5)...
XAMPP: Starting MySQL...
XAMPP: Couldn't start MySQL!
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
解决:(1)chown-hR root /opt/lampp (2)chmod-R 777 /opt/lampp (3)/opt/lampp/lampprestart
3. Warning:World-writable config file '/opt/lampp/etc/my.cnf' isignored
[root@localhost opt]#/opt/lampp/lampp restart
Stopping XAMPP for Linux1.7.7...
XAMPP: XAMPP-Apache is notrunning.
XAMPP: XAMPP-MySQL is notrunning.
XAMPP: StoppingProFTPD...
XAMPP stopped.
Starting XAMPP for Linux1.7.7...
Deprecated: Directive'register_globals' is deprecated in PHP 5.3 and greater in Unknownon line 0
XAMPP: Starting Apache withSSL (and PHP5)...
XAMPP: Starting MySQL...
Warning: World-writable configfile '/opt/lampp/etc/my.cnf' is ignored
XAMPP: StartingProFTPD...
XAMPP for Linux started.
解决:(1)chmod 755 /opt/lampp/etc/my.cnf (2)chmod 755 /opt/lampp/phpmyadmin (3) vi/opt/lampp/etc/php.ini 将“;session.save_path = “/tmp””前面的“;”去掉,即去掉注释语句(个人认为这一步可以省略,如果不行的话,建议大家还是加上这一步) (4) 重启lampp.
4.Permission denied
[root@localhost lampp]# ./lamppstart
StartingXAMPP for Linux 1.7.4.../opt/lampp/bin/php: error while loading shared libraries:libz.so.1: cannot enable executable stack as shared objectrequires: Permission denied
XAMPP: Starting Apache with SSL ...
/opt/lampp/bin/httpd: error while loading shared libraries:libexpat.so.0: cannot enable executable stack as shared objectrequires: Permission denied
XAMPP: Error 127! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Sorry, I've no idea what's going wrong.
XAMPP: Please contact our forumhttp://www.apachefriends.org/f/
XAMPP: Starting MySQL...
./bin/my_print_defaults: error while loading shared libraries:libz.so.1: cannot enable executable stack as shared objectrequires: Permission denied
XAMPP: Couldn't start MySQL!
XAMPP: Starting ProFTPD...
XAMPP: /opt/lampp/sbin/proftpd: error while loading sharedlibraries: libcrypto.so.1.0.0: cannot enable executable stack asshared object requires: Permission denied
XAMPP: Error 127! Couln't start ProFTPD!
XAMPP for Linux started.
解决:(1) 终端输入:setsebool-P allow_execstack on (2)重启lampp
5、进入phpMyAdmin页面时显示:Wrong permissions on configurationfile, should not be world writable
解决: chomd -R755 /opt/lampp/phpmyadmin
6.进入Xampp的首页,选择语言后页面无法跳转,查看日志(进入目录:/opt/lampp/logs/下,tail -ferr_log),发现错误:
Warning:file_get_contents(lang.tmp) [function.file-get-contents]: failed toopen stream:
Permissiondenied
in/opt/lampp/htdocs/xampp/index.php on line 2
Warning:Cannot modify header information - headers already sent by (outputstarted at /opt/lampp/htdocs/xampp/index.php:2) in/opt/lampp/htdocs/xampp/index.php on line 4
解决:chmod764 /opt/lampp/htdocs/xampp/lang.tmp
7. Whenyou try to access mysql you would get an error as : “cannot startsession without errors, please check errors given in your PHPand/or webserver log file and configure your PHP installationproperly”
If the above said problem was already solved then you mightencounter the new problem which says,
“Wrong permissions on configuration file,should not be world writable!”.
解决:chmoda-w /opt/lampp/phpmyadmin/config.inc.php
8. 进入phpmyadmin时,出现错误:
#2002 - 服务器没有响应 (或者本地 MySQL服务器的套接字没有正确配置)
网上查到的解决方法是:
找到phpmyadmin文件夹在xampp/phpmyadmin下(具体视自己安装的路径来查找);找到config.inc.php文件,用notepad等软件打开找到$cfg['Servers'][$i]['host']= 'localhost';这一行,然后将这里的localhost修改为127.0.0.1。
9.Xampp安装好后,打开phpmyadmin时,发现乱码
解决:
(1)去phpMyAdmin的根目录下,打开以下这个文件: libraries/select_lang.lib.php
找到"$mysql_charset_map = array("那一行,把'gb2312'=> 'gb2312', 改成 'gb2312' => 'latin1',
保存,OK。
(2)进入phpMyAdmin管理,选择语言chinese simplified(zh-gb2312-utf-8) 。