I have some trouble with TYPO3 and opcache activation and hope someone can help me :).
Environment details:
PHP 7.1.10
OPcache Version: 7.1.10
TYPO3 7.6.23
Alfahosting (Business XL (SSD))
Situation:
If I enable PHP7 without opcache option then everything is working fine, but if I enable PHP7 with opcache option then I got irregular 500 errors in the backend of TYPO3 and the site is down for a few seconds or minutes. After this few seconds I could reload the page and everything is working until the next server error appears. So it seems that a server process is restarting after this crash.
Actions like opening the extension configuration of the TYPO3 backend extension and press save will lead to the server error. The server logs and the error logs are empty and for this reason the Alfahosting support can't help me.
Furthermore I have mirrored the TYPO3 on two other webservers (not Alfahosting), also PHP7 and opcache option enabled and got no problems on this two webservers. After that I have installed a fresh TYPO3 7.6.23 on a Alfahosting webserver (see environment details above) and I got the annoying 500 server error again. So I think a specific Alfahosting server configuration leads to the 500 server errors if opcache is enabled, but I am not a server admin and I don't know how I could solve this problem without changing the hosting :(.
So I hope someone could help me? Maybe it's possible to track the error to find out where the problem is?
Update:
This sounds like the files have not been refreshed in opcache. This can be the case if opcache.revalidate_freq is set to > 0 or opcache.validate_timestamps=0.
In this case you should make sure you flush opcache when you make changes to PHP files, including updating TYPO3 or your extensions. For example, set this up in your deployment / update pipeline, for example by doing apache2 reload, php-fpm reload, use gordaline/cachetool or flush Opcache in the TYPO3 Backend (Maintenance).
Please read the PHP documentation for the opcache settings and check your current settings (can be found in the TYPO3 backend: Environment | PHP Info). Particularly the following come with a risk:
; make sure you flush opcache if PHP scripts change.
opcache.validate_timestamps=0
; make sure you flush opcache if PHP scripts change.
opcache.revalidate_path= .... higher value > 0
; should be set to 1 for TYPO3
opcache.save_comments = 0
Resources:
PHP documentation for opcache: https://www.php.net/manual/en/opcache.configuration.php
Check the TYPO3 system reports for any obvious errors:
Run TYPO3 system report: "TYPO3 Backend" : "System" : "Reports" : "Status report"
In the "TYPO3 Install Tool" check "System environment"
Now check the logs
check the sys_log: "TYPO3 Backend" : "System" : "Log"
check the Webserver / PHP logs
check system logs (depends on operating system, e.g. journalctl)
have a look at the output of phpinfo (in TYPO3 Backend: Environment | PHP Info). It should include some OPcache statistics. Look at "wasted memory", "Free memory" and "OOM restart"
Related
My moodle was installed on Centos 7, disabled selinux but got error "cache/Unable to load the cache configuration file"
[
How to fix it ? Thank you very much
From the Moodle docs
https://docs.moodle.org/311/en/RedHat_Linux_installation#SELinux
Default RedHat Enterprise Linux comes with SELinux set to 'enforcing'. But this may cause user problem accessing web content placed at directory other than the default directory (/var/www/html) or other access problem. If you are not used to SELinux and setting permissions, it's (maybe less secure but) often easier to lower the SELinux level to 'permissive' or even 'disabled'.
Edit /etc/sysconfig/selinux
SELINUX=disabled
One of my Drupal websites homepage (just the homepage) is constantly redirecting when the site is visited. Tends to happen randomly. Which I don't understand why it would do this. I talked a bit on the Drupal community and it is said to be a server issue. Not Drupal.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
I don't currently have CPanel access to check the server logs though. I am somewhat fluent in terminal and I have root SSH access to the server.
Where and what commands would I have to run to find and access the logs that could possible help me figure where to start with fixing this? Would they just be located in /var/? What would I be looking for once I get access to the logs, just a steady stream of the duplicated IP address that it keeps being redirected too?
Found out this IS a Drupal Commerce Kickstart core issue.
Found follow errors in php logs:
PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini
PHP Fatal error: Unsupported operand types in public_html/dev/profiles/commerce_kickstart/modules/contrib/search_api_db/service.inc on line 970
Got the redirect loop to stop after increasing the max_input_vars to 9000. I feel it's more of a bandaid fix though. So I'm taking this further into the Commerice Kickstart community.
I've successfully configured ZSS Server on my internal system (Win Server 2008R2 + IIS 7.5), and everything works fine.
Now I'm trying to install the same system on a customer machine; I've done this through the installer (latest version), he has applied the necessary security permissions, the home page of the site is visible, but syncing the db give the 1992 error.
Taking a look at IIS logs, I see that every call with GET /pull result in a 404 error code, subcode 0; there are several consecutive statements like this, all terminating wi9th 404.0 error code.
The web.config is the same as my system. What else can I check ?
You say you can reach the home page of the site - do you mean the "main" IIS home page, or the root of the ZSS site? That is, assuming Zumero is running on port 8080, what do you see when you point a browser at http://your.customer.site:8080?
I my case it was caused by the Application pool being configured for 32 bit (which it should not be). Version 1.4 has an improved installer, that should prevent this from happening
I am unable to get a Login page after Moodle 2.5 installation got over. it throws following error
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
I will be more helpful if anybody gives me an answer.
Assuming this is a fresh install?
I would first check this setting is correct in config.php - something like
$CFG->wwwroot = 'http://localhost/yourwebname';
or
$CFG->wwwroot = 'http://www.yourdomainname.com';
If those are correct then clear the cookies in the browser for the specific domain.
And maybe clear the Moodle cache. From a terminal, go to your web directory
cd /var/www/moodle
Then run
php admin/cli/purge_caches.php
http://docs.moodle.org/25/en/Administration_via_command_line#Purge_caches_via_CLI
I had this same issue (except with XAMMP, and Moodle 2.7, but my guess is the same issues are at play). The solution at https://moodle.org/mod/forum/discuss.php?d=239793#p1115879 worked for me.
Basically, delete the contents of moodledata\cache (just use explorer, no need for any CLI stuff), and increase max memory in php.ini (should be wamp\php\php.ini) from 128M to 1024M, then try loading the page again.
I try remote debug php application with phpstorm. I use centos 6.4, php5.3 and apache 2.2 on vmware virtual machine, and phpstorm with firefox on real ubuntu.
xdebug is really installed:
Installed Packages
Name : php-pecl-xdebug
Arch : i686
Version : 2.1.4
Release : 1.el6
Size : 580 k
Repo : installed
From repo : epel
Summary : PECL package for debugging PHP scripts
URL : http://pecl.php.net/package/xdebug
License : PHP
And phpinfo confirm this too:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.4, Copyright (c) 2002-2012, by Derick Rethans
When i run script (simple hello world) from console via ssh my script is stopped, i get connection to mu ide from xdebug and xdebug write info in own log.
But when i run script from browsen - is has no effect, even in xdebug log.
I try use firefox extension to start debug session, i try use xdebug.remote_autostart=1 option, tru turn off iptables in centos, but no effect too.
What i do wrong?
xdebug config:
; Enable xdebug extension module
zend_extension=/usr/lib/php/modules/xdebug.so
;xdebug.remote_host=10.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
;xdebug.remote_mode=req
;xdebug.profiler_enable=1
;xdebug.profiler_enable_trigger=1
;xdebug.remote_autostart=1
;xdebug.idekey=PHPSTORM
xdebug.remote_log="/tmp/xdebug.log"
Oh my god, problem solved. It's all selinux.
setsebool httpd_can_network_connect=1, nttpd restart - and phpstorm get connection from xdebug.
etc/selinux/config change
This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
SELINUX=enforcing
SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are
protected.
mls - Multi Level Security protection.
SELINUXTYPE=targeted
to
This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
SELINUX=disabled
SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are
protected.
mls - Multi Level Security protection.
SELINUXTYPE=targeted