Page 1 of 2
wp & phpbb both in subfolder
Posted: Wed Jun 01, 2016 10:49 am
by Tizia
Hi. I have a fresh install wp 4.5.2 in: /public_html/lxl and a fresh install phpbb 3.1.9 in: /public_html/forum. Pointing to:
http://www.mysite.it you reach wordpress.
Till now I have done:
1) FROM PHPBB, COOKIE setting
domain: mysite.it
cookie path: /
2) /public_html/forum/includes/FUNCTION.PHP, modified as:
Code: Select all
...
function redirect($url, $return = false, $disable_cd_check = false)
{
global $db, $cache, $config, $user, $phpbb_root_path, $phpbb_filesystem, $phpbb_path_helper, $phpEx, $phpbb_dispatcher;
//attenzione: mie aggiunte 1.6.16
$w3ck = preg_replace('/^[^\.]*\.([^\.]*)\.(.*)$/', '\1.\2',$url);
$w3 = request_var('REMOTE_ADDR','0');
if(stristr($w3ck, $w3)){
$disable_cd_check = true;
}
//fine mie aggiunte
$failover_flag = false;
...
Can you please tell me if the above two steps are correct, while I'm managing on how to do the LAST ONE (Disable open_basedir on php.ini for correct subdomains file inclusion)?
Thanks!
Re: wp & phpbb both in subfolder
Posted: Wed Jun 01, 2016 4:00 pm
by axew3
file modificato ok
cookie setting:
.mysite.it
path to / correct.
Re: wp & phpbb both in subfolder
Posted: Wed Jun 01, 2016 5:23 pm
by Guest
Fine!
So, if everything I did was right, there is only the last step:
3) DISABLE OPEN_BASEDIR in PHP.INI
Asked my hoster, who told me that the "open_basedir is ALREADY DISABLED" and that I don't need to do anything. But when I activate the plugin for the WP_w3all configuration
absolute path: /public_html/forum
URL:
http://www.mysite.it/forum
I receive the WARNING! Wp w3all miss phpBB configuration file... Why?
PS: Looking with Php-selector from my CCpanel I see that open_basedir is set to: no value
http://web22.keliweb.com:2082/mia/php-selector.jpg
Re: wp & phpbb both in subfolder
Posted: Wed Jun 01, 2016 5:44 pm
by axew3
sorry but about open_base dir, it was not necessary to be disabled, as you are not on subdomain, as i understand reading from your examples (or yes, you are on subdomain?):
you mention
mysite.com and mysite.com/forum
that is not a subdomain install, and open_base do not is required to be modified in this scenario
if the path to your forum is correct, and are you sure, can remain:
what your .htaccess on phpBB and WP root contains
Re: wp & phpbb both in subfolder
Posted: Wed Jun 01, 2016 7:15 pm
by Guest
WPress and phpBB are in two different folder in the same domain,
http://www.mysite.it, which point to WPress. Wpress is in: /public_html/lxl while phpBB is in: /public_html/forum
Could you please have a look at thes .htaccess file and tell me if you see something that prevent "W3 for all" to function?
.HTACCESS WORDPRESS /public_html/lxl
Code: Select all
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /lxl/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /lxl/index.php [L]
</IfModule>
# END WordPress
.HTACCESS PHPBB /public_html/forum/.htaccess
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
#
# Uncomment the statement below if URL rewriting doesn't
# work properly. If you installed phpBB in a subdirectory
# of your site, properly set the argument for the statement.
# e.g.: if your domain is test.com and you installed phpBB
# in http://www.test.com/phpBB/index.php you have to set
# the statement RewriteBase /phpBB/
#
#RewriteBase /
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
# The following 3 lines will rewrite URLs passed through the front controller
# to not require app.php in the actual URL. In other words, a controller is
# by default accessed at /app.php/my/controller, but can also be accessed at
# /my/controller
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app.php [QSA,L]
#
# If symbolic links are not already being followed,
# uncomment the line below.
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/
#
#Options +FollowSymLinks
</IfModule>
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
# We could just conditionally provide both versions, but unfortunately Apache
# does not explicitly tell us its version if the module mod_version is not
# available. In this case, we check for the availability of module
# mod_authz_core (which should be on 2.4 or higher only) as a best guess.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfVersion>
<IfVersion >= 2.4>
<Files "config.php">
Require all denied
</Files>
<Files "common.php">
Require all denied
</Files>
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
</IfModule>
<IfModule mod_authz_core.c>
<Files "config.php">
Require all denied
</Files>
<Files "common.php">
Require all denied
</Files>
</IfModule>
</IfModule>
.HTACCESS WORDPRESS
Re: wp & phpbb both in subfolder
Posted: Wed Jun 01, 2016 7:47 pm
by axew3