forum on subdomain little problem.
Posted: 16 October 2007 12:08 AM   [ Ignore ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

hello ,

I’m trying to get my forum to run on the subdomain
http://forum.wugong.fr

after following these instruction :
http://expressionengine.com/knowledge_base/article/run_forum_from_subdomain/

I still get this :
Not Found
The requested URL /home/wugongf/public_html/index.php/forum/forum/ was not found on this server.

Now i did create the sub domain and my trigger word is “forum” and added the line in config.php and the .htaccess stuff :

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

RewriteEngine On
RewriteCond %{HTTP_HOST} forum.wugong.fr
RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^(.*)$ index.php/forum/$1


<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName wugong.fr
AuthUserFile /home/wugongf/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/wugongf/public_html/_vti_pvt/service.grp

I notice in the error page that the url contains two forum at the end would it be the problem ? If so how can i change that ?

Thaks for your help

best regards
zhangfei

Profile
 
 
Posted: 16 October 2007 07:15 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23477
Joined  05-20-2002

I know I had to set mine up differently, as subdomains aren’t handled via htaccess.  Are you using cPanel on your account?  Who’s your host?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 16 October 2007 08:19 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

hello Robin,

my host is mavenhosting, i know that when i created my subdomain the added a folder with the name of the subdomain in my case : “forum”

But i was wondering if nothing was wrong in my .htaccess cause there is some stuff in there i didn’t put don’t know .

Yes i am using Cpanel

Profile
 
 
Posted: 16 October 2007 08:32 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23477
Joined  05-20-2002

Ah- yep, you need to handle things a little differently if it’s a cpanel type subdomain.  Basically- ditch the htaccess changes you made for the forum (and I’ll admit- I’m not dead sure what all is going on there, but let’s ignore the rest of the htaccess for the moment).  Then- follow the instructions for running multiple sites the old school way.  Which basically means- put a copy of path.php and index.php inside the ‘forum’ folder- the subfolder that’s handling the subdomain.  You’ll need to edit path.php so it points to your system folder- generally just need to add an extra dot at the beginning of the relative path, as you’re going up one level to find it now.

Let’s see how close this gets you.

Does it make some sense?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 17 October 2007 12:02 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

hello robin,

So what you said makes sense yes ! wink

Now after doing all this I now get a blank page no error just a blank page I guess in the path.php I must have done something wrong ?

I remove the changes from config.php and .htaccess
copied the index.php and path php into forum folder changed the path.php to that :

<?php

//———————————————————————————
// DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO

//———————————————————————————
// Path to the directory containing your backend files

$system_path = “../system/”;

//———————————————————————————
// MANUALLY CONFIGURABLE VARIABLES
// See user guide for more information
//———————————————————————————

$template_group = “forum”;
$template = “”;
$site_url = “http://www.wugong.fr/forum/”;
$site_index = “index.php”;
$site_404 = “”;
$global_vars = array(); // This array must be associative

?>

and finally change the forum url to the default one : http://www.wugong.fr/index.php/forum

and i get a blank page.

any idea ?

thanks again for the help really appreciated

best regards
zhangfei

Profile
 
 
Posted: 17 October 2007 08:20 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23477
Joined  05-20-2002

Man- I wish I could replicate this, but the test forum I have is no longer on cpanel, so I can’t.

OK- looks like the forum shows at both:
http://forum.wugong.fr/index.php/forum
http://www.wugong.fr/index.php/forum
But not:
http://forum.wugong.fr/index.php/
Given your setup, I suspect the last url is attempting to show the content from a template group called ‘forum’ which I suspect doesn’t exist.

So- for template_group- leave it blank.  And you want to use the subdomain, so change $site_url = “http://www.wugong.fr/forum/”; to reflect that.  And in your forum setup, change the forum url to be http://forum.wugong.fr/

And- check the kblog- ignore the htaccess stuff, but add the config variable to system/config.php as directed.  I think.  And you might skim this entry where I laid out the basics.  Unfortunately, I didn’t include a copy of my path.php file, which would have been helpful.  Once we get this working, I may update that kblog with more detail for the cpanel folks.

But- let’s see where this gets us.  (And I edited your path.php to conceal your system folder name- always a good idea in public posts.)

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 18 October 2007 12:20 AM   [ Ignore ]   [ # 6 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

hello again ,

So it still gets me a blank page ! frustrating since I know it’s probably something minor!

anyway here is my setup :

My forum URL in system forum mudule is :

http://forum.wugong.fr

I added the hidden config line in config.php

in the subdirectory forum : i have index.php and path.php with this :

<?php

//———————————————————————————
// DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO

//———————————————————————————
// Path to the directory containing your backend files

$system_path = “../system/”;

//———————————————————————————
// MANUALLY CONFIGURABLE VARIABLES
// See user guide for more information
//———————————————————————————

$template_group = “”;
$template = “”;
$site_url = http://www.wugong.fr/forum/;
$site_index = “index.php”;
$site_404 = “”;
$global_vars = array(); // This array must be associative

?>

the $site_url point to my subdirectory

now I’m missing something ?

i checked your post with the basics and it seems I did everything in it. But there is something hiding somewhere maybe just to make more fun wink

thanks

best regards
zhangfei

Profile
 
 
Posted: 18 October 2007 12:26 AM   [ Ignore ]   [ # 7 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

the forum is visible from :

http://www.wugong.fr/index.php/forum
but not from
http://forum.wugong.fr/index.php/forum anymore

Profile
 
 
Posted: 18 October 2007 09:07 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23477
Joined  05-20-2002

Dang!  And I repeat, dang!  OK- like you, I suspect it’s some minor little tweaky thing.  Let me get some extra eyeballs on it and see if they can spot it.  And once this is fixed?  I’m adding all the steps to the kblog!

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 19 October 2007 07:09 AM   [ Ignore ]   [ # 9 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

Hello again,

any new idea ?
maybee I should try the htaccess again ? or contact my host ?

thanks again.

best regards

Profile
 
 
Posted: 19 October 2007 10:35 AM   [ Ignore ]   [ # 10 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32768
Joined  05-14-2004

You’re going to need .htaccess for this, as far as I am aware.  You might try removing everything in .htaccess and putting in *only* the rule for the subdomain and see if that works.

 Signature 
Profile
MSG
 
 
Posted: 19 October 2007 09:26 PM   [ Ignore ]   [ # 11 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

hello

OKAY so here goes.

I have tried to put only the EE rewritte rule in my htaccess here it is :

RewriteEngine On
RewriteCond
%{HTTP_HOST} forum.wugong.fr
RewriteCond
%{REQUEST_URI} !index.php
RewriteRule
^(.*)$ index.php/forums/$1

I have tried putting it in my root and the error is the same as the first one can’t find page ....

then I tried putting it in my subdomain directory and I get this when going to http://forum.wugong.fr:

Parse error: syntax error, unexpected ‘&’ in /home/wugongf/public_html/forum/index.php on line 125

Now you might wonder why I get this error it is because in my index.php in the subdirectory I changed :

if ( ! @include($system_path.'core/core.system'.$ext))
{
    
exit("The system path does not appear to be set correctly.  Please open your path.php file and correct the path.");    
}

to this :

error_reporting(E_ALL);
ini_set('display_errors', 1);

if ( ! include(
$system_path.'core/core.system'.$ext))
{
    
exit("The system path does not appear to be set correctly.  Please open your path.php file and correct the path.");    
}

As indicated in this post : http://expressionengine.com/forums/viewthread/60800/P18/


Now I have the hidden config.php value entered as indicated.

I have a subdomain folder containing : index.php and Path.php here goes the path.php :

<?php

// ------------------------------------------------------
// DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO

// ------------------------------------------------------
// Path to the directory containing your backend files

$system_path = "../system/";

// ------------------------------------------------------
// MANUALLY CONFIGURABLE VARIABLES
// See user guide for more information
// ------------------------------------------------------

$template_group = "";
$template = "";
$site_url = http://forum.wugong.fr/
$site_index = "index.php";
$site_404 = "";
$global_vars = array(); // This array must be associative

?>

My system forum module url IS : httP://forum.wugong.fr/

AND finally my forum still shows up at : http://www.wugong.fr/index.php/forum !!!!

NOw I’ve been working on this for 4 days and I’m really tired maybee i’m doing something wrong but every way I try this it doesn’t work !

do you have a solution ?

Profile
 
 
Posted: 21 October 2007 09:04 AM   [ Ignore ]   [ # 12 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6713
Joined  03-23-2006

Hi zhangfei, sorry we’ve been scattered here.  OK, I think we’ll need to take a step back.  But here are a few things.

1) Could you add quotes around your site_url please, and add a semicolon to the end.

$site_url = "http://forum.wugong.fr/";

Let’s see where this takes us.  Server setups are tricky things, and we’ll probably need to start this again with a clean slate.  I have no experience with “cpanel”, but I’ve set up forums in subdomains multiple times with htaccess, and I’m not sure why it wouldn’t work in this instance.

If this were me, I would:
1) Make a full backup
2) Rename the forums folder you created to “old_forum_folder” just to get it out of the way
3) Open system/config.php and confirm that $conf[‘use_forum_url’] = ‘y’; is in there.
4) In the CP, go into Forum Management, Default Preferences.  Under General Settings, confirm that the forum trigger word to “forum” and set the Forum URL to “http://forum.wugong.fr/” (note that these are single words, “forum” and not plural “forumS”)
5) Go back to your first htaccess instructions

RewriteEngine On
RewriteCond
%{HTTP_HOST} forum.wugong.fr
RewriteCond
%{REQUEST_URI} !index.php
RewriteRule
^(.*)$ index.php/forum/$1


If you can do that without the other instructions, then we can try that.

Could you try both adding the quotes and semicolon, and if that doesn’t work, try my 5 point list.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 21 October 2007 09:24 AM   [ Ignore ]   [ # 13 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

hello ,

So after addind the quotes and semicolon I have this error :

Parse error: syntax error, unexpected ‘&’ in /home/wugongf/public_html/forum/index.php on line 125

after the 5 points :
1) didn’t do it
2)done
3)it’s there
4)trigger word = “forum” no S
  URL = “http://forum.wugong.fr”
