<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן]]></title><description><![CDATA[<p dir="rtl">יש לי סקריפט PHP שורה אחת</p>
<pre><code>&lt;?php
echo filesize("/mnt/data/bucket/welcome.wav");
</code></pre>
<p dir="rtl">בשורת פקודה מחזיר את גודל הקובץ, אבל בדפדפן מחזיר שגיאה</p>
<pre><code>Warning: filesize(): stat failed for /mnt/data/bucket//welcome.wav in /var/www/html/bt.php on line 2
</code></pre>
<p dir="rtl">יצויין שהקובץ לא קיים ממש על הכונן, אלא העלתי אותו בתיקייה עם s3fs (bucket של scaleway)<br />
ממש דחוף, אודה למי שיש לו רעיון לעזור.</p>
<p dir="rtl">תודה רבה</p>
]]></description><link>https://tchumim.com/topic/7360/דחוף-קובץ-php-שעובד-רק-בשורת-פקודה-ולא-בדפדפן</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 07:44:57 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/7360.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Dec 2019 19:33:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן on Thu, 19 Dec 2019 21:48:40 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%95%D7%90%D7%A3" aria-label="Profile: שואף">@<bdi>שואף</bdi></a><br />
תפתח על זה אשכול נפרד, אבל על הדרך תכתוב מה יצא לך אם אתה ניגש להשמעה באסטריסק עם כתובת HTTP<br />
אגב אתה יכול לעשות ללוקלהוסט עם פורט אחר מול התיקייה של הS3 ומשם להשמיע, זה לכאורה יהיה יותר מהר מאשר לצאת החוצה</p>
]]></description><link>https://tchumim.com/post/86745</link><guid isPermaLink="true">https://tchumim.com/post/86745</guid><dc:creator><![CDATA[clickone]]></dc:creator><pubDate>Thu, 19 Dec 2019 21:48:40 GMT</pubDate></item><item><title><![CDATA[Reply to דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן on Thu, 19 Dec 2019 21:03:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yossiz" aria-label="Profile: yossiz">@<bdi>yossiz</bdi></a> תודה!! אכן זו היתה הבעייה, עשיתי מה שכתוב בgithub, שבהעלאה הבקט יש להוסיף allow_other ועכשיו הPHP קורא אותו.</p>
<p dir="rtl">יש בעייה אחרת שאני לא יודע אם יש לה פיתרון. את הקבצים אני צריך בשביל השמעה במערכת טלפונית, ורציתי להפריד את הקבצי השמעה מהלוגיקה של השרת כך יהיה אפשר לעשות בלאנס לעמוד בעומס שיחות.<br />
הבעייה היא שלוקח כ12 שניות לכל קובץ להתחיל.. כנראה שהאסטריסק קורא לקובץ וטוען אותו או משהו כזה, וזה לוקח זמן.<br />
כך שהפיתרון הזה לא רלוונטי.</p>
]]></description><link>https://tchumim.com/post/86743</link><guid isPermaLink="true">https://tchumim.com/post/86743</guid><dc:creator><![CDATA[שואף]]></dc:creator><pubDate>Thu, 19 Dec 2019 21:03:25 GMT</pubDate></item><item><title><![CDATA[Reply to דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן on Thu, 19 Dec 2019 20:07:56 GMT]]></title><description><![CDATA[<ul>
<li><a href="https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-when-i-mount-a-bucket-only-the-current-user-can-see-it-other-users-cannot-how-do-i-allow-other-users-to-see-it" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-when-i-mount-a-bucket-only-the-current-user-can-see-it-other-users-cannot-how-do-i-allow-other-users-to-see-it</a></li>
<li><a href="https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-could-not-access-filesdirectories-by-permission-denied" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-could-not-access-filesdirectories-by-permission-denied</a></li>
</ul>
]]></description><link>https://tchumim.com/post/86738</link><guid isPermaLink="true">https://tchumim.com/post/86738</guid><dc:creator><![CDATA[yossiz]]></dc:creator><pubDate>Thu, 19 Dec 2019 20:07:56 GMT</pubDate></item><item><title><![CDATA[Reply to דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן on Thu, 19 Dec 2019 20:02:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yossiz" aria-label="Profile: yossiz">@<bdi>yossiz</bdi></a> אמר ב<a href="/post/86735">דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן</a>:</p>
<blockquote>
<p dir="rtl">אבל הם במערכת קבצים שונה.</p>
</blockquote>
<p dir="rtl">יותר מזה. מן הסתם s3fs לא תומך בכלל בהרשאות יוניקס רגילות. זה לא מערכת קבצים אמיתי אלא מדמה מערכת קבצים.<br />
מן הסתם יש קובץ קונפיגרציה (או פרמטר לפקודת ה-mount) להגדיר את ההרשאות של הקבצים</p>
]]></description><link>https://tchumim.com/post/86736</link><guid isPermaLink="true">https://tchumim.com/post/86736</guid><dc:creator><![CDATA[yossiz]]></dc:creator><pubDate>Thu, 19 Dec 2019 20:02:52 GMT</pubDate></item><item><title><![CDATA[Reply to דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן on Thu, 19 Dec 2019 19:58:23 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A9%D7%95%D7%90%D7%A3" aria-label="Profile: שואף">@<bdi>שואף</bdi></a> אמר ב<a href="/post/86734">דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן</a>:</p>
<blockquote>
<p dir="rtl">ולשני הקבצים יש בדיוק את אותם הרשאות, אותו יוזר, הכל.</p>
</blockquote>
<p dir="rtl">אבל הם במערכת קבצים שונה.</p>
<p dir="rtl">תריץ את הסקריפט מהטרמינל כמשתמש <code>www-data</code> או איך שקוראים למשתמש של שרת הווב</p>
<pre><code>su www-data php script.php
</code></pre>
]]></description><link>https://tchumim.com/post/86735</link><guid isPermaLink="true">https://tchumim.com/post/86735</guid><dc:creator><![CDATA[yossiz]]></dc:creator><pubDate>Thu, 19 Dec 2019 19:58:23 GMT</pubDate></item><item><title><![CDATA[Reply to דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן on Thu, 19 Dec 2019 19:44:38 GMT]]></title><description><![CDATA[<p dir="rtl">שכחתי לרשום שיש לו אותן הרשאות בדיוק כשאר הקבצים<br />
דהיינו, הקובץ הזה נמצא גם בתיקייה רגילה, ועל הקובץ הזה אני כן רואה בדפדפן את הגודל שלו<br />
ולשני הקבצים יש בדיוק את אותם הרשאות, אותו יוזר, הכל.</p>
]]></description><link>https://tchumim.com/post/86734</link><guid isPermaLink="true">https://tchumim.com/post/86734</guid><dc:creator><![CDATA[שואף]]></dc:creator><pubDate>Thu, 19 Dec 2019 19:44:38 GMT</pubDate></item><item><title><![CDATA[Reply to דחוף: קובץ PHP שעובד רק בשורת פקודה ולא בדפדפן on Thu, 19 Dec 2019 19:42:09 GMT]]></title><description><![CDATA[<p dir="rtl">זה מן הסתם בעיית הרשאות.<br />
ההבדל בין הטרמינל לאינטרנט זה המשתמש בלבד. תוכל לראות זאת ע"י הוספת השורה הזו בראש הקובץ:</p>
<pre><code>echo get_current_user();
</code></pre>
]]></description><link>https://tchumim.com/post/86733</link><guid isPermaLink="true">https://tchumim.com/post/86733</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Thu, 19 Dec 2019 19:42:09 GMT</pubDate></item></channel></rss>