PHP problem with ZyXEL NSA325v2.

Options
zawodowiec81
zawodowiec81 Posts: 2  Freshman Member
edited February 2018 in Personal Cloud Storage
I have a problem with PHP. When I uploaded new script to NAS web server  runs script correctly, but when I modified script and upload it to NAS, script runs like it was old version. My changes didn't work. Please help me. 

#NAS_February

Accepted Solution

  • rampage128
    rampage128 Posts: 1  Freshman Member
    edited February 2018 Answer ✓
    Options
    Hi,
    you need to disable opcache.
    For that you have to connect to your NAS via SSH and edit the php.ini file:

    1. Enable SSH in your firmware/package settings.

    2. Connect to your NAS with putty, bash or whatever.

    3. The file is located in:
    /usr/local/zy-pkgs/php/php.ini

    You can edit it with vi
    vi /usr/local/zy-pkgs/php/php.ini


    4. Just change the line

    opcache.enable=1

    to

    opcache.enable=0


    5. Make sure that you restart your NAS or at least HTTPD.


    Good luck

All Replies

  • rampage128
    rampage128 Posts: 1  Freshman Member
    edited February 2018 Answer ✓
    Options
    Hi,
    you need to disable opcache.
    For that you have to connect to your NAS via SSH and edit the php.ini file:

    1. Enable SSH in your firmware/package settings.

    2. Connect to your NAS with putty, bash or whatever.

    3. The file is located in:
    /usr/local/zy-pkgs/php/php.ini

    You can edit it with vi
    vi /usr/local/zy-pkgs/php/php.ini


    4. Just change the line

    opcache.enable=1

    to

    opcache.enable=0


    5. Make sure that you restart your NAS or at least HTTPD.


    Good luck

  • zawodowiec81
    zawodowiec81 Posts: 2  Freshman Member
    Options
    Great! Thank You!
  • casati
    casati Posts: 6  Freshman Member
    Options
    Forget step 4 from above!
    Better use this advice:

    opcache.revalidate_freq - Basically put, how often (in seconds) should the code cache expire and check if your code has changed. 0 means it checks your PHP code every single request (which adds lots of stat syscalls). Set it to 0 in your development environment. Production doesn't matter because of the next setting.

    opcache.validate_timestamps - When this is enabled, PHP will check the file timestamp per your opcache.revalidate_freq value.

    When it's disabled, opcache.revaliate_freq is ignored and PHP files are NEVER checked for updated code. So, if you modify your code, the changes won't actually run until you restart or reload PHP (you force a reload with kill -SIGUSR2).

    From: https://www.scalingphpbook.com/blog/2014/02/14/best-zend-opcache-settings.html

Consumer Product Help Center