5)htacces DONE


result :

Not Found
The requested URL /home/wugongf/public_html/index.php/forum/forum/ was not found on this server.

notice the two forum at the end !

erf we are going to make for sure wink some way or the other

thanks for your patience !

best regards
zhangfei

Profile
 
 
Posted: 21 October 2007 09:31 AM   [ Ignore ]   [ # 14 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6713
Joined  03-23-2006

OK.  So what seems to be happening is that your host (actually, cpanel) doesn’t handle URL re-writing quite the same way as most setups.  Robin is the only one of us with Cpanel expertise.  She’s working away on it for you, but for now, I think you’ll need to keep using the URL that is working.

Are you comfortable PMing me FTP access, and creating a control panel account for me to take a look personally?  If so, if you could include the URL of this thread and send it through, I’ll take a look firsthand for you.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 21 October 2007 05:46 PM   [ Ignore ]   [ # 15 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6713
Joined  03-23-2006

zhangfei, check it out now.  You had one minor problem.  Remember earlier you were getting “Parse error: syntax error, unexpected ‘&’ in index.php on line 125”.  Well, it seemed 125 looked like this

&nbsp;&nbsp;&nbsp;&nbsp;exit("The system path does not appear... correct the path.");&nbsp;&nbsp;&nbsp;&nbsp;


and not like this

exit("The system path does not appear... correct the path.");


Those extra &nbsp; make sense in an html document, but where they are inside the PHP were causing errors.  I took them out, and it worked a treat.  I needed to make a few other alterations, which I’ve detailed on Getting a forum subdomain to work on cPanel.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 22 October 2007 01:09 AM   [ Ignore ]   [ # 16 ]  
Grad Student
Rank
Total Posts:  64
Joined  09-14-2007

hello,

YOU ARE THE MAN !! thank you very much and thanks to lisa and of course robin !

EE rocks !

best regards
zhangfei

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64491 Total Logged-in Users: 64
Total Topics: 81034 Total Anonymous Users: 30
Total Replies: 436069 Total Guests: 292
Total Posts: 517103    
Members ( View Memberlist )