Win下出现apache无法启动的解决方式

使用xampp时,时常会遇到apache启动不了的情况,而xampp的控制面板有没有什么像样的提示 只有一个”Busy…”

但重启Win后,先启动apache就不会遇到问题。

但是事情总是有原因的,决定去查下,也许是xampp给的提示不足,而不是apache的问题,

> cmd
> d:\
> cd tools\xampp\apache\bin\ #我的apache安装位置
> httpd # apache的启动程序

(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。  : make_sock: c
ould not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
# 找到原因了 原来是我的80端口被占用了

> netstat -ano # 查看网络状态

  Proto  Local Address          Foreign Address        State           PID
  TCP    127.0.0.1:80           127.0.0.1:1920         CLOSE_WAIT      1112
  TCP    127.0.0.1:80           127.0.0.1:2016         CLOSE_WAIT      1112
  ...
# 通过 Local Address 中端口为80的行 可以看到 我的80端口被PID为1112的进程占用了

任务管理器>进程 / 工具栏 > 查看 > 选择列 在“PID(进程ID)”项上打勾
在进程列表中 查找PID为1112的进程
# 我这里是该死的迅雷 !!
# 当然之前我还遇到过QQ的时候
ok 杀掉这个进程 或者关掉罪魁,启动Apache 道路终于通畅了!^_~

取自”wiki:Win下出现apache无法启动的解决方式

, ,

尝试恢复因为重装了系统改变目录而导致不可用的xampp
出自Fallseir’s Wiki

尝试恢复因为重装了系统改变目录而导致不可用的xamppPHP

1、恢复mysql

* 查看mysql的启动项 xampp\mysql_start.bat

mysql\bin\mysqld –defaults-file=mysql\bin\my.cnf –standalone –console

* 修改mysql的配置 mysql\bin\my.cnf

更改其中的配置路径
socket = “C:/tools/develop/xampp/mysql/mysql.sock”
socket = “C:/tools/develop/xampp/mysql/mysql.sock”
basedir = “C:/tools/develop/xampp/mysql”
tmpdir = “C:/tools/develop/xampp/tmp”
datadir = “C:/tools/develop/xampp/mysql/data”

* 打开xampp-control 开启mysql服务 ok!
2、 恢复apache
* 修改apache的配置文件 xampp\apache\conf\httpd.conf

更改其中的配置路径
ServerRoot “c:/tools/develop/xampp/apache”
DocumentRoot “c:/tools/develop/xampp/htdocs”

ScriptAlias /cgi-bin/ “C:/tools/develop/xampp/cgi-bin/”

* 更改apache中的xampp的配置

xampp\apache\conf\extra\httpd-xampp.conf

* 更改自己的web站点配置

xampp\apache\conf\extra\httpd-vhost.conf

* 打开xampp-control 开启apache服务 ok!
3、恢复php
* 修改php配置信息中的路径

xampp\apache\bin\php.ini

* 重启apache ok!

,

升级到了wp2.5

升级到了wp2.5
原来升级很简单 呵呵
1、覆盖原始文件
2、运行 http://example.com/wordpress/wp-admin/upgrade.php
一切ok!
当然如果你要升级 最好先备份数据库和原始文件

主要应该是后台更新了 界面更清爽了 其他的因为我不常用 所以没有留意什么是新的 哈
增加了TAG

underone 的 G7 v5 不错 赞!

,

在ActionScript 3 中动态加载一个类
Script segment for UIComponent

找了好久的AS3中的反射,终于在这个 UIComponent 中找到了关键字:

反射、动态加载、getDefinitionByName、applicationDomain.getDefinition

关键点:

1. skin is Class 类可以当作变量的值传递
2. new skin() 变量可以用于new方法 用于构建变量的值的实例
3. getDefinitionByName(skin.toString()) 可以通过类名获取类声明,也就是类变量
4. loaderInfo.applicationDomain.getDefinition(skin.toString()) 应用程序域内声明的类不能通过普通的 getDefinitionByName 的方式获取,比如在swf中为miveclip声明的类


/**
* @private (protected)
*
* @langversion 3.0
* @playerversion Flash 9.0.28.0
*/
protected function getDisplayObjectInstance(
skin:Object):DisplayObject {
var classDef:Object = null;
if (skin is Class) {
return (new skin()) as DisplayObject;
} else if (skin is DisplayObject) {
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return skin as DisplayObject;
}
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = loaderInfo.applicationDomain
.getDefinition(skin.toString()) as Object;
} catch (e:Error) {
// Nothing
}
}
if (classDef == null) {
return null;
}
return (new classDef()) as DisplayObject;
}

by fallseir http://fallseir.com fallseir[at]gmail[dot]com 20080226 转载请保留

class Error_handler{
function Error_handler(){
$this->_init();
}
function _init(){
/**
* Sets error handler to be Prado::phpErrorHandler
*/
set_error_handler(array($this,’handler_error’),error_reporting());
/**
* Sets exception handler to be Prado::exceptionHandler
*/
set_exception_handler(array($this,’handler_exception’));
}
function handler_error($errno,$errstr,$errfile,$errline){
printf(”%s,%s,%s,%s\n”,$errno,$errstr,$errfile,$errline);
}
function handler_exception($exception){
print_r($exception);
}
}
$h=new Error_handler();
$a=3/0;
throw new Exception();
?>