Courier Mail Server Forum Index Courier Mail Server
www.courierms.ru
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Запуск CGI приложений, возможно ли это? Инструкция...

 
Post new topic   Reply to topic    Courier Mail Server Forum Index -> Courier Mail Server 3.xx
View previous topic :: View next topic  
Author Message
InFreeBSD
Subscriber
Subscriber


Joined: 11 May 2012
Posts: 17
Location: Украина

PostPosted: 08 Oct 2013 14:18 (Tue)    Post subject: Запуск CGI приложений, возможно ли это? Инструкция... Reply with quote

Для запуска CGI-приложений:
1. В конфигурации HTTP-сервиса на вкладке "дополнительно" добавляем к имеющимся расширение .bat, например: .bat;.php;.phtml

2. Указываем путь к исполняемому файлу PHP:
F:\CourierMS\php-cgi.bat

3. Создаем файл "php-cgi.bat" такого содержания:
Code:
@echo off
set filename=%1
set ext=%~x1
if not "%filename%" == "%filename:\cgi-bin\=%" goto cgi
if not "%ext%" == ".bat" goto php
echo Status: 200 OK
echo Content-Type: application/octet-stream
echo Last-Modified: %~t1
echo Content-Length: %~z1
echo Content-Disposition: attachment; filename=%~nx1
echo.
type %1
goto end

:php
F:\CourierMS\php\php-cgi.exe %1
goto end

:cgi
if not "%ext%" == ".bat" goto php
%1

:end


4. Запуск необходимых нам .exe с параметрами коммандной строки конфигурировать и привязывать к Web-интерфейсу через создаваемые нами .bat-файлами в каталоге "\cgi-bin\".
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Courier Mail Server Forum Index -> Courier Mail Server 3.xx All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group