Wordpress version: 3.4.2, twentyeleven theme, w3 total cache latest version
The issue: a nysterious w3 total cache plugin fatal error made htacess file incorrect and now site disappear or it displays without style. Furthermore i can't access to admin area (blank page).
Admin area url is:
http://www.felicetrasformazionepersonale.it/labbondanzavienedalcuore/wp-admin
site url: http://www.felicetrasformazionepersonale.it/
This is php log error:
PHP Fatal error: Call to undefined function get_home_url() in /home5/felicetr/public_html/labbondanzavienedalcuore/wp-content/plugins/w3-total-cache/inc/define.php on line 617
I've tries to rename w4 toalt cache plugin directory but it does not work.
Can you help me?
Giri answers:
1. Log into FTP, or SSH or Shell or SCP or whatever process you use to access file directly
2. Comment out this “/wp-content/plugins/w3-total-cache/inc/functions/activation.php” on line 127
3. Now you could access Dashboad.
4. First thing first, Clean all cache from W3TC.
5. Deactivate W3TC from plugin section.
6. Remove that Comment out from “/wp-content/plugins/w3-total-cache/inc/functions/activation.php” on line 127.
7. Now reactivate W3TC, check setting, in generally you won’t need any customization
maryhellen comments:
In which file i have to comment out file path on 127 line?
Giri comments:
/wp-content/plugins/w3-total-cache/inc/functions/activation.php
Giri comments:
This is the line
http://plugins.trac.wordpress.org/browser/w3-total-cache/trunk/inc/functions/activation.php#L127
Giri comments:
change this line
throw new FileOperationException($error, 'create', 'file', $path);
to
//throw new FileOperationException($error, 'create', 'file', $path);
maryhellen comments:
Where is in my wp istallation file within i have to comment out line 127?
Giri comments:
Hello maryhelen, you have to use ftp to edit the file
If you are having trouble just message me your hosting login details from my profile. I'll fix it.
http://wpquestions.com/user/profile/id/4567
maryhellen comments:
I followed your instructions but i ca not yet access to dashboard.
It happened something that prevent .htaccess command to use style.css that is in the subdirectory (where is installed wp) and also admin area.
Giri comments:
If thats not working.. try this solution...
When i access this page
http://www.felicetrasformazionepersonale.it/labbondanzavienedalcuore/wp-admin
nothing get displayed. But if you press ctrl + u button you can see the hidden error message.
This is the error you are having..
<!-- SHTML Wrapper - 500 Server Error -->
According to this article
http://www.patcup.com/how-to-fix-wordpress-shtml-wrapper-500-server-error/
it can be fixed by enabling FastCGI option. If you have no idea what it is just contact your hosting support.. They will enable it for you
maryhellen comments:
I can't risk to make some irreversible damage. What i risk if activate this option? In the worst case can i back to previuos
setting?
Giri comments:
Hi there, you must always take backup before you change anything in your server. So take backup of your database and site files. By the way I think you still not turned on wp_debug. So i think its really impossible to know what kind of error you having.
Check this page to turn on wp_debug
http://codex.wordpress.org/Debugging_in_WordPress#Example_wp-config.php_for_debugging
Abdelhadi Touil answers:
Hi.
I'v fixed the same problem with one of my client's website. What I'v done is uninstall the W3 total cache plugin, and reinstall it after resolving the problem.
You need to access your website files via FTP, and try to:
1) Rename the plugin's floder,
2) via FTP open wp-content on the root directory and look for the following files:
db.php
w3-total-cache-config.php
Advanced-cache-php
w3tc
Delete all these files if you find them their.
3) Open .htaccess file for editing and ensure it does not contain w3 total cache re-write rules.
These steps should resolve your problem. After that you can rename again the plugin's folder and reactivate it.
If you can't resolve the problem try to contact me via PM.
Good luck.
maryhellen comments:
Do you think it error does occur bacause latest w3 total cache version is incompatible with wp 3.4.2?
Abdelhadi Touil comments:
I'm happy to see your site working now :)
I don't know exactly where the problem comes from, maybe w3 total cache produce such problem after long time of using it.
Good luck.
maryhellen comments:
Bluehost fix the issue, here are what he done: he deactivated all the plugins in DB, recreate htaccess file ( and paste in it
old code without w3 total cache re-write rules (as you suggested).
And issues has been fixed. Anyway i think your siggested right solution also if your way to disabling plugins is different.
Thanks
Abdelhadi Touil comments:
I'v suggested a solution I'v tested on one of my clients website, and it worked. For me I just sugest to disable the w3 total plugin, not all plugins.
Good luck, and you are welcome.
DHRUBA BHOWMIK answers:
On a live server, you should have access to the PHP error log. This is different than the Web server error log, which shows things such as 404 errors when a page or image is not found. The PHP log gives information on errors and warnings in PHP itself. The host should have configured PHP to send errors to a log rather than write them to the screen.
If no error log can be found, then you might be able to configure PHP to maintain one in a location that you specify. To do this, create a directory on your website named errors. Make this directory writable. Then add the code below to the .htaccess file at the root of your website. If you do not have an .htaccess file, create one.
php_flag log_errors on
php_flag display_errors off
php_value error_log /your/path/public_html/errors/php_error.log
Then, protect the errors directory so that the file cannot be downloaded from the Web. You might be able to do this in the control panel or just by creating a new .htaccess file, this time in the errors directory.
Order allow,deny
Deny from all
If you now run the script that caused the error, the error message should get added to the php_error.log file. If it doesn’t work, try creating the file yourself first in the errors directory and making it writable.
If you have no luck creating an error log, then open a support ticket with your hosting provider, explaining what you are trying to achieve and inquiring how to do it.
maryhellen comments:
Thanks. I found where are stored php errors on the server
Asad Iqbal answers:
Add the following line to wp-config.php ans then let me know:
define('WP_DEBUG', true);
maryhellen comments:
it does not work.
Asad Iqbal comments:
Did you add that line? I didn't see any output !!! Just add
define('WP_DEBUG', true);
in wp-config.php and let me know then. I need to see the output.
maryhellen comments:
i did it. Where i have to see output?
Asad Iqbal comments:
Can you please share you cPanel details to my inbox? I do not hard your site if you believe me :)
idt answers:
What version is your Wordpress? It seems like you're using an older version. get_home_url() is a Wordpress function available since version 3. If you are using Wordpress lower than that version you might need to upgrade or use the version of WP cache that supports your version of wordpress.
Thanks,
idt
idt comments:
Oops. Nevermind didn't see you had the version up there. :)