2007年5月7日星期一

MACOSX下xampp安装使用错误

DEVELOPE FOR PHP
安装了xampp后启动服务时有问题
------------------------------
Starting XAMPP for MacOS X 0.6.1...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP: - IPv4 getaddrinfo 'noname' error: No address associated with nodename
- warning: unable to determine IP address of 'noname'
- error: no valid servers configured
- Fatal: error processing configuration file
'/Applications/xampp/etc/proftpd.conf'
XAMPP: Error 1! Couln't start ProFTPD!
XAMPP for MacOS X started.
------------------------------
似乎是主机名的问题
解决办法:把主机名与127.0.0.1映射写到host中
http://www.apachefriends.org/f/viewtopic.php?t=12792
在/etc/hosts中添加一行
127.0.0.1 noname
命令行是echo '127.0.0.1 noname' >> /etc/hosts

另外可能遇到的问题
访问http://localhost
有错误
Warning: fopen (lang.tmp) [function.fopen]: failed tons of open stream: Permission denied in /Applications/xampp/xamppfiles/htdocs/xampp/lang.php on LINE 2

Warning: fwrite (): supplied argument is emergency A valid stream resource in /Applications/xampp/xamppfiles/htdocs/xampp/lang.php on LINE 3

Warning: fclose (): supplied argument is emergency A valid stream resource in /Applications/xampp/xamppfiles/htdocs/xampp/lang.php on LINE 4

Warning: CAN emergency modify header information - headers already sent by (outputs started RK /Applications/xampp/xamppfiles/htdocs/xampp/lang.php: 2) in /Applications/xampp/xamppfiles/htdocs/xampp/lang.php on LINE 5

解决办法:
http://www.google.com/url?sa=t&ct=res&cd=2&url=http%3A%2F%2Fbugs.xampp.org%2Fview.php%3Fid%3D14&ei=URxARsPsKpjisAKtoOChAw&usg=AFrqEzfjvmL4gANkQQgmwtwGLIp5_mMNBg&sig2=7MarRiV1PuGh5wnf34wJMw
将下载的文件 在终端下用命令行方式 重新解压缩安装
- download XAMPP and save as "filename.tar.gz"
- open Terminal
- change directory to the one where you downloaded XAMPP to. (cd /path/to/xampp/download)
- run the following command:
$ sudo su
- enter your password
- run the following command:
# tar xfvpz xampp-macosx-0.6a.tar.gz -C /
- now startup XAMPP

没有评论: