TP5 build cache files will be built to the server root directory

is_dir (): open_basedir restriction in effect. File (/) is not within the allowed path (s): (/ home/www.abc.com/public:/home/www.abc.com/:/proc/:/tmp)

shouldn"t the key File (/) point to runtime/cache, how can it become /, I print var_dump (RUNTIME_PATH. "cache". DS); output "/ home/www.abc.com/runtime/cache/", the address here is right, I really don"t understand, can you help me explain it?

Mar.23,2021

    The cache directory for
  1. tp is set with the constant CACHE_PATH . It is recommended that you print CACHE_PATH to see where the directory you are pointing to is.
  2. read the reason for the error. It should be that open_basedir limits the directories that PHP can operate. Add
  3. to the conf of the virtual host.
fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root/:/home/www.abc.com/runtime/cache/

then restart nginx

The correct solution mentioned above is

. I have seen that you are right to print the cache directory, but when it is generated, it is in the root directory. It is recommended that you check whether the method of generating the cache specifies the directory or whether the source code has changed the configuration of the system without reading the system at all


check the code. You can print step by step and follow the code. See where the path went wrong

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3613f-2b761.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3613f-2b761.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?