03 2010

Solve drupal open_basedir restriction realpath problem

分类目录: PHPlixiphp @ 2010-09-03 13:40:09

Hi all, I am very fortunate to slove a drupal problem for you concerning the drupal open_base restriction problem, I will speak english to tell you that three points.

Firstly, I will show you the problem on vitual host site tmp/ error.

warning: open_basedir restriction in effect.

Error with file api and open_basedir restriction

warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/home1/vhost/vh449538:/home1/vhost/vh449538/temp:/tmp/expl:/tmp/check) in /home1/vhost/vh449538/www/drupal/includes/file.inc on line 190.

Second, I have found some discussion on the drupal site. They also have this problem but I think the solution is not great.

I thiink I should not modify the drupal core, Its very complex to upgrade your drupal core and maybe others completely dont know where is the problem.

therefor, We should config our setting File system Tell Drupal where to store uploaded files and how they are accessed.

Perfectly, Administrator  Site configuration the file system

Firstly, the site will alert you the /var/tmp is unavailable and dont has the directory, then please go to the place like below:

Home » Administer » Site configuration

Temporary directory: /var/tmp

A file system path where uploaded files will be stored during previews.

change the value from the absolute path /var/temp  to relative path tmp, but you must confirm your site has the directory and its permission is writeable, chmod is 0777.

Finally, the problem is ok, This is my shared drupal issue. thank you!

标签: , , , , ,


25 2010

各类排序算法时间复杂度 空间复杂度 稳定性 对比完整表

分类目录: C/C++lixiphp @ 2010-08-25 22:39:57

数据结构与算法这一门课程中,觉得希赛这个对比表比较完善,就copy下来与大家分享。

排序算法对比表

对于内部排序算法方法的比较,在算法高手们来说是 a piece of cake,但是学会分析一种算法的效率是至关重要的,我还需要认真学习。

这是希赛网2007出的一套视频中的截屏,有需要到迅雷上去搜。

标签: , , , , , ,


07 2010

phpDesigner 7开发PHP技巧总结-持续更新

分类目录: PHPlixiphp @ 2010-08-07 18:21:20

各位PHPer好,我的PHP开发工具叫做phpDesigner 7,版本是最近目前官方最新Version7.2.1,这里我将为大家分享一些我的个人使用经验,希望与大家共同进步!

1、使用phpDesigner 7 格式化PHP代码(快捷键Shift + Ctrl + F1)

关键字:Code beautifier for PHP、Format Code、格式化PHP代码

image - Code beautifier for PHP、Format Code、格式化PHP代码

PHP > PHP Code Beautifier > File (Shift + Ctrl + F1)

视频演示:screencast-cb.swf (application/x-shockwave-flash Object)

标签: , ,


04 2010

Window7 xampp下zend framework 1.10.7 quickstart、配置与调试

分类目录: Zend Frameworklixiphp @ 2010-08-04 21:37:03

you can » Download the latest version of Zend Framework and extract the contents; make a note of where you have done so.

Create Your Project

  • zf Command Line Tool的安装

第一步:首先环境变量设置,在系统变量一栏找到Path变量,编辑,添加

D:\xampp\php;D:\xampp\htdocs\ZendFramework-1.10.7\bin

我这里安装的xampp,自己的安装目录不同,请自行更改

第二步:检测安装,开始-》运行(或者直接win+R键) –》 输入cmd -》输入一下命令

C:\Users\bruce>php -version
PHP 5.2.6 (cli) (built: May  2 2008 18:02:07)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

如果出现你的php版本,说明你的php命令环境安装成功!

C:\Users\bruce>zf ? version
Zend Framework Command Line Console Tool v1.10.7
Actions supported by provider "Version"
  Version
    zf show version mode[=mini] name-included[=1]
    Note: There are specialties, use zf show version.? to get specific help on them.

如果出现你的Zend Framework信息,说明你的Zend Framework Command Line Console Tool 环境安装成功!

  • Command 完成工程的建立

cd D:\xampp\htdocs\ZendFramework-1.10.7

进入安装project的虚拟目录,接着:

D:\xampp\htdocs\ZendFramework-1.10.7>zf create project quickstart
Creating project at D:/xampp/htdocs/ZendFramework-1.10.7/quickstart
Note: This command created a web project, for more information setting up your VHOST, please see docs/README

提示project已经建立到quickstart目录中,Command提示VHOST安装的信息,我们的xampp已经完成了。

Running this command will create your basic site structure, including your initial controllers and views. The tree looks like the following:

D:\XAMPP\HTDOCS\ZENDFRAMEWORK-1.10.7\QUICKSTART
├─application
│  ├─configs
│  ├─controllers
│  ├─models
│  └─views
│      ├─helpers
│      └─scripts
│          ├─error
│          └─index
├─docs
├─library
├─public
└─tests
    ├─application
    └─library

