<?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[Cannot change PHP version on Lamp]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I'm trying to change the PHP version from 7.4 to 8 like it's written in docs(changing the version in PHP_VERSION file), but after restart, nothing has changed.<br />
Thanks in advance!</p>
]]></description><link>https://forum.cloudron.io/topic/7603/cannot-change-php-version-on-lamp</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 13:41:54 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/7603.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Aug 2022 18:17:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 02:43:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laurdaniel" aria-label="Profile: LaurDaniel">@<bdi>LaurDaniel</bdi></a> Make sure you use the full version string "8.0"</p>
]]></description><link>https://forum.cloudron.io/post/52896</link><guid isPermaLink="true">https://forum.cloudron.io/post/52896</guid><dc:creator><![CDATA[murgero]]></dc:creator><pubDate>Thu, 01 Sep 2022 02:43:23 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Wed, 07 Sep 2022 09:23:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> I think this might help <a href="https://stackoverflow.com/a/43586197" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/a/43586197</a>, but I need help to make it working with Cloudron Lamp app</p>
]]></description><link>https://forum.cloudron.io/post/53096</link><guid isPermaLink="true">https://forum.cloudron.io/post/53096</guid><dc:creator><![CDATA[LaurDaniel]]></dc:creator><pubDate>Wed, 07 Sep 2022 09:23:33 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Tue, 06 Sep 2022 09:56:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laurdaniel" aria-label="Profile: LaurDaniel">@<bdi>LaurDaniel</bdi></a> can you give me a small example of how to reproduce this? (as in, PHP code)</p>
]]></description><link>https://forum.cloudron.io/post/53064</link><guid isPermaLink="true">https://forum.cloudron.io/post/53064</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 06 Sep 2022 09:56:59 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Tue, 06 Sep 2022 07:32:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> The thing is that I run laravel 9, so that isn't the problem here. If I run phpinfo, I get that the php version is 8.1.5 but that's not really helping me. What should I do to manage an laravel 9 install?</p>
]]></description><link>https://forum.cloudron.io/post/53057</link><guid isPermaLink="true">https://forum.cloudron.io/post/53057</guid><dc:creator><![CDATA[LaurDaniel]]></dc:creator><pubDate>Tue, 06 Sep 2022 07:32:29 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Mon, 05 Sep 2022 10:04:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laurdaniel" aria-label="Profile: LaurDaniel">@<bdi>LaurDaniel</bdi></a> The CLI <code>php</code> is always 7.4. This is because of a packaging quirk . On ubuntu, the php is a meta symlink and this is not possible to change at run time easily when switching PHP versions. In your scripts, instead use <code>php7.4</code>, <code>php8.0</code>, <code>php8.1</code> binaries instead.</p>
<p dir="auto">The apache PHP module is the correct way to test if the change worked. Can you check the output of <code>phpinfo</code> instead?</p>
<p dir="auto">From your error, it seems you are using an old laravel with newer PHP. See <a href="https://laracasts.com/discuss/channels/laravel/php-fatal-error-during-inheritance-of-arrayaccess-uncaught-errorexception-return-type-of-illuminatesupportcollectionoffsetexistskey" target="_blank" rel="noopener noreferrer nofollow ugc">https://laracasts.com/discuss/channels/laravel/php-fatal-error-during-inheritance-of-arrayaccess-uncaught-errorexception-return-type-of-illuminatesupportcollectionoffsetexistskey</a> and <a href="https://stackoverflow.com/questions/70245146/php-deprecated-issue-when-running-artisan-command" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/70245146/php-deprecated-issue-when-running-artisan-command</a> . I am not an expert on PHP/laravel mismatch, but it looks like that is the root cause here.</p>
]]></description><link>https://forum.cloudron.io/post/53018</link><guid isPermaLink="true">https://forum.cloudron.io/post/53018</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 05 Sep 2022 10:04:17 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 12:53:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> I know it's 7.4 because I run php -v command in terminal. I tried to download the logs file but I'm getting data only from 23.08 to 28.08.</p>
<p dir="auto">I see that I have an error in the logs and I'll try to paste it here directly from logs terminal. I also have to mention that I'm trying to get working an Laravel 9 application.</p>
<p dir="auto">Here is the error from my logs:<br />
Sep 01 15:52:40 [Thu Sep 01 12:52:40.022063 2022] [php:error] [pid 50] [client 172.18.0.1:43456] PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/data/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:1354\nStack trace:\n#0 /app/data/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions-&gt;handleError()\n#1 /app/data/vendor/composer/ClassLoader.php(571): include('...')\n#2 /app/data/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()\n#3 /app/data/vendor/laravel/framework/src/Illuminate/Collections/helpers.php(15): Composer\Autoload\ClassLoader-&gt;loadClass()\n#4 /app/data/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(89): collect()\n#5 /app/data/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest-&gt;config()\n#6 /app/data/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest-&gt;aliases()\n#7 /app/data/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(230): Illuminate\Foundation\Bootstrap\RegisterFacades-&gt;bootstrap()\n#8 /app/data/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(152): Illuminate\Foundation\Application-&gt;bootstrapWith()\n#9 /app/data/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(136): Illuminate\Foundation\Http\Kernel-&gt;bootstrap()\n#10 /app/data/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel-&gt;sendRequestThroughRouter()\n#11 /app/data/public/index.php(55): Illuminate\Foundation\Http\Kernel-&gt;handle()\n#12 {main} in /app/data/vendor/laravel/framework/src/Illuminate/Collections/Collection.php on line 11</p>
]]></description><link>https://forum.cloudron.io/post/52923</link><guid isPermaLink="true">https://forum.cloudron.io/post/52923</guid><dc:creator><![CDATA[LaurDaniel]]></dc:creator><pubDate>Thu, 01 Sep 2022 12:53:11 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 12:23:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laurdaniel" aria-label="Profile: LaurDaniel">@<bdi>LaurDaniel</bdi></a> The default install is PHP 8.0 for a while now. Can you post the app logs, so we can try to see why it's resetting to PHP 7.4 ? BTW, how do you know it's PHP 7.4?</p>
<p dir="auto">And yes, deleting the app will delete the database as well.</p>
]]></description><link>https://forum.cloudron.io/post/52921</link><guid isPermaLink="true">https://forum.cloudron.io/post/52921</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 01 Sep 2022 12:23:03 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 12:13:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> I checked the Appstore Id and it looks like it's the latest, lamp.cloudronapp.php74@2.2.0 and it's last updated 2 weeks ago.</p>
<p dir="auto">I will try a new installation and maybe that will do it. My question is, when uninstalling an lamp application, I will also delete the database credentials?</p>
]]></description><link>https://forum.cloudron.io/post/52919</link><guid isPermaLink="true">https://forum.cloudron.io/post/52919</guid><dc:creator><![CDATA[LaurDaniel]]></dc:creator><pubDate>Thu, 01 Sep 2022 12:13:59 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 10:40:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laurdaniel" aria-label="Profile: LaurDaniel">@<bdi>LaurDaniel</bdi></a> I feel I am missing something:</p>
<ul>
<li>The default version of PHP in a new install in 8.0</li>
<li>I tried changing PHP_VERSION to 8.1 and restart the app. That worked.</li>
</ul>
<p dir="auto">So.. Can you tell me:</p>
<ul>
<li>Is this a new install or are you using an old PHP installation where we previously had PHP 7.4 as the default?</li>
<li>In the Update section of the app, can you check what the Appstore Id is? In the past, we had an old app which was PHP 7.2. Maybe you are using that one? The latest package is <code>lamp.cloudronapp.php74@2.2.0</code></li>
</ul>
<p dir="auto">My <code>PHP_VERSION</code> file looks like this:</p>
<pre><code>; Set the desired PHP version in this file
; Restart app for changes to take effect
PHP_VERSION=8.1
</code></pre>
]]></description><link>https://forum.cloudron.io/post/52914</link><guid isPermaLink="true">https://forum.cloudron.io/post/52914</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 01 Sep 2022 10:40:33 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 10:25:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> I tried that too, without success</p>
]]></description><link>https://forum.cloudron.io/post/52912</link><guid isPermaLink="true">https://forum.cloudron.io/post/52912</guid><dc:creator><![CDATA[LaurDaniel]]></dc:creator><pubDate>Thu, 01 Sep 2022 10:25:46 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 10:19:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laurdaniel" aria-label="Profile: LaurDaniel">@<bdi>LaurDaniel</bdi></a> remove the quotes around 8.0 . So, just <code>PHP_VERSION=8.0</code>.</p>
]]></description><link>https://forum.cloudron.io/post/52911</link><guid isPermaLink="true">https://forum.cloudron.io/post/52911</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Thu, 01 Sep 2022 10:19:02 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 08:39:37 GMT]]></title><description><![CDATA[<p dir="auto">This is what PHP_VERSION file is containing<br />
"<br />
; Set the desired PHP version in this file<br />
; Restart app for changes to take effect<br />
PHP_VERSION="8.0"<br />
"</p>
]]></description><link>https://forum.cloudron.io/post/52907</link><guid isPermaLink="true">https://forum.cloudron.io/post/52907</guid><dc:creator><![CDATA[LaurDaniel]]></dc:creator><pubDate>Thu, 01 Sep 2022 08:39:37 GMT</pubDate></item><item><title><![CDATA[Reply to Cannot change PHP version on Lamp on Thu, 01 Sep 2022 02:43:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/laurdaniel" aria-label="Profile: LaurDaniel">@<bdi>LaurDaniel</bdi></a> Make sure you use the full version string "8.0"</p>
]]></description><link>https://forum.cloudron.io/post/52896</link><guid isPermaLink="true">https://forum.cloudron.io/post/52896</guid><dc:creator><![CDATA[murgero]]></dc:creator><pubDate>Thu, 01 Sep 2022 02:43:23 GMT</pubDate></item></channel></rss>