Не могу запустьть скрипт
От: samara  
Дата: 15.05.05 13:22
Оценка:
Скрипт компилируется без ошибок.
Но при вызове выдает ошибку: Premature end of script headers: /cgi-bin/engine.cgi
Хотя заголовок должен отдаваться.

Посоветуйте знающие люди.



#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <stdarg.h>
#include <sys/types.h>
#include <time.h>
#include <fcntl.h>
#include <fstream.h>
#include <unistd.h>
#include <sys/stat.h>
#include <ctype.h>

#include "/usr/local/include/mysql/mysql.h"  // путь к mysql.h


char* mysqlhost = "localhost";     //Хост mysql БД
char* mysqluser = "user"; // Пользователь mysql БД
char* mysqlpassword = "password"; // Пароль mysql БД
char* mysqldatabase = "mybase"; // Имя базы mysql БД


MYSQL *mysql;
MYSQL_RES *res;

MYSQL_ROW row;

void exiterr(int errcode){

printf("Content-type: text/html\n\n");

switch(errcode)
{
case -3: printf("Unable to open file."); break;
case -1: printf("Invalid referer."); break;
case 5: printf("Account does not exist or suspended."); break;
default: printf("System error, code #%d.",errcode);
};

mysql_close(mysql);
exit(1);

};
............
.............
...........



16.05.05 15:52: Перенесено из 'C/C++'
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.