<?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[Need help on probably something very easy (Apache Setup)]]></title><description><![CDATA[<p dir="auto">Installing an Apache instance and I can't get PHP sessions to save (folder doesn't exist error) <strong>anywhere</strong> except <code>app/data</code>.</p>
<p dir="auto"><code>RUN mkdir -p /app/run/sessions</code><br />
<code>RUN crudini --set /etc/php/7.3/apache2/php.ini Session session.save_path /app/run/sessions &amp;&amp; \</code><br />
<code>RUN chown -R www-data.www-data /app/code /app/data /tmp</code></p>
<p dir="auto">I've tried <code>/app/code/sessions</code> and <code>/app/data/sessions</code> - I guess I could just use PHP to create the <code>app/data/sessions</code> but I still don't know why the DOCKERFILE isn't creating the folder on the only user write allowed files.</p>
<p dir="auto">This is something simple right? What am I missing here? I mean sessions work if I tell php.ini to write them to <code>/app/data</code> but that's just messy.</p>
<p dir="auto">I based the above code on the tutorial-php app in the Cloudron Git so I'm surprised sessions don't work: <a href="https://git.cloudron.io/cloudron/tutorial-php-app/-/blob/master/Dockerfile" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/tutorial-php-app/-/blob/master/Dockerfile</a></p>
]]></description><link>https://forum.cloudron.io/topic/3478/need-help-on-probably-something-very-easy-apache-setup</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Jul 2026 00:51:30 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/3478.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Oct 2020 16:40:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Need help on probably something very easy (Apache Setup) on Tue, 20 Oct 2020 19:31:31 GMT]]></title><description><![CDATA[<p dir="auto">@Lonk said in <a href="/post/16521">Need help on probably something very easy (Apache Setup)</a>:</p>
<blockquote>
<p dir="auto">Sometimes I ask too complex ones, sometimes too simple ones. But the way you explained everything was perfect and I got it working! <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/263a.png?v=af5271e93de" class="not-responsive emoji emoji-android emoji--relaxed" style="height:23px;width:auto;vertical-align:middle" title="☺" alt="☺" />️</p>
</blockquote>
<p dir="auto">I feel that's usually the process of learning something new. Glad to be of help. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=af5271e93de" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.cloudron.io/post/16526</link><guid isPermaLink="true">https://forum.cloudron.io/post/16526</guid><dc:creator><![CDATA[malvim]]></dc:creator><pubDate>Tue, 20 Oct 2020 19:31:31 GMT</pubDate></item><item><title><![CDATA[Reply to Need help on probably something very easy (Apache Setup) on Tue, 20 Oct 2020 18:25:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/malvim" aria-label="Profile: malvim">@<bdi>malvim</bdi></a> But also thanks for being so kind about my simplistic question. Sometimes I ask too complex ones, sometimes too simple ones. But the way you explained everything was perfect and I got it working! <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/263a.png?v=af5271e93de" class="not-responsive emoji emoji-android emoji--relaxed" style="height:23px;width:auto;vertical-align:middle" title="☺" alt="☺" />️</p>
]]></description><link>https://forum.cloudron.io/post/16521</link><guid isPermaLink="true">https://forum.cloudron.io/post/16521</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Tue, 20 Oct 2020 18:25:17 GMT</pubDate></item><item><title><![CDATA[Reply to Need help on probably something very easy (Apache Setup) on Tue, 20 Oct 2020 18:23:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/malvim" aria-label="Profile: malvim">@<bdi>malvim</bdi></a> said in <a href="/post/16518">Need help on probably something very easy (Apache Setup)</a>:</p>
<blockquote>
<p dir="auto">Hahaha no worries, I've been using cloudron for quite a while now and STILL have some very basic questions, you're doing great.</p>
<p dir="auto">Yeah, <code>start.sh</code> is the place to create this kind of thing, and then it will work across restarts, reinstalls, backups, etc.</p>
</blockquote>
<p dir="auto">You know the funniest thing about that, the tutorial-php-app doesn't chown the folder it creates for sessions like you mentioned I should do (and when I didn't, it didn't work cause I forgot at first). So, I think the tutorial app may need to add that or somehow I missed it?</p>
]]></description><link>https://forum.cloudron.io/post/16520</link><guid isPermaLink="true">https://forum.cloudron.io/post/16520</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Tue, 20 Oct 2020 18:23:02 GMT</pubDate></item><item><title><![CDATA[Reply to Need help on probably something very easy (Apache Setup) on Tue, 20 Oct 2020 18:11:56 GMT]]></title><description><![CDATA[<p dir="auto">Hahaha no worries, I've been using cloudron for quite a while now and STILL have some very basic questions, you're doing great.</p>
<p dir="auto">Yeah, <code>start.sh</code> is the place to create this kind of thing, and then it will work across restarts, reinstalls, backups, etc.</p>
]]></description><link>https://forum.cloudron.io/post/16518</link><guid isPermaLink="true">https://forum.cloudron.io/post/16518</guid><dc:creator><![CDATA[malvim]]></dc:creator><pubDate>Tue, 20 Oct 2020 18:11:56 GMT</pubDate></item><item><title><![CDATA[Reply to Need help on probably something very easy (Apache Setup) on Tue, 20 Oct 2020 18:08:57 GMT]]></title><description><![CDATA[<p dir="auto">It was almost on the <strong>first</strong> line of the tutorial app's <a href="http://start.sh" target="_blank" rel="noopener noreferrer nofollow ugc">start.sh</a>. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f602.png?v=af5271e93de" class="not-responsive emoji emoji-android emoji--joy" style="height:23px;width:auto;vertical-align:middle" title="😂" alt="😂" /></p>
<p dir="auto"><code>mkdir -p /run/app/sessions</code> - <a href="https://git.cloudron.io/cloudron/tutorial-php-app/-/blob/master/start.sh" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/tutorial-php-app/-/blob/master/start.sh</a></p>
<p dir="auto">Thanks for getting me to understand <strong>why</strong> that works. I'm glad I know what user <a href="http://start.sh" target="_blank" rel="noopener noreferrer nofollow ugc">start.sh</a> runs in (well, <code>root</code> to it's individual container anyway). <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/263a.png?v=af5271e93de" class="not-responsive emoji emoji-android emoji--relaxed" style="height:23px;width:auto;vertical-align:middle" title="☺" alt="☺" />️</p>
]]></description><link>https://forum.cloudron.io/post/16517</link><guid isPermaLink="true">https://forum.cloudron.io/post/16517</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Tue, 20 Oct 2020 18:08:57 GMT</pubDate></item><item><title><![CDATA[Reply to Need help on probably something very easy (Apache Setup) on Tue, 20 Oct 2020 18:06:33 GMT]]></title><description><![CDATA[<p dir="auto">Thank you so much for all of that insight! I'm very very new to this!</p>
<p dir="auto">I actually added <code>/sessions</code> via the File Manager just to get it to work. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f602.png?v=af5271e93de" class="not-responsive emoji emoji-android emoji--joy" style="height:23px;width:auto;vertical-align:middle" title="😂" alt="😂" /> Even though I knew that wouldn't work for an <code>install</code> and thanks to your input, I have what will make that work.</p>
<p dir="auto">My main question is here then:</p>
<p dir="auto">How does the literal "Cloudron PHP Tutorial" have it wrong? Maybe I'm the first person to use it to develop a new app with PHP sessions. But by default it does set a specific place for "sessions" it just doesn't exist, <code>app/run/sessions</code> <strong>but</strong> maybe since you just taught me the default <code>start.sh</code>script has root priveleges, it writes it there. I can copy that mentality if that's how the Cloudron developer's tackled it. Just gotta check their <code>start.sh</code> script. Thanks so much for how thorough your explanation was!</p>
]]></description><link>https://forum.cloudron.io/post/16516</link><guid isPermaLink="true">https://forum.cloudron.io/post/16516</guid><dc:creator><![CDATA[Lonkle]]></dc:creator><pubDate>Tue, 20 Oct 2020 18:06:33 GMT</pubDate></item><item><title><![CDATA[Reply to Need help on probably something very easy (Apache Setup) on Tue, 20 Oct 2020 16:51:19 GMT]]></title><description><![CDATA[<p dir="auto">They won't work on <code>/app/code</code>, as it is mounted as readonly inside the docker container. A subdirectory of <code>/app/data</code> would work (though <code>/app/data</code> goes to you backups, not sure if sessions are something you want to backup, but that's not your point).</p>
<p dir="auto">I've been through trying to create <code>/app/data</code> subdirectories on the Dockerfile, but this doesn't work because <code>/app/data</code> is mounted when Cloudron brings the container up. So <code>/app/data</code> when your app is running points to another filesystem (namely, it mounts a directorie that lives inside <code>home/yellowtent/appsdata/&lt;app-id&gt;</code> on your server). It's a runtime vs "compile time" thing (in this case, runtime vs image build time).</p>
<p dir="auto">So your best bet is to ensure this directory is created on your <code>start.sh</code> script. Run something like <code>mkdir -p /app/data/sessions</code> (and also <code>chown</code> it to the correct user since <code>start.sh</code> runs as root), and it should work.</p>
]]></description><link>https://forum.cloudron.io/post/16497</link><guid isPermaLink="true">https://forum.cloudron.io/post/16497</guid><dc:creator><![CDATA[malvim]]></dc:creator><pubDate>Tue, 20 Oct 2020 16:51:19 GMT</pubDate></item></channel></rss>