Welcome Guest, Not a member yet? Register   Sign In
Configure Cache when Deploying CI 4 to Google App Engine Standard
#1

(This post was last modified: 11-17-2023, 12:58 PM by DanielAttard. Edit Reason: typo )

I have a CI 3 application currently deployed to Google App Engine (Standard). Recently I have started to see the following warning:

Code:
WARNING: PHP 7.4 is no longer supported by the PHP community as of 28 November, 2022. PHP 7.4 will be end of support on 2024-01-30. As of 2024-01-30 you will no longer be able to deploy your App Engine Standard using php74. We recommend you to upgrade to the latest version of PHP as soon as possible.
It seems that in order to continue deploying to Google App Engine (Standard) I need to migrate my app to CI 4 and PHP 8.1.
I understand that in Google App Engine (Standard) you can read and write files to a directory named "/tmp" and files in this directory are stored in RAM.
Code:
    public array $file = [
        'storePath' => WRITEPATH . 'cache/',
        'mode'      => 0640,
    ];

I tried setting the writable path to a few different variations but none of these seemed to work:
Code:
        'storePath' = '/tmp/',                 # incorrect path 1 
        'storePath' = '/tmp/cache/',           # incorrect path 2 
        'storePath' = '/workspace/tmp/',       # incorrect path 3 
        'storePath' = '/workspace/tmp/cache/', # incorrect path 4 

This is the error message that I receive in Google App Engine where it is unable to write to the cache:

Code:
PHP message: PHP Fatal error:  Uncaught CodeIgniter\Cache\Exceptions\CacheException: Cache unable to write to "/workspace/tmp/cache/". in /workspace/vendor/codeigniter4/framework/system/Cache/Handlers/FileHandler.php:66
Can someone please help me understand what I am doing wrong?  What is the correct way to configure the cache in CI 4 when deploying to Google App Engine (Standard)?  





xx
Reply
#2

Not a Unix expert but don’t you want to use 0644?
Reply
#3

How do you do with CI3?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB