Jump to content

Unable to set config debug to true


Recommended Posts

Hi all, 

I've just put online on my server a new website, and I'm faced with an issue that so far I'm unable to solve. 

I've edited both the wire/config.php and the site/config.php to 

$config->debug = true;

but when I go into Modules to add a new one, I always get this message:

Quote

This install option is configured to be available only in debug mode. To enable, edit file /site/config.php and specify:
$config->debug = true; temporarily …or…
$config->moduleInstall('download', true); to enable always

This issue doesn't appear in my local version, while it shown in my server version. 

I'm currrently unable to figure out any way to overcome this issue (ProcessWire 3.0.174).

Can anyone help me solve this issue? 

  • Like 1
Link to comment
Share on other sites

Maybe you aren't allowed to write changes to site/config.php and need to change read/write settings first.

Double check the changes were submitted to the server and not to your local file. Either log in via SSH or maybe even via WebFTP or something.

Oh... and check if there is a second $config->debug in your site/config.php. If so... delete it.

  • Like 1
Link to comment
Share on other sites

Hi @wbmnfktr, thanks for your reply. 

I do have access via SSH to the server so I could check that the changes were actually submitted. And I checked as well the site/config.php file and there is only one $config->debug line. 

I tried deleting the site/config.php altogher from the server and loading a new copy of the same file and it has worked to some extend, because for example now Tracy started working and appeared at the bottom of my screen (while before, enough though it was enabled, Tracy didn't appear), but I'm still unable to add new modules. 

And this is the first time anything like this happens to me after having built and loaded on servers several PW websites. 

Link to comment
Share on other sites

That's strange. I never ever had any issues like that but I'm only using PW up to version 3.0.165. Maybe the dev-tree needs more attention or something. But that shouldn't be the case if your local setup is the same version.

Which PHP version are you using? Maybe that affects it for some reason.

Have you tried the $config->moduleInstall('download', true); option?

If that doesn't work out as well, you still can upload modules via FTP and yes I know that's not ideal at all.

Link to comment
Share on other sites

1 hour ago, lele_ballack said:

I tried deleting the site/config.php altogher from the server and loading a new copy of the same file and it has worked to some extend, because for example now Tracy started working and appeared at the bottom of my screen (while before, enough though it was enabled, Tracy didn't appear), but I'm still unable to add new modules.

A bit of a wild guess, but maybe there's something messed up in the FileCompiler cache (site/assets/cache/FileCompiler). Cleaning that out and checking that the web server user is the owner might be worth a shot.

  • Like 2
Link to comment
Share on other sites

Hi @wbmnfktr, thanks again for your reply. I tried all the options, even checked via API and the debug property is correctly set to true, So I'm at a loss. FTP is definitely an option, but it's not ideal having to work with others on this project. 

And thanks for your suggestions, @BitPoet! I tried it, but again to no avail.

What I noticed, comparing it to other websites on the same server, is that Tracy is flared up, the bug icon is red in this website. Is there a place where I can check what's the issue that Tracy found? 

Link to comment
Share on other sites

Something seems to be broken somewhere... as I know almost nothing about Tracy a look into the logs is one step and clicking that icon might help.

A screenshot might help others who work with Tracy more often.

What ProcessWire versions are those other sites running?
Can you use the latest master 3.0.165 instead?

Link to comment
Share on other sites

6 hours ago, lele_ballack said:

Tracy is flared up, the bug icon is red in this website. Is there a place where I can check what's the issue that Tracy found

A red bug icon indicates that the site is definitely in debug mode.

I think perhaps you aren't having issues with turning on debug mode, but rather debug mode doesn't allow the PW Upgrade module to download modules. Did you try the $config->moduleInstall('download', true); option to see if that works for you?

Link to comment
Share on other sites

Hi @adrian, thanks for the heads up! I did read all Tracy docs and now I understand much better how it works. There are no main errors showing.  

I did try the $config->moduleInstall('download', true); option, but it didn't work. 

Following up with @wbmnfktr, I tried swicthing back to the last master, but nothing changed whatsoever. I'm still stuck with this issue, and using FTP for the time being, even though it's not ideal in a team environment. What baffles me is that the other websites all have the 3.0.174 and no issues at all! 

Link to comment
Share on other sites

There is something wrong with your setup.
I upgraded my recent project to the latest PW DEV version and still... module install works as expected.

Let me know if you are interested and we can go through a kind of "step by step debug" session.

For details contact me via DM. 

Link to comment
Share on other sites

Hi @Karl_T, thanks for your suggestion. I did check the permission group and the SSH user is already in it. 

Just to dig into it and understand more why there is this issue, I did upload on the server a brand new Processwire Blank installation, and there is exactly the same issue, even though when I log in the banner "This site is in debug mode" appears. I'm truly at a loss about what could be the issue! 

Link to comment
Share on other sites

Eventually managed to solve this issue, even though it leaves me with lots of questions. 

Comparing this website with other fully working websites on the same server, I noticed that the some folders permissions were different. 

In the working websites, the folders assets and modules belonged to the www-data both as user and group, while in this website those folders belonged to the SSH user as a user and to the www-data as a group (to which the SSH user is part). Changing the latter owner settings to www-data, solved this config issue. 

I'm not sure about the reason behind it, but now it all works and able again to add new modules from the front end. 

Thank you all for your help and suggestions! 🙂

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

I've just encountered the same issue. Tried to install a module on a site I had finished about 5 months ago. Tried adding the various config settings, etc.  k07n's suggestion to check the php zip rang a bell. Only then did I see that I was on php 5.x (which I updated to 7.3) and had zip disabled. That did the trick!

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...