I am trying to deploy a Lithium app on Heroku, but Heroku uses a read-only file system for apps. This causes a problem with the app/resources folder. I've tried looking for a setting the lithium config to change the path to this folder, but it appears to be hard coded.
Can anyone recommend how to resolve this issue?
Lithium uses the /resources folder for writing temporary files such as logs, file caches, compiled PHP templates, etc.
The path is configurable through Libraries::add() when the application is initialized. In config/bootstrap/libraries.php, you can replace your application's Libraries::add() call with one like the following: https://github.com/orchestra-io/sample-lithium/blob/master/app/config/bootstrap/orchestra.php#L10
This configuration uses the system's temp directory, and checks for/initializes the subdirectories Lithium will use.
Related
I run a Symfony 4 application using the PHP built-in web server on my development environment.
I would like the /tmp folder on my host to be ignored from the Symfony routing process in order to be accessed directly (and so being able to access the files within this directory).
However, when requesting http://localhost:8000/tmp, Symfony tries to match the route /tmp, which obviously does not exist. Instead I would like to get a list of the /tmp folder files.
I guess there is no way to handle that simply using the PHP built-in webserver and I have no other choice than using a full-featured web server, but I just want to be sure that I'm not missing any option that could actually do that just using the built-in web server ?
Do not add your tmp folder in /public directory. If you want to use some temporary data better to hold them in /var directory and access to this folder in your controllers or services by using Finder component
I've inherited an application written using the Yii PHP framework. I've uploaded all the project files to a remote server, but I don't have SSH access or shell-exec permission.
Is it possible to make the application work in these circumstances?
If so, what files do I need to edit and in what way please?
Yes, it should be portable, all you need is just copy all project contents (including dependencies) to the destination folder and make proper configuration for a web-server.
The only one issue here is #app/runtime and #app/web/assets folders -- the should be accessible to write for web-process (the second is only if you are using AssetManager).
You can solve this issue in config, using runtimePath and assetManager['basePath'] parameters.
Is there any way to move config app (app/config) above the app folder?
I want to deploy app folder without override config files on multiple instances of my app.
I am not sure if that is possible. What you can do is adding a (set of) custom config(s) to you config.php's always_load section. You can add custom paths so that it can be loaded from any file, even outside of your application.
While this (partly) solves your problem, I might have a better solution for you:
You can configure your application per environment. APPPATH/config/production/*.php will override your default configuration. If you don't want to version control this folder, you can add it to .gitignore. If your deployment process is smart enough, you can configure to preserve configuration files between deployments. To activate production environment, you need to set the FUEL_ENV environment variable to production.
I want to see all Bug fix of cakephp framework. for other php framework Bug fixes are located in change log file in framework, but in cakephp i can't find any changelog file. where i cat find this file?
Cakephp doesn't have a changelog file in the repository.
You can either browse trough the github versions for a short textual changelog:
https://github.com/cakephp/cakephp/releases
Alternatively you can read the changes in the cakephp news:
http://cakephp.org/pages/news
Or if you want see the granular changes you can browse the source code by tags: https://github.com/cakephp/cakephp/tree/2.6.6
CakePHP Folder Structure
bin
config
logs
plugins
src
tests
tmp
vendor
webroot
.htaccess
composer.json
index.php
README.md
The logs folder normally contains your log files, depending on your Logging Configuration.
Make sure that the tmp and logs folders exist and are writable, otherwise the performance of your application will be severely impacted. In debug mode, CakePHP will warn you, if it is not the case.
When deploying a web application in PHP, one doesn't always want your configuration files with passwords to be committed into the repository.
What is the preferred method of handling this, ie.
saving the details in a DB, and templating the config file
copying the file onto the server (which raises the question of where to save
and version the file being copied in)
setting the environment variables on the server, and having the config file reading from
that.
or any other suggestions.
You can have your config files in a folder out of the public folder and restrict the access to that folder using .htaccess file. Of course this works if you are using Apache as webserver.