Problem with back end

Dennnie
Posts: 4
Joined: Wed Aug 03, 2016 2:36 am

Problem with back end

Post by Dennnie »

Hi axew3,

Thank you for your great WP w3all phpbb integration plugin. I've used this plugin for a long time and it always works great, love it.

These days I created a new website using wordpress and phpbb, and downloaded integration plugin ver(1.4.8). However, after uploading the zip to my server and active the plugin, I can't even go into the back end of my website.

And I got an error message like this:
'PHP Warning: include(): Filename cannot be empty in C:\inetpub\wwwroot\wp-content\plugins\wp-w3all-phpbb-integration\wp_w3all.php on line 71
PHP Warning: include(): Failed opening '' for inclusion (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\wp-content\plugins\wp-w3all-phpbb-integration\wp_w3all.php on line 71'.

I'm a PHP beginner. I have tried alot to fix this problem but I failed, I have also read the guides on your website but didn't find any solutions.

Would you please tell me how to save my website?

Thanks!
Denny
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Problem with back end

Post by axew3 »

Hello, it can be fixed in very easy way, np.
To get working your site without problems, you could just delete the plugin from wp-content/plugins folder.
This is not the answer, please follow read, it is just to mention, like the follow right here below:
Or, on 1.4.8, if you have set path to custom phpBB config.php file, comment out the very last line of the file
wp-content/plugins/wp-w3all-phpbb-integration/phpbb/config.php
comment (disable) the last line, prefixing with // chars in this way:

Code: Select all

 //@define('PHPBB_INSTALLED', true);
while to solve the error you report, that is just given by the wrong assignment to the correct file name config.php
Filename cannot be empty
the path to the config.php (the one on phpBB root OR if you have choose manual config the one on
wp-content/plugins/wp-w3all-phpbb-integration/phpbb/config.php as above mentioned, is assigned in this way on wp_w3all.php file lines of code (there are 2 lines on wp_w3all.php file of this):

Code: Select all

$config_file = $_POST["w3all_conf"]["w3all_path_to_cms"] . '/config.php';

You could set manually the path, to the config.php, replacing the include lines on wp_w3all.php, as more below explained, BUT try out before this:

Code: Select all

$config_file = $_POST["w3all_conf"]["w3all_path_to_cms"] . /config.php';
change/substitute with (maybe as you are on windows, and after you have try out this solution, please let me know):
change last slash on these two lines of code on wp_w3all.php file, as windows maybe like:

Code: Select all

 $config_file = get_option( 'w3all_path_to_cms' ) . '\config.php';
this other, is instead another way, but isn't comfortable and not ok due to maintain reasons (you should change it manually any time we go to update wp_w3all) so before, please let me know about the first solution above that should for sure work, so we can patch the wp_w3all code about, for win servers, if it is the problem solution. I work often on win and lnx, so i'm sorry, but i have not get the error, as i use apache on both, while you seem are using a php on win server if i'm not wrong.
Another (not good one) solution:

Code: Select all

$config_file = 'your_absolute_path_to_config\config.php';
Dennnie
Posts: 4
Joined: Wed Aug 03, 2016 2:36 am

Re: Problem with back end

Post by Dennnie »

axew3 wrote:Hello, it can be fixed in very easy way, np.
To get working your site without problems, you could just delete the plugin from wp-content/plugins folder.
This is not the answer, please follow read, it is just to mention, like the follow right here below:
Or, on 1.4.8, if you have set path to custom phpBB config.php file, comment out the very last line of the file
wp-content/plugins/wp-w3all-phpbb-integration/phpbb/config.php
comment (disable) the last line, prefixing with // chars in this way:

Code: Select all

 //@define('PHPBB_INSTALLED', true);
while to solve the error you report, that is just given by the wrong assignment to the correct file name config.php
Filename cannot be empty
the path to the config.php (the one on phpBB root OR if you have choose manual config the one on
wp-content/plugins/wp-w3all-phpbb-integration/phpbb/config.php as above mentioned, is assigned in this way on wp_w3all.php file lines of code (there are 2 lines on wp_w3all.php file of this):

Code: Select all

$config_file = $_POST["w3all_conf"]["w3all_path_to_cms"] . '/config.php';

You could set manually the path, to the config.php, replacing the include lines on wp_w3all.php, as more below explained, BUT try out before this:

Code: Select all

$config_file = $_POST["w3all_conf"]["w3all_path_to_cms"] . /config.php';
change/substitute with (maybe as you are on windows, and after you have try out this solution, please let me know):
change last slash on these two lines of code on wp_w3all.php file, as windows maybe like:

Code: Select all

 $config_file = get_option( 'w3all_path_to_cms' ) . '\config.php';
this other, is instead another way, but isn't comfortable and not ok due to maintain reasons (you should change it manually any time we go to update wp_w3all) so before, please let me know about the first solution above that should for sure work, so we can patch the wp_w3all code about, for win servers, if it is the problem solution. I work often on win and lnx, so i'm sorry, but i have not get the error, as i use apache on both, while you seem are using a php on win server if i'm not wrong.
Another (not good one) solution:

Code: Select all

$config_file = 'your_absolute_path_to_config\config.php';
Thank you for your promptly reply.

Yes, my website is on a windows server.

Here is what I did:

I found 3 lines start with '$config_file':
line 60

Code: Select all

$config_file = $_POST["w3all_conf"]["w3all_path_to_cms"] . '/config.php';
line 66

Code: Select all

$config_file = get_option( 'w3all_path_to_cms' ) . '/config.php';
line 170

Code: Select all

$config_file = get_option( 'w3all_path_to_cms' ) . '/config.php';
I've tried to change the '/config.php' of these three lines to '\config.php', and I got the same error.

Then I found my server's '_SERVER["DOCUMENT_ROOT"]' is 'C:\inetpub\wwwroot', and I changed the '\config.php' of these three lines to 'C:\inetpub\wwwroot\forums\config.php' (forums is the name of my phpbb folder), still got the same error.

Denny
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Problem with back end

Post by axew3 »

Ok please, let all the above for a while, reset wp_w3all to default 1.4.8 files.
search for (there are two) on wp_w3all.php:

Code: Select all

    ob_start();
		 include( $config_file );
    ob_end_clean();
substitute with:

Code: Select all

    ob_start();
		 include 'C:\inetpub\wwwroot\forums\config.php';
    ob_end_clean();
what happen?
Dennnie
Posts: 4
Joined: Wed Aug 03, 2016 2:36 am

Re: Problem with back end

Post by Dennnie »

I changed that and I can not access the back end either, no more php error but got a blank page after logged in.
User avatar
axew3
w3all User
w3all User
Posts: 2883
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: Problem with back end

Post by axew3 »

due to the fact, i assume you are testing on a win server on localhost, i can't access to see what can be still wrong.
Some point as hints for you:

what config.php have you included? if is the config.php on wp_w3all, that you need to edit manually, check for correct values inside it (that need to be the same of phpBB root config.php)

what wp plugins, about users profile/login, you use? Try to disable and check if after with wp_w3all you can login.

From what you report, i can't imagine at moment anything else that can be wrong.
I need in case to install win server with php and try out to check if the same come out.
But should not. Are you using some external login plugin on WP?
Post Reply