afivan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error after 1-2 days of working fineWhat I did was to switch from Apache to Nginx, started from scratch latest WP and put back the content, theme and plugins. For now it works, but the permissions are restricted so that WP cannot update itself or make any changes to its files. It works for ~5 days now, I really don’t know where the issue is/was, I think it’s something Apache or PHP related
Forum: Fixing WordPress
In reply to: Error after 1-2 days of working fineI just renamed the plugins folder to plugins-old, but didn’t solve my issue
Forum: Fixing WordPress
In reply to: Error after 1-2 days of working fineI’ve activated the debug, you can see the error now
Forum: Fixing WordPress
In reply to: Error after 1-2 days of working fineWell it’s no longer ok, right now it crashes with the error from the topic. I’ve checked the files in wp-includes and there are no changes in it. There has to be something wrong in PHP or something. If I restart apache, the site will work just for the first request. Then it crashes again. To make it work for 1 day I can do the following (no restart required):
mkdir wp-includes2
cp wp-includes/* -r wp-includes2/
rm wp-includes/* -r
cp wp-includes2/* -r wp-includesThen it works, for 1 day! Very strange, I just move around the files in wp-include a bit.
Forum: Fixing WordPress
In reply to: Error after 1-2 days of working fineSo if I do this in my wordpress folder:
mkdir wp-includes2
cp wp-includes/* -r wp-includes2/
rm wp-includes/* -r
cp wp-includes2/* -r wp-includesIt works again, but I expect it to crash again in 1-2 days. It means the wordpress installation is not broken, but there’s something wrong somewhere else, that’s why I suspect a bug in Apache or PHP.
Forum: Fixing WordPress
In reply to: Error after 1-2 days of working fineI did that again yesterday, I replaced the wp-includes with fresh ones. This morning, again the same same issue… It’s driving me nuts, I don’t know what is going on. I’ll probably ask for help on github, maybe someone has an idea.
Forum: Fixing WordPress
In reply to: Error after 1-2 days of working fineYes I did that. I ran these commands in /var/www directory. In ~/wordpress I’ve extracted the clean WP
cp wordpress/ wordpress2 -r
cp ~/wordpress/* wordpress -r
cp wordpress2/wp-config.php wordpress
~/fix-wp-permissions.sh /var/www/wordpressMy fix-wp-permissions.sh looks like this:
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.ww.wp.xz.cn/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <– wordpress owner
WP_GROUP=www-data # <– wordpress group
WP_ROOT=$1 # <– wordpress root directory
WS_GROUP=www-data # <– webserver group# reset to safe defaults
find ${WP_ROOT} -exec chown ${WP_OWNER}:${WP_GROUP} {} \;
find ${WP_ROOT} -type d -exec chmod 755 {} \;
find ${WP_ROOT} -type f -exec chmod 644 {} \;# allow wordpress to manage wp-config.php (but prevent world access)
chgrp ${WS_GROUP} ${WP_ROOT}/wp-config.php
chmod 660 ${WP_ROOT}/wp-config.php# allow wordpress to manage wp-content
find ${WP_ROOT}/wp-content -exec chgrp ${WS_GROUP} {} \;
find ${WP_ROOT}/wp-content -type d -exec chmod 775 {} \;
find ${WP_ROOT}/wp-content -type f -exec chmod 664 {} \;Forum: Plugins
In reply to: [Redux Framework] Uncaught Error: Call to undefined function current_time()It seems that I’ve solved the issue. I took the newest version of WP and I copied all files from wp-includes to my blog and now it works
Forum: Plugins
In reply to: [Redux Framework] Uncaught Error: Call to undefined function current_time()I’ve ran the bash script, but with no luck. I mention I didn’t install the redux plugin at all. This is very weird, the wordpress installation was working just fine, but all of a sudden it stopped…
Forum: Plugins
In reply to: [Redux Framework] Uncaught Error: Call to undefined function current_time()Hello,
I’ve also encountered this issue on my server. The problem is that I disabled the plugins witht he command mv plugins/ plugins-bkp
But still no luck, it seems the error comes from core WP. I didn’t have this problem previously, just yesterday I tried to go to my blog and the problem appeared. If I restart Apache, it does’t appear for the first time, but still nothing shows in the page, and after the second time I get this stacktrace:
Fatal error: Uncaught Error: Call to undefined function current_time() in /var/www/wordpress/wp-includes/functions.php:2428 Stack trace: #0 /var/www/wordpress/wp-includes/functions.php(2287): _wp_upload_dir() #1 /var/www/wordpress/wp-includes/functions.php(2241): wp_upload_dir() #2 /var/www/wordpress/wp-includes/post.php(503): wp_get_upload_dir() #3 /var/www/wordpress/wp-includes/post.php(6221): get_attached_file() #4 /var/www/wordpress/wp-includes/post.php(6272): wp_attachment_is() #5 /var/www/wordpress/wp-includes/media.php(193): wp_attachment_is_image() #6 /var/www/wordpress/wp-includes/media.php(955): image_downsize() #7 /var/www/wordpress/wp-includes/media.php(1119): wp_get_attachment_image_src() #8 /var/www/wordpress/wp-includes/general-template.php(929): wp_get_attachment_image_url() #9 /var/www/wordpress/wp-includes/general-template.php(970): get_site_icon_url() #10 /var/www/wordpress/wp-includes/general-template.php(3256): has_site_icon() #11 /var/www/wordpress/wp-includes/class-wp-hook.php(287): wp_site_icon() # in /var/www/wordpress/wp-includes/functions.php on line 2428
I cannot understand why it doesn’t find the function, it’s there in functions.php
Can you help me please?
Thanks!