2007年01月19日 星期五 22:28
ÎÒÏë°Ñ³ýÁË http://127.0.0.1/php/ ϵÄËùÓÐĿ¼¶¼ÈÃdjangoÀ´½âÎö,ËùÒÔÎҾ͸ɴàÕâôÉèÖà ÒÔÏÂÊÇhttpd.confÉèÖÃdjangoµÄ²¿·ÖSetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE djangoapp.settings PythonDebug On ͬʱÎÒÓÖÏë¶Ô/php Õâ¸öĿ¼·Ö¿ªÉèÖà LoadModule zend_win_enabler_module "D:\php\ZendWinEnablerApache2.dll" AddHandler zend-win-enabler-script .phpSetHandler application/x-httpd-php µ«ÊÇÕâÑùÉèÖúó, django»¹ÊÇÕý³£¿ÉÒÔÔËÐÐ,µ«phpʲôЧ¹û¶¼Ã»ÓÐ. ÎÒÊÔÁ˺öàµÄ°ì·¨¶¼²»ÐÐ. ËÖªµÀÔõô×öÂð? -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070119/dc17a165/attachment.htm
2007年01月20日 星期六 07:06
On 1/19/07, Kevin anew <kevinanew在gmail.com> wrote: > 我想把除了 http://127.0.0.1/php/ 下的所有目录都让django来解析,所以我就干脆这么设置 > > 以下是httpd.conf设置django的部分 >> SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE djangoapp.settings > PythonDebug On > > > 同时我又想对/php 这个目录分开设置 > > LoadModule zend_win_enabler_module > "D:\php\ZendWinEnablerApache2.dll" > > AddHandler zend-win-enabler-script .php > > > SetHandler application/x-httpd-php > > > 但是这样设置后, django还是正常可以运行,但php什么效果都没有. 我试了好多的办法都不行. > 谁知道怎么做吗? > 这一句你好像没有。 PythonPath "['/home/www'] + sys.path"
2007年01月20日 星期六 13:31
òËƶþÕßÓгåÍ» ÎÒÊÇÖ¸mod_pythonºÍphp ÉÏ´ÎÏÈ×°ÉÏphp£¬È»ºó×°ÉÏmod_python djangoϵÄÏîÄ¿¾ÍËÀ»î³öÏÖ500 °ÑphpÒ»½ûÁ¢Âí¾ÍºÃÁË ÓÉÓÚ²»ÐèÒªPhp ,Òò´Ë¾ÍûÓÐÈ¥Ñо¿ÔÒò¼°½â¾ö 2007/1/20, Ben Luo <benluo在gmail.com>: > > On 1/19/07, Kevin anew <kevinanew在gmail.com> wrote: > > ÎÒÏë°Ñ³ýÁË http://127.0.0.1/php/ ϵÄËùÓÐĿ¼¶¼ÈÃdjangoÀ´½âÎö,ËùÒÔÎҾ͸ɴàÕâôÉèÖà > > > > ÒÔÏÂÊÇhttpd.confÉèÖÃdjangoµÄ²¿·Ö > >> > SetHandler python-program > > PythonHandler django.core.handlers.modpython > > SetEnv DJANGO_SETTINGS_MODULE djangoapp.settings > > PythonDebug On > > > > > > ͬʱÎÒÓÖÏë¶Ô/php Õâ¸öĿ¼·Ö¿ªÉèÖà > > > > LoadModule zend_win_enabler_module > > "D:\php\ZendWinEnablerApache2.dll" > > > > AddHandler zend-win-enabler-script .php > > > > > > SetHandler application/x-httpd-php > > > > > > µ«ÊÇÕâÑùÉèÖúó, django»¹ÊÇÕý³£¿ÉÒÔÔËÐÐ,µ«phpʲôЧ¹û¶¼Ã»ÓÐ. ÎÒÊÔÁ˺öàµÄ°ì·¨¶¼²»ÐÐ. > > ËÖªµÀÔõô×öÂð? > > > > ÕâÒ»¾äÄãºÃÏñûÓС£ > PythonPath "['/home/www'] + sys.path" > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070120/8e48fe10/attachment.html
2007年01月20日 星期六 22:46
ÎÒÓкܶàphpµÄ³ÌÐò²»ÏëÓÃdjangoÔÙÖØдһ±é£¬ËùÒÔ¾ÍÏñ×öÒ»¸ö»ìºÏµÄ»·¾³£¬ÎҸоõ»¹ÊÇÒ»¸öºÜ³£ÓõÄÉèÖð¡ ´ó¼Ò¶¼²»½øÐлìºÏ±à³ÌÂ𣿠ÔÚ07-1-20£¬·çÏò±ê <vaneoooo在gmail.com> дµÀ£º > > òËƶþÕßÓгåÍ» > ÎÒÊÇÖ¸mod_pythonºÍphp > > ÉÏ´ÎÏÈ×°ÉÏphp£¬È»ºó×°ÉÏmod_python > djangoϵÄÏîÄ¿¾ÍËÀ»î³öÏÖ500 > °ÑphpÒ»½ûÁ¢Âí¾ÍºÃÁË > ÓÉÓÚ²»ÐèÒªPhp ,Òò´Ë¾ÍûÓÐÈ¥Ñо¿ÔÒò¼°½â¾ö > > > 2007/1/20, Ben Luo <benluo在gmail.com>: > > > > On 1/19/07, Kevin anew <kevinanew在gmail.com> wrote: > > > ÎÒÏë°Ñ³ýÁË http://127.0.0.1/php/ ϵÄËùÓÐĿ¼¶¼ÈÃdjangoÀ´½âÎö,ËùÒÔÎҾ͸ɴàÕâôÉèÖà > > > > > > ÒÔÏÂÊÇhttpd.confÉèÖÃdjangoµÄ²¿·Ö > > >> > > SetHandler python-program > > > PythonHandler django.core.handlers.modpython > > > SetEnv DJANGO_SETTINGS_MODULE djangoapp.settings > > > PythonDebug On > > > > > > > > > ͬʱÎÒÓÖÏë¶Ô/php Õâ¸öĿ¼·Ö¿ªÉèÖà > > > > > > LoadModule zend_win_enabler_module > > > "D:\php\ZendWinEnablerApache2.dll" > > > > > > AddHandler zend-win-enabler-script .php > > > > > > > > > SetHandler application/x-httpd-php > > > > > > > > > µ«ÊÇÕâÑùÉèÖúó, django»¹ÊÇÕý³£¿ÉÒÔÔËÐÐ,µ«phpʲôЧ¹û¶¼Ã»ÓÐ. ÎÒÊÔÁ˺öàµÄ°ì·¨¶¼²»ÐÐ. > > > ËÖªµÀÔõô×öÂð? > > > > > > > ÕâÒ»¾äÄãºÃÏñûÓС£ > > PythonPath "['/home/www'] + sys.path" > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070120/00fde994/attachment.html
2007年01月21日 星期日 00:50
你要设置SetHandler None, 让apache来处理php文件。 例如: LoadModule php4_module "C:/PHP/sapi/php4apache2.dll" AddType application/x-httpd-php .php4 AddType application/x-httpd-php .phpSetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE djangoapp.settings PythonDebug On Alias /php "C:/...." SetHandler None 或者SetHandler None 也是可以工作的。 你可能对apache的sehandler有点误解,只能用sehandler none来改变原来的设置,让apache重新来决定使用那个handler处理。 ----- Original Message ----- From: Kevin anew To: python-chinese at lists.python.cn Sent: Friday, January 19, 2007 10:28 PM Subject: [python-chinese] 怎么让django和PHP同时运行在apache下 我想把除了 http://127.0.0.1/php/ 下的所有目录都让django来解析,所以我就干脆这么设置 以下是httpd.conf设置django的部分SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE djangoapp.settings PythonDebug On 同时我又想对/php 这个目录分开设置 LoadModule zend_win_enabler_module "D:\php\ZendWinEnablerApache2.dll" AddHandler zend-win-enabler-script .phpSetHandler application/x-httpd-php 但是这样设置后, django还是正常可以运行,但php什么效果都没有. 我试了好多的办法都不行. 谁知道怎么做吗? ------------------------------------------------------------------------------ _______________________________________________ python-chinese Post: send python-chinese at lists.python.cn Subscribe: send subscribe to python-chinese-request at lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070121/252cd73d/attachment.html
Zeuux © 2025
京ICP备05028076号