appstract / laravel-opcache

Laravel Package for OPcache
MIT License
1.33k stars 118 forks source link

OPcache not configured error message #95

Closed pepeshark closed 4 years ago

pepeshark commented 4 years ago

Hi, I am using fresh php:7.3-apache docker.

I have got 2 error message in laravel log when I run php artisan opcache:compile:

Cannot declare class FilesystemRegexFilter, because the name is already in use
Cannot use Riak\Object as Object because 'Object' is a special class name

It compile about 5000 file then I get error message in promt: "OPcache not configured"

Here is my opcache.ini custom file:

opcache.enable=1
opcache.memory_consumption=512
opcache.interned_strings_buffer=64
opcache.max_accelerated_files=32531
opcache.validate_timestamps=0
opcache.save_comments=1
opcache.fast_shutdown=1
opcache.dups_fix=1
Configuration info:
+---------------------------------------+------------+
| opcache.enable                        | true       |
| opcache.enable_cli                    | false      |
| opcache.use_cwd                       | true       |
| opcache.validate_timestamps           | false      |
| opcache.validate_permission           | false      |
| opcache.validate_root                 | false      |
| opcache.inherited_hack                | true       |
| opcache.dups_fix                      | true       |
| opcache.revalidate_path               | false      |
| opcache.log_verbosity_level           | 1          |
| opcache.memory_consumption            | 512.00 MB  |
| opcache.interned_strings_buffer       | 64         |
| opcache.max_accelerated_files         | 32531      |
| opcache.max_wasted_percentage         | 0.05       |
| opcache.consistency_checks            | 0          |
| opcache.force_restart_timeout         | 180        |
| opcache.revalidate_freq               | 2          |
| opcache.preferred_memory_model        |            |
| opcache.blacklist_filename            |            |
| opcache.max_file_size                 | 0          |
| opcache.error_log                     |            |
| opcache.protect_memory                | false      |
| opcache.save_comments                 | true       |
| opcache.enable_file_override          | false      |
| opcache.optimization_level            | 2147467263 |
| opcache.lockfile_path                 | /tmp       |
| opcache.file_cache                    |            |
| opcache.file_cache_only               | false      |
| opcache.file_cache_consistency_checks | true       |
| opcache.file_update_protection        | 2          |
| opcache.opt_debug_level               | 0          |
| opcache.restrict_api                  |            |
| opcache.huge_code_pages               | false      |
+---------------------------------------+------------+

This problem should be solve by this config opcache.dups_fix=1 but it does not work well. Then I tried it with php:7.2-apache, the result is same.

Do you have any ide what is wrong in my enviroment? If you have any question please let me know. Thanks.

guilherme90 commented 4 years ago

I have same issue ;(

pepeshark commented 4 years ago

Do you have any idea for this problem? Do you need more information about the enviroment?

guilherme90 commented 4 years ago

I no have idea about this problem. I ended up not using this project.

greabock commented 4 years ago

@ovanschie ping

bleuscyther commented 4 years ago

Check in config/opcache.php.

if OPCACHE_URL (in the .env) file is not set and if config('app.url')return empty it will fail.

Note that config('app.url') is also APP_URL in the ,env file.

You can restart the server after updating the files just in case. It should work after.

i also did this :

'verify_ssl' => env('APP_ENV') === 'production',
ovanschie commented 4 years ago

https://github.com/appstract/laravel-opcache/issues/92

You can also exclude packages from the config if you have issues with specific packages