偶闲来无事,写了一个用 php4 + mysql 来保存 session 的程序,先上传给大家共享一下,大家可以随便使用,不过有条件的最好在大负荷的情况下测试一下,有什么错误请让我知道。 要在 mysql 中创建一个名为 sessionsdb 的数据库,语句如下: CREATE DATABASE sessionsdb; GRANT select, insert, update, delete ON sessionsdb.* TO phpsession@localhost IDENTIFIED BY 'phpsession'; 然后在该数据库中创建一个名为 php_sessions 的表...
by w3g8 - php文档中心 - 2006-10-21 11:21:04 阅读(686) 回复(0)
Redhat 服务器上原有一个 mysql 3.23.58 的实例。现欲安装一个 5.0 的实例到另一个端口,配合 django 程序使用。今天配置过程中遇到了不少问题,所幸最终都解决了,记录如下。 在一个 linux 服务器上安装多个实例,需要指定第二个实例安装在不同的端口,和不同的 unix socket 文件,以及独立的数据存放路径等参数。 首先查看服务器上现有 mysql 的安装状态: mysqladmin -p --host=localhost --port=3306 variables 得到现有 m...
nginx配置文件如下:
server {
listen 80;
server_name www.qibar.com;
index index.html;
root /home/jack/qibar;
location /media {
autoindex on;
 ...
apache+python+mod_python+django 编译安装指南(2007-05-29 10:41:53) 分类: Linux 摘要 1、本文将知道你在 linux 下使用源码包安装 apache 2.2.4python 2.5.1mod_python 3.3.1django svn trunk version 但是,因为无法得知编译过程中得到的出错信息,故本文默认编译过程全部顺利通过,任何疑问请在文后讨论区中进行。 2、本文中介绍的命令前面的“#”仅代表命令提示符,请不要将其连同命令一起输入。 一、安装 apache 2.2...
1.在Python代码中使Settings 在你的django应用程序中,从对象 django.conf.settings 导入settings使用,例如: from django.conf import settings if settings.DEBUG: # Do something ADMIN_MEDIA_PREFIX 默认 : '/media/' This setting is the URL prefix for admin media: CSS, JavaScript, and images. Make sure to use a trailing slash. 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u...
一、安装mysql (1)下载mysql-5.0.83 (2)运行如下命令 shell> groupadd mysql shell> useradd -g mysql mysql shell> gunzip cd mysql-VERSION shell> ./configure --enable-thread-safe-client --prefix=/usr/local/mysql shell> make shell> make install shell> cp support-files/my-medium.cnf /etc/my.cnf shell> cd /usr/local/mysql shell> chown -R mysql . shell> chgrp -R mysql . shell> bin/mysql_install_db ...
都说lighttpd并发高,于是心里痒痒,打算配个来玩玩,结果细节问题搞的我头痛。 lighttpd的主要配置如下: server.modules = ( "mod_rewrite", "mod_alias", "mod_access", "mod_status", "mod_fastcgi", "mod_accesslog", ) $HTTP["remoteip"] == "192.168.1.41" { server.document-root = "/home/bob/...
俺用百度的空间 ,速度比较快 http://hi.baidu.com/wangyu%5Fgg/blog/item/d7d9db3522d5518fa71e127f.html 俺的本本http://hipper.oicp.net:8080/ 用的是beyking 的blog, 只有晚上俺在的时候能访问,白天我老婆要用xp ..... [ 本帖最后由 yuwang007 于 2008-3-20 20:33 编辑 ]
在http.conf中加入
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv django_SETTINGS_MODULE settings
PythonOption django.root /mysite
PythonDebug On
PythonPath "['/srv/www/htdocs/mysite'] + sys.path"
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/87830/showart_2003062.html