studio

site development

Welcome, Guest
Please Login or Register.    Lost Password?

Warning: filectime() [function.filectime]: stat failed for ...
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Warning: filectime() [function.filectime]: stat failed for ...
#475
Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 0
plugins/content/smartresizer.php on line 235

Code:

Warning: filectime() [function.filectime]: stat failed for /var/home/softservic7027/data/www/softservice.com.ua/!heart//!heart/components/com_virtuemart/themes/heart/images/noimage_big.jpg in /var/home/softservic7027/data/www/softservice.com.ua/! heart/plugins/content/smartresizer.php on line 235


softservice.com.ua/!heart/traditional.html
Вот, собственно говоря, не рабочий линк. Почему-то в пути даёт два слеша.
Что може быть?

На локальной машине всё отлично.
gruz
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#476
Re: Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 6
Что в редакторе в пути до картинки? Уберите первый слэш
Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#477
Re:Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 0
Там не редактор. Там скрипт прописывает.

Проблема в тому, что у некоторых изображений путь абсолютный, воно оно и не срабатывает. ТОЛЬКО ЕСЛИ САЙТ НЕ В КОРНЕ. Если в корне - то срабатывает с абсолютным. Вот результаты моего дебага.

Работаю на локальной машине.

Передаю в плагин:

Code:

<img class="smartresizeindividual" src="http://hearthandhomefireplace.cos/heart/components/com_virtuemart/themes/heart/images/noimage_small.jpg" width="140" height="100">


Вот значение в плагине в это время:

JPATH_ROOT = /mnt/work/www/hearthandhomefireplace.cos/www/heart
$relpath = /heart/components/com_virtuemart/themes/heart/images/noimage_small.jpg
$full_path = /mnt/work/www/hearthandhomefireplace.cos/www/heart//heart/components/com_virtuemart/themes/heart/images/noimage_small.jpg


А если передаю:
<img class="smartresizeindividual" src="components/com_virtuemart/shop_image/product/Liberty_L900_4b9141ef65f6d.jpg" width="140" height="100">


То всё ок:
JPATH_ROOT = /mnt/work/www/hearthandhomefireplace.cos/www/heart

$relpath = components/com_virtuemart/shop_image/product/Liberty_L900_4b9141ef65f6d.jpg

$full_path =
/mnt/work/www/hearthandhomefireplace.cos/www/heart/components/com_virtuemart/shop_image/product/Liberty_L900_4b9141ef65f6d.jpg



Может оперативно подскажете, где исправить?


ПРИМЕЧАНИЕ: Сайт лежит в таком URL'е, то есть не в корне!!: hearthandhomefireplace.cos/heart/
gruz
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/03/07 14:37 By gruz.
The administrator has disabled public write access.
 
#478
Re:Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 6
Хм, не знаю даже где исправить. Исправить там где прописывается маршрут картинки. Зачем там у картинки впереди /heart/ ???
Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#479
Re:Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 0
Ибо сайт лежть не в / - не в корне.

Сайт лежит в подпапке /heart. Все конфики и .htaccess настроены правильно. Только плагин об это обламывается.
gruz
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#480
Re:Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 6
Строка 224 $relpath = $uri->toString(array('path'));
Может что-нить придумаете, я вот универсальное решение не соображу даже как.
Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#481
Re:Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 0
Решил.

В /plugins/content/smartresizer.php

строку 166

Code:

 $link = $src;


меняю на

Code:


$juribase = str_replace ("www.","", JURI::base());

$link = str_replace ($juribase,"", $src);

$link = str_replace (JURI::base(),"", $link);

gruz
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/04/14 20:06 By gruz.Reason: Работа над ошибками
The administrator has disabled public write access.
 
#482
Re:Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 6
попробуйте вставить вот этот код перед строкой 224:
if (strpos( $link, JURI::base() !== false )
$link = substr($link,strpos( $link, JURI::base()),strlen($link));
Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#483
Re:Warning: filectime() [function.filectime]: stat failed for ... 4 Months, 3 Weeks ago Karma: 6
Да, или так как у вас
Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#637
Re:Warning: filectime() [function.filectime]: stat failed for ... 3 Months, 2 Weeks ago Karma: 0
Ещё одну правку внёс, ибо при доступе с www. в имени домена не срабатывало.

Исправил выше в своём посте.
gruz
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#638
Re:Warning: filectime() [function.filectime]: stat failed for ... 3 Months, 2 Weeks ago Karma: 6
Спасибо! Внесу в код
Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#639
Re:Warning: filectime() [function.filectime]: stat failed for ... 3 Months, 2 Weeks ago Karma: 6
Небольшая поправка! Тогда нужно проверить на оба вхождения, с www. и без www., причем как в JURI::base() так и в $src, так как в $src тоже может быть полный маршрут до картинки как с www. так и без него:
Code:

$juribase = str_replace ("www.","", JURI::base());
$juribasewww = JURI::base();
if (strlen($juribase)>strlen($juribasewww)) {
    $link = str_replace ($juribase,"", $src);
    $link = str_replace ($juribasewww,"", $src);
} else {
    $link = str_replace ($juribasewww,"", $src);
    $link = str_replace ($juribase,"", $src);
}

Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/04/14 19:59 By Igort.
The administrator has disabled public write access.
 
#640
Re:Warning: filectime() [function.filectime]: stat failed for ... 3 Months, 2 Weeks ago Karma: 0
Code:

    $link = str_replace ($juribase,"", $src);
    $link = str_replace ($juribasewww,"", $src);



Ты $link переопределяешь второй строчкой.

Надо:
Code:

    $link = str_replace ($juribase,"", $src);
    $link = str_replace ($juribasewww,"", $link);




По-моему, так проще оба варианта обработает:

Code:

$juribase = str_replace ("www.","", JURI::base());
$link = str_replace ($juribase,"", $src);
$link = str_replace (JURI::base(),"", $link);

gruz
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/04/14 20:12 By gruz.
The administrator has disabled public write access.
 
#641
Re:Warning: filectime() [function.filectime]: stat failed for ... 3 Months, 2 Weeks ago Karma: 6
Согласен.
Igort
Administrator
Posts: 375
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: Igort
get the latest posts directly to your desktop

Announcements

Специальное предложение!
Сайт-визитка "под ключ" за 3 дня. Система управления сайтом. Поиск. Новости. Вопрос-ответ. Большой выбор шаблонов оформления. До 10 страниц первичного наполнения. Обучение добавлению материалов.
Подробности...