copying ZendFramework-1.10.7\library 到 your quickstart\library/ directory.

访问http://127.0.0.1/ZendFramework-1.10.7/quickstart/public/index.php

你会看到以下图片:

image-Welcome to the Zend Framework!

阅读更多>>

标签: , , , , , , ,


30 2010

解决xampp xdebug安装失败

分类目录: PHPlixiphp @ 2010-07-30 23:42:13

1)下载安装xampp,下载地址:http://sourceforge.net/projects/xampp/files/。下载下来,安装即可,这步很简单。

这里我要说明一下xampp版本选择的情况,并不是想象的版本越高越好,而是应该考虑到实用性。

  • xampp1.7.2 –1.7.3的php版本是PHP3.0以上,由于其向下兼容性不好,特别是很多开源程序在其上运行都极有可能出错,不过其优点在于支持Java的Tomcat。
  • xampp1.7.1版本的PHP使用的是PHP5.2.9,但是其对SSL支持性不好,我个人测试过有的需要https的程序在其上运行有问题,很容易Apache莫名死掉。
  • 我这里推荐时xampp1.6.8,其优点在于同时支持PHP4和PHP5,PHP的版本是PHP5.2.6,总所周知的Apmserv也是使用的PHP5.2.6,其稳定性很好,PHP4的版本是PHP4.4.9,两者可以任意切换,只需运行php-switch.bat就可以实现,对于测试程序支持PHP4和PHP5很方便。其次其对SSL支持很好。

2)Xdebug,下载的xampp一般都会带有Xdebug,我的xampp是装在d盘的d:\xampp,在d:\xampp\php\ext目录下包含了php_xdebug.dll。你可以在你安装xampp的这个目录下查找下,如果没有的话,就可以在网上下载一个Xdebug,下载的地是:http://xdebug.org/download.php,然后在d:\xampp\apache\bin文件夹中找到php.ini,注意是Apache中bin文件夹下的php.ini。对于php的配置是在这个初始化文件中找到如下代码:

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts=”D:\xampp\php\ext\php_xdebug.dll”
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir=”D:\xampp\tmp”

把注释去掉变成下面这样,如果没有上述代码的话就加上下面的代码,如果你的Xdebug是下载的就把其中的 zend_extension_ts=”d:\xampp\php\ext\php_xdebug.dll”改成 zend_extension_ts=”d:\xampp\php\ext\php_xdebug-2.1.0-5.2-vc6-nts.dll”:

另外由于Xdebug和zendOptimizer不能同时工作,那么还需要将下面的代码注释掉,改成下面这样:

[Zend]
;zend_extension_ts = “D:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll”
;zend_extension_manager.optimizer_ts = “D:\xampp\php\zendOptimizer\lib\Optimizer”
;zend_optimizer.enable_loader = 0
;zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
; Local Variables:
; tab-width: 4
; End:

错误操作

关于PHP的extension不要取消php_xdebug.dll的注释,因为下面已经加载了zend_extension_ts,再extension就重复操作了。

;extension=php_xdebug.dll

开始我取消了;后来我还以为是版本的问题,后来下载后还是不能解决问题,所以这里是关键,不能在配置XDebug同时开启extension=php_xdebug.dll。

验证安装

使用浏览器查看http://127.0.0.1/xampp会看到下图,就表明你的Xdebug已经开始工作了。

image - xampp xdebug安装 php_xdebug.dll

标签: , , , , , ,


28 2010

阿坝州 若尔盖-红湖 旅游

分类目录: Wo De Lifelixiphp @ 2010-07-28 21:43:07

四川阿坝州的 九寨-黄龙-若尔盖大草原 是一条值得你去旅游的地方,景色真的很漂亮!
照片1191若尔盖大草原的留影

以上是我和好朋友Gilbert的合照! 有空的IT们可以在夏天的时候去玩玩!

想去玩耍的朋友,可以在评论中提问咨询,我会为大家解答!

标签: , , ,


28 2010

我的个人PC 已经安装Windows7 英文系统

分类目录: Wo De Lifelixiphp @ 2010-07-28 21:26:23

最近在狠狠的学习英语,在朋友Gilbert的帮助下,得到一份完整的window7纯英文破解安装包。

特点:

  • 刚安装的win7没有安装最新flash plugin,网页的动画无法查看,可以通过软件管家或者知道Adobe官方网站上下载。
  • 安装时系统不会格式化C盘(可以格式化C盘的方法在下一篇博文中会谈到),安装完后clear up C盘就可以删除旧系统和一些垃圾文件。
  • 不支持中文,记事本里的中文一般为乱码。
  • 系统永久激活,安装好后直接就是激活状态且已经关闭更新。
  • 大概安装好后系统有7个多GB。

不过发现其实中文系统也可以变成英文系统,方法很简单。

