2 декабря 2009 в 23:47
Установил друпал 6.14. После чего, при переходе на гл. страницу сайта, выдает ошибку:
«warning: fopen() [function.fopen]: open_basedir restriction in effect. File(/var/tmp/fileyoTXtL) is not within the allowed path(s): (/home/u170033/) in /home/u170033/kpd-inform.ru/www/includes/file.inc on line 764.
warning: fopen(/var/tmp/fileyoTXtL) [function.fopen]: failed to open stream: Operation not permitted in /home/u170033/kpd-inform.ru/www/includes/file.inc on line 764.
Невозможно создать файл.»
Причем, после какого-то времени, появилась вторая ошибка, такого же рода, и теперь их две:
«warning: fopen() [function.fopen]: open_basedir restriction in effect. File(/var/tmp/fileyoTXtL) is not within the allowed path(s): (/home/u170033/) in /home/u170033/kpd-inform.ru/www/includes/file.inc on line 764.
warning: fopen(/var/tmp/fileyoTXtL) [function.fopen]: failed to open stream: Operation not permitted in /home/u170033/kpd-inform.ru/www/includes/file.inc on line 764.
Невозможно создать файл.
warning: fopen() [function.fopen]: open_basedir restriction in effect. File(/var/tmp/fileSTItwV) is not within the allowed path(s): (/home/u170033/) in /home/u170033/kpd-inform.ru/www/includes/file.inc on line 764.
warning: fopen(/var/tmp/fileSTItwV) [function.fopen]: failed to open stream: Operation not permitted in /home/u170033/kpd-inform.ru/www/includes/file.inc on line 764.
Невозможно создать файл.»
P.s. При установке прошло все успешно, никаких проблем небыло замечено.
P.s.s. Сам друпал работает нормально, но эти сообщения об ошибках на каждой странице. Помогите найти ответ на это
- Drupal6
This describes an error which may occur with Drupal 4.5.2. The details for other versions may differ.
http://www.example.com/?q=admin/settings might yield error messages like this:
warning: mkdir(files): Permission denied in /data/www/public/includes/file.inc on line 77.
warning: mkdir(files/tmp): No such file or directory in /usr/data/www/public/includes/file.inc on line 77.
This means that Drupal needs write access to create (and later access) the files and files/tmp directories. One way to solve this is to give the webserver write access in the directory. Another common solution seems to be granting everybody write access to the «files» directory. Both solutions have the drawback that somebody else is able to write files into that directory. [if you know a better solution, please mention it here]
- Solution 1 (recommended)
-
In the drupal root directory:
mkdir -p files/tmp chown -R www files
Note: you may need to substitute www with the user id of your webserver process.
- Solution 2
-
In the drupal root directory:
mkdir -p files/tmp chmod -R 777 files
Oh my! I’m not sure yet, but I think you may have discovered a «limitation» in Nasm. Perhaps a «bug». I don’t quite see why Nasm thinks this is a «macro» in the first place!
Can you tell me how you created this table
? I ASSume you didn’t type all those numbers in by hand — certainly(?) not all on one line, as shown(?). I’ve tried to create such a table using Nasm’s %rep
facility, but Nasm is yelling at me. I’m not a sophisticated macro user, and need to refresh my memory on how to do that (not your problem, I’ll figure it out — more coffee!). Failing that, I think I can write a small «utility» to spit out such a table. Help me out with exactly what I’m shooting for, if you would…
On or about line 334 in preproc.c, you’ll see:
#define DEADMAN_LIMIT (1 << 20)
If you’re feeling adventurous, you could try increasing that value, and rebuilding Nasm (make install
or I like make install_everything
— do .configure
first, if you haven’t). You shouldn’t need to do this! We’ll straighten it out, if that’s the problem, and if it is judged to be a «bug», but it may take a while…
This may require more discussion than is appropriate here. Try the Nasm Forum at http://www.nasm.us or you can reach me at fbkotler(pig’s tail)myfairpoint(decimal point)net (I don’t know why I bother — spammers have found me anyway).
Sorry you’re having a problem with this. Thanks for the feedback!
Edit: Update: Well, I managed to create a table. Took a really long time!!! But I did not encounter this error. Can you provide more information about exactly what you did to get this error? (here, or on the Nasm Forum, or by private mail…)
Переношу старый проект. В нем используется SSI
Везде файлы подключаются так
<!--# include file="/includes/ukr/inc_block_tag_manager.html" -->
Но такая строка вызывает ошибку [an error occurred while processing this directive]
Немного погуглил, и всем людям, которые столкнулись с это проблемой предлагают конструкцию выше заменить на
<!--# include virtual="/includes/rus/inc_block_tag_manager.html" -->
Так действительно работает. Поменять это во всем проекте — нереально, так как это конструкция встречается в 300 000 файлах, ну и ко всему этому, такая конструкция работала на старом сервере еще полгода назад.
Подскажите, как сделать возможным использование
<!--# include file="/includes/ukr/inc_block_tag_manager.html" -->
error_log
[Thu May 26 09:19:15.106863 2016] [include:error] [pid 31821] [client 127.0.0.1:54297] AH01368: missing directive name in parsed document /var/www/theinsider/sites/example.com/insider/static/index.html
Модератор: Модераторы
Fatal: Can’t open include file «fileutil.inc
Всем привет!
Пишу консольную прогу в lazarus’е. При попытке компиляции появляется ошибка `Fatal: Can’t open include file «fileutil.inc»`.
Версия lazarus: 0.9.28.2 beta. ОС Windows7 32bit
Вот мой исходник:
- Код: Выделить всё
program console0;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils, CustApp,
FileUtil
{ you can add units after this };type
{ TMyApplication }
TMyApplication = class(TCustomApplication)
private
InputFileName : string;
OutputFileName: string;
LogFileName : string;
InputFile : TFileStream;
OutputFile : TFileStream;
LogFile : TStringList;
protected
procedure DoRun; override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure WriteHelp; virtual;
procedure WriteMessage(str :string);
end;{ TMyApplication }
procedure TMyApplication.DoRun;
var
ErrorMsg: String;
begin
// quick check parameters
ErrorMsg:=CheckOptions('h','help');
if ErrorMsg<>'' then begin
ShowException(Exception.Create(ErrorMsg));
Terminate;
Exit;
end;// parse parameters
if HasOption('h','help') then begin
WriteHelp;
Terminate;
Exit;
end;
if HasOption('i','input') then InputFileName :=GetOptionValue('i','input')
else InputFileName :=ExeName;
if HasOption('o','output')then OutputFileName:=GetOptionValue('o', 'output')
else OutputFileName:=InputFileName+'.ksa';
if HasOption('l','log') then LogFileName :=GetOptionValue('l','log')
else LogFileName :='log.txt';
{ add your program here }
try
LogFile:=TStringList.Create;
except
WriteMessage('Ошибка создания объекта "LogFile:=TStringList.Create;"' +
'в "procedure TMyApplication.DoRun"');
end;
try
InputFile:=TFileStream.Create(InputFileName, fmCreate, fmShareExclusive);
except
WriteMessage('Ошибка создания объекта ' +
'"InputFile:=TFileStream.Create(InputFileName, fmCreate, ' +
'fmShareExclusive);" в "procedure TMyApplication.DoRun"');
end;
// stop program loop
Terminate;
end;constructor TMyApplication.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
StopOnException:=True;
end;destructor TMyApplication.Destroy;
begin
inherited Destroy;
end;procedure TMyApplication.WriteHelp;
begin
{ add your help code here }
WriteMessage('Для справки введите:'+ExeName+' -h');
WriteMessage('или введите:'+ExeName+' -help');
end;procedure TMyApplication.WriteMessage(str :string);
var
buffer : string;
SystemTime: TSystemTime;
begin
GetLocalTime(SystemTime);
buffer:='[' + FormatDateTime('dddd-dd/mm/yyyy-hh:nn:ss:zz',
SystemTimeToDateTime(SystemTime)) + ']: ' + str;
try
LogFile.Add(buffer);
LogFile.SaveToFile(LogFileName);
finally
WriteLn(UTF8ToConsole(buffer));
end;
end;var
Application: TMyApplication;{$IFDEF WINDOWS}{$R console0.rc}{$ENDIF}
begin
Application:=TMyApplication.Create(nil);
Application.Title:='My Application';
Application.Run;
Application.Free;
end.
Выделяет 237-ю строку: `{$I fileutil.inc}` в модуле FileUtil.
Файл fileutil.inc есть в наличии и прекрасно открывается редактором кода. И ещё один момент: При нажатии Ctrl в модуле FileUtil подсвечиваются как ссылки все функции и методы кроме тех, что реализованы в ileutil.inc.
Пожалуйста, подскажите как исправить, чтобы код остался кроссплатформенным и не зависимым от текущей кодировки консоли.
Заранее спасибо!
- R1DDLE
- новенький
- Сообщения: 26
- Зарегистрирован: 08.12.2009 19:00:24
Re: Fatal: Can’t open include file «fileutil.inc
Mr.Smart » 16.02.2010 17:24:02
подключите пакет LCL.
- Mr.Smart
- долгожитель
- Сообщения: 1796
- Зарегистрирован: 29.03.2008 01:01:11
- Откуда: из леса!
Re: Fatal: Can’t open include file «fileutil.inc
R1DDLE » 16.02.2010 21:00:53
Каким образом?
После добавления в uses LCL ничего не изменилось. Стопорится на той же строке, типа не может открыть файл fileutil.inc.
- R1DDLE
- новенький
- Сообщения: 26
- Зарегистрирован: 08.12.2009 19:00:24
Re: Fatal: Can’t open include file «fileutil.inc
Mr.Smart » 16.02.2010 21:07:46
Нет Лазаруса под рукой. В зависимостях проекта добавить пакет LCL. Посмотри в меню Проект, кажется там такое было.
- Mr.Smart
- долгожитель
- Сообщения: 1796
- Зарегистрирован: 29.03.2008 01:01:11
- Откуда: из леса!
Re: Fatal: Can’t open include file «fileutil.inc
Padre_Mortius » 16.02.2010 21:21:04
В меню «Проект» выбрать пункт «Инспектор проекта». И там уже добавить пакет LCL
- Padre_Mortius
- энтузиаст
- Сообщения: 1265
- Зарегистрирован: 29.05.2007 17:38:07
- Откуда: Спб
Re: Fatal: Can’t open include file «fileutil.inc
R1DDLE » 16.02.2010 21:33:13
Padre_Mortius писал(а):В меню «Проект» выбрать пункт «Инспектор проекта». И там уже добавить пакет LCL
Сделал. Та же ошибка в той же строке.
- R1DDLE
- новенький
- Сообщения: 26
- Зарегистрирован: 08.12.2009 19:00:24
Re: Fatal: Can’t open include file «fileutil.inc
Padre_Mortius » 16.02.2010 22:00:53
fpc 2.4.0 + lazarus svn + ваш пример. Все компилируется
У вас нет необходимых прав для просмотра вложений в этом сообщении.
- Padre_Mortius
- энтузиаст
- Сообщения: 1265
- Зарегистрирован: 29.05.2007 17:38:07
- Откуда: Спб
Re: Fatal: Can’t open include file «fileutil.inc
R1DDLE » 17.02.2010 00:03:50
Версия lazarus:0.9.28.3 бета
Версия fpc: 2.4.0
Результат тот же.
- R1DDLE
- новенький
- Сообщения: 26
- Зарегистрирован: 08.12.2009 19:00:24
Re: Fatal: Can’t open include file «fileutil.inc
Padre_Mortius » 17.02.2010 00:27:05
В инспекторе проектов у вас также как и на скриншоте?
- Padre_Mortius
- энтузиаст
- Сообщения: 1265
- Зарегистрирован: 29.05.2007 17:38:07
- Откуда: Спб
Re: Fatal: Can’t open include file «fileutil.inc
R1DDLE » 17.02.2010 00:48:08
Да, только у проекта имя другое.
- R1DDLE
- новенький
- Сообщения: 26
- Зарегистрирован: 08.12.2009 19:00:24
Re: Fatal: Can’t open include file «fileutil.inc
Padre_Mortius » 17.02.2010 01:16:07
попробуйте скомпилить проект из вложения
Добавлено спустя 6 минут 40 секунд:
кстати, а файл fileutil.inc у вас есть в папке lazaruslclinclude
У вас нет необходимых прав для просмотра вложений в этом сообщении.
- Padre_Mortius
- энтузиаст
- Сообщения: 1265
- Зарегистрирован: 29.05.2007 17:38:07
- Откуда: Спб
Re: Fatal: Can’t open include file «fileutil.inc
R1DDLE » 17.02.2010 15:10:25
Попробовал: console0.lpr(8,13) Fatal: Can’t find unit FileUtil used by console0. выделяет строку №8 исходника: `{$ENDIF}{$ENDIF} `. Не видит FileUtil.
Позже добавил через инспектор проекта FileUtil в проект. Вернулась старая ошибка.
Ещё позже добавил fileutil.inc в проект тем же способом. Никаких изменений. Хотя fileutil.inc в редакторе открывается без проблем.
P.S. Неужели это всё из-за ОСи
- R1DDLE
- новенький
- Сообщения: 26
- Зарегистрирован: 08.12.2009 19:00:24
Re: Fatal: Can’t open include file «fileutil.inc
Padre_Mortius » 18.02.2010 01:17:18
Это полностью ваш проект только исправленный. Он нормально компилится и под Linux и под Windows XP, но не работает.
попробуйте пересобрать Лазарус. На форуме вроде как есть (были) люди, кто использует Windows 7. Так что не факт, что дело в системе
- Padre_Mortius
- энтузиаст
- Сообщения: 1265
- Зарегистрирован: 29.05.2007 17:38:07
- Откуда: Спб
Re: Fatal: Can’t open include file «fileutil.inc
R1DDLE » 24.02.2010 01:06:19
Проблему решил. Нужно было прописать пути ко всем инклудам в проекте.
- R1DDLE
- новенький
- Сообщения: 26
- Зарегистрирован: 08.12.2009 19:00:24
Re: Fatal: Can’t open include file «fileutil.inc
Padre_Mortius » 24.02.2010 01:12:21
Бред какой-то. Можно посмотреть на ваш fpc.cfg?
- Padre_Mortius
- энтузиаст
- Сообщения: 1265
- Зарегистрирован: 29.05.2007 17:38:07
- Откуда: Спб
Вернуться в Lazarus
Кто сейчас на конференции
Сейчас этот форум просматривают: Google Adsense [Bot] и гости: 25