LSCWP version 1.0.2

Hedloff

Well-Known Member
#1
Hello,

See that you added some things in this version.
Could you explain what Network Admin Setting will do?

Also I got a notice about wp-config.php that Litespeed cache was unable to write to it:
LiteSpeed Cache was unable to write to your wp-config.php file. Please add the following to your wp-config.php file located under your WordPress root directory: define('WP_CACHE', true);

Even with this notice/error and with cache plugin enabled it is working fine it seems.
Do customers now have to add that define line in wp-config.php and why?
 

KevinFwu

Administrator
Staff member
#2
Hi Hedloff,

Regarding the network admin setting, Michael explained it in another thread on this forum, so you can find the answer there.

Regarding the wp configuration part:
Are you using multi site? If so, is it by sub directory or by domain? I only tested by sub directory, so there might be something in sub domain that might've triggered the message.
What is the plug in setup? E.g. Activated and enabled for all (or for single site, just activated and enabled), activated for all, but enabled for some, etc.

I am not at the office so I cannot check the code easily, but if I recall correctly, that message should only appear if the plug in is activated AND enabled, but the wp cache line was not inserted to the wp configuration file automatically.

Did you try deactivating and reactivating the plug in?

Cheers,
Kevin
 

Hedloff

Well-Known Member
#3
Hello again Kevin!

I bumped into this issue again with the error message:
Code:
LiteSpeed Cache was unable to write to your wp-config.php file. Please add the following to your wp-config.php file located under your WordPress root directory: define('WP_CACHE', true);
This is a brand new server with Cloudlinux 7, LiteSpeed 5.1.9, cPanel 58 (build 31) with EA 4.

I'm currently making some support guides with information and pictures for our websites on setup/installing LSCWP and that's when I bumped into this issue again.

First I tried to install in Norwegian language and got that message and that the plugin was activated.
Then I did the same on another fresh install of wordpress in English and no error/warning after installing the plugin there.

I also did check both wp-config.php files and I found that the line was added sucessfully automatic on both sites:
define('WP_CACHE', true);

So apperently you plugin has some issues/bugs with this on foreign languages.
Hope you can correct this asap :)
 

KevinFwu

Administrator
Staff member
#6
Hi Hedloff,

That's an interesting issue! Are there any special characters in the absolute path to the wp-config file?
An example of an absolute path is like /home/user534/public_html/wordpress/wp-config.php
 

KevinFwu

Administrator
Staff member
#7
I created a test installation with special characters, and indeed there are issues. So if your path does not include special characters, let me know. I will look into getting it working with special characters.

EDIT:

Jumped the gun. The issues I hit were actually permission issues.

I created a wordpress install in a ÆæÅåÄäÐðØøÖöÞþ directory and had no issues after changing the ownership of the files to the correct owner. So I still do not have a situation where I got that problem other than when the ownership of the files are incorrect.
 
Last edited:

Hedloff

Well-Known Member
#8
Well, the issue is there!
I installed a Norwegian installation of WordPress trough Softaculous in the folder:
/home/ttesting/public_html/testwp/ (warning)
/home/ttesting/public_html/wptest/ (English,no warning)

I created one more Swedish WP and installed the plugin but no warning there. And also a new Norwegian WP and now there were no warnings either. So I will do some more testing on other servers and see if I can replicate the issue again.
 

KevinFwu

Administrator
Staff member
#9
So the way the plugin operates is that it should only output the message if the define was not defined.

If you are able to see the message again, please refresh the admin. If the message is still there, I'd like to look at the files.
 

Hedloff

Well-Known Member
#10
So the way the plugin operates is that it should only output the message if the define was not defined.

If you are able to see the message again, please refresh the admin. If the message is still there, I'd like to look at the files.
Yes, I got the warning, but check wp-config.php and it was added fine there and I got hit on litespeed cache on the website.

I will contact you if I or customers do get this warning again. Thanks for your help!
 
#11
Just wanted to rapport that I have exactly the same issue.
I just installed the plug in on a danish website, got the error, added wp-config.php to include define('WP_CACHE', true); but the error is still there. There are special characters in danish (ÆØÅ), but not in the domaine name.
I didn't understand most of what is written above this, so probably can't help you any further.

BTW just upgraded to Version 1.0.11, bt is still getting the error.
 

Hedloff

Well-Known Member
#12
I setup a brand new server today with CloudLinux, EA4, PHP 7.0 as native.
I installed WP on mod_userdir url in English and installed newest LiteSpeed cache plugin with WP 4.7 and got this:

LiteSpeed Cache was unable to write to your wp-config.php file. Please add the following to your wp-config.php file located under your WordPress root directory: define('WP_CACHE', true);
 

KevinFwu

Administrator
Staff member
#13
Hedloff,

Could you verify that wp-config.php is there and writable?

If so, could you pm me ssh access to the server and a wp login so I can test it myself?

Thanks,
Kevin
 

Hedloff

Well-Known Member
#14
Hedloff,

Could you verify that wp-config.php is there and writable?

If so, could you pm me ssh access to the server and a wp login so I can test it myself?

Thanks,
Kevin
I just tested on the same server and installed WP on a domain name and setup that in my hosts file and I got no issues there.
So I guess you cache plugin cannot be used on temp urls :(
 

KevinFwu

Administrator
Staff member
#15
I wouldn't say cannot, maybe cannot yet ;)

If I could see how things are set up, I should be able to figure something out.

We need to modify/add three files:
wp-config.php
advanced-cache.php (optional)
and .htaccess

If we cannot modify any of those, errors will pop up.

That said, if the reason for why we cannot modify the file is a simple one, we should be able to accommodate the setup.
 

KevinFwu

Administrator
Staff member
#16
Hedloff,

We just checked this internally. We believe the source of the issue is opcode caching. When you click activate, it first does the activating (we write to the wp-config.php file), then it reloads the page (it checks the wp-config.php file). If you click activate/deactivate quickly enough, eventually it will display the wp-config was not writable message. However, if you then look at the file itself, you will see that WP_CACHE is defined to true.

For whatever reason, this problem is more prevalent when using the mod_userdir setup instead of a regular setup, but it does occur on a regular setup as well.

We will add another check prior to outputting the error to confirm that the file was indeed not writable. Hopefully this will resolve the issue.

Cheers,
Kevin
 
Top