Control Panel  — change display language — Install/Uninstall language — Install language — Laucgh Windows Update — Choose  English

OK, 这样你的中文win7 旗舰版也可以变为英文语言包, 支持中文软件非常好!

在Windows7 下查看隐藏文件夹的方法:

打开我的电脑 — 左上角 — Organize — Folder and search option — View 接下来的操作就和Windows XP的一样了

不过发现在纯英文系统下,某些软件也是支持不正常。

不支持纯英文Windows的软件有以下:

  • 一般国内很常用的Ghost软件
  • 下载工具迅雷、QQ旋风
  • 系统工具360安全卫士、360杀毒软件
  • 飞信开始菜单不支持(程序支持)

阅读更多>>

标签: , ,


15 2010

若尔盖-红湖三日游准备工作

分类目录: Wo De Lifelixiphp @ 2010-07-15 10:34:28

经过公司同事的投票,公司一年一度的旅游地点选择在若尔盖大草原。

我的准备工作:

1、日照充足,紫外线较强,请备好太阳镜,太阳伞、防晒霜等物品。

2、大草原为游牧部落安多藏族的天堂,太多的风俗和汉族不一样,草原上尽量听从导游安排,尽量避免和当地人发生口角,注

意尊重他们的风俗习惯。

3、有高原反应者可以自备点高原反应药:红景天、肌苷片。我买了红景天,35元一瓶的。

4、高原上温差大,请大家准一件保温的衣服,及一件外衣。

5、香皂、牙膏、牙刷、脸帕、澡巾、驱蚊水等在旅途的旅店中使用。

6、准备好相机在旅途玩耍时照相。

7、准时准点出发。

标签: , ,


13 2010

2010年四川软件设计师水平考试报名及资料下载

分类目录: Wo De Lifelixiphp @ 2010-07-13 14:40:41

全国计算机技术与软件专业技术资格(水平)考试

四川报名地址:http://www.scpta.gov.cn

报名时间
开始:2010年 07月01日
结束:2010年 08月30日

交费时间
开始:2010年 07月22日
结束:2010年 09月01日

准考证打印时间
开始:2010年 11月08日
结束:2010年 11月12日

笔试时间
开始:2010年 11月13日
结束:2010年 11月14日

迅雷下载列表:

软考资料下载

资料所含列表:

[软件设计师视频教程]数据流图设计(例题讲解)
2008下半年试题分析与解答
2009上半年试题分析与解答
软件设计师考试同步辅导上午科目
软件设计师考试同步辅导下午科目
软件设计师教程(第2版)
计算机专业英语教程

希望对你的考试有所帮助!

标签: , , ,


13 2010

SVN Could not open the requested SVN filesystem and 403 Forbidden

分类目录: Apache/nginxlixiphp @ 2010-07-13 13:53:24

本文主要记录SVN配置过程的一些重要信息,以及各种错误解决方法。

  • 解决 SVN Could not open the requested SVN filesystem
  • 解决 SVN 403 Forbidden权限错误

Subversion安装与Apache配置

For an Apache server here’s the essentials:

1. Copy bin/mod_dav_svn.so and bin/mod_authz_svn.so to the Apache modules directory.(拷贝两个文件)
2. Add the Subversion/bin directory to the SYSTEM PATH and reboot so all the Subversion
support dll’s are visible to the Apache service.(设置环境变量)
3. Edit the Apache configuration file (httpd.conf) and make the following changes:(编辑http.conf)

3a. Uncomment the following two lines:(去掉注释)

#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_module modules/mod_dav.so

3b. Add the following two lines to the end of the LoadModule section:(添加两个 LoadModule)

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

3c. Add the following to end of the file. Note: This Location directive is a
minimal example with no authentication directives. For other options,
especially authentication options, see the Subversion INSTALL file,
the Subversion Book, or the TortoiseSVN Manual.(本地目录)

<Location /svn>
DAV svn
SVNPath your/repository/path
</Location>

Apache配置详细信息

<Location /svn>
DAV svn
SVNPath F:/SvnData/4rims
AuthType Basic
AuthName “4RIMS Subversion”
AuthUserFile F:/SvnData/4rims/conf/passwd
AuthzSVNAccessFile F:/SvnData/4rims/conf/authz
Require valid-user
</Location>

密码生成指令

第一次创建passwd文件。

C:\xampp\apache\bin>htpasswd -c F:\SvnData\4rims\conf\passwd bruce

添加第二个用户,以此类推。

C:\xampp\apache\bin>htpasswd F:\SvnData\4rims\conf\passwd jack

页面错误信息是

<D:error>
<C:error/>
<m:human-readable errcode=”720002″>
Could not open the requested SVN filesystem
</m:human-readable>
</D:error>

阅读更多>>

标签: , , , ,


Page 1 of 1212345678910»...Last »