Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: How do I create a subdomain for developing?
Can you post the contents of your config.php paths (just change the username before posting), along with the paths in Admin?
And diagnostics would also help.
Offline
Re: How do I create a subdomain for developing?
config.php from the new TxP install (in the JP folder of public_html);
$txpcfg[‘db’] = ‘cibnetjp’;
$txpcfg[‘user’] = ‘xyz’;
$txpcfg[‘host’] = ‘localhost’;
$txpcfg[‘table_prefix’] = ‘’;
$txpcfg[‘txpath’] = ‘/users/home/xyz/domains/creativityinbusiness.net/public_html/jp/textpattern’
admin paths;
site URL; jp.creativityinbusiness.net
temp directory; /users/home/xyz/domains/creativityinbusiness.net/public_html/jp/textpattern/tmp
file directory; /users/home/xyz/domains/creativityinbusiness.net/public_html/jp/files
diagnostics (the bit I assume is relevant);
Document root: /users/home/xyz/domains/creativityinbusiness.net/public_html
$path_to_site: /users/home/xyz/domains/creativityinbusiness.net/public_html
Textpattern path: /users/home/xyz/domains/creativityinbusiness.net/public_html/jp/textpattern
Permanent link mode: section_title
upload_tmp_dir: /usr/local/www/php/tmp
Temporary directory path: /users/home/xyz/domains/creativityinbusiness.net/public_html/jp/textpattern/tmp
Site URL: jp.creativityinbusiness.net
I can see that Document root: and $path_to_site: refer to the original path – but I don’t know how to change them – or even if I should.
Offline
#15 2007-12-27 12:40:36
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: How do I create a subdomain for developing?
Yusoshi
can you take a look in your .htaccess file in /users/home/xyz/domains/creativityinbusiness.net/public_html/ and also the /jp/ subdir. What do the RewriteBase
lines look like?
— Steve
Offline
Re: How do I create a subdomain for developing?
yusoshi wrote:
Document root: /users/home/xyz/domains/creativityinbusiness.net/public_html
$path_to_site: /users/home/xyz/domains/creativityinbusiness.net/public_html
These two are pointing to the main domain, not the sub-domain. Go to Preferences > Advanced and change it to:
/users/home/xyz/domains/creativityinbusiness.net/public_html/jp/
Offline
#17 2007-12-27 13:31:17
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: How do I create a subdomain for developing?
Jonathan
AFAIK, there isn’t an option in there to do that.
Yusoshi
You will probably need to use myphpadmin phpMyAdmin to edit the txp_prefs table and change the path in the ‘path_to_site’ row.
Last edited by net-carver (2007-12-27 13:33:02)
— Steve
Offline
Re: How do I create a subdomain for developing?
Correct Steve. I thought the path_to_site was in Advanced, but that is the file and tmp directory paths. Path to site should be set in config.php, no?
Offline
#19 2007-12-27 14:17:59
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: How do I create a subdomain for developing?
Jonathan
Maybe it is on initial setup. But there is definitely a row in the preferences table for it and it that row gets expanded as path_to_site
in the diagnostics tab. As Yusoshi seems to have already configured his config.php with the correct path I — yet the diagnostics don’t echo that change — I’d say it’s not been changed in the DB by that edit.
In one of my own Txp site installation scripts, I have to make a similar change to the path_to_site
row in the txp_prefs
table.
Edited for clarity.
Last edited by net-carver (2007-12-27 14:20:39)
— Steve
Offline
Re: How do I create a subdomain for developing?
I’m think I’m getting out of my depth now – I managed to figure out how to use phpMyAdmin to change the path_to_site so now diagnostics read;
Document root: /users/home/xyz/domains/creativityinbusiness.net/public_html
$path_to_site: /users/home/xyz/domains/creativityinbusiness.net/public_html/jp
Textpattern path: /users/home/xyz/domains/creativityinbusiness.net/public_html/jp/textpattern
Which seems a bit more logical, however I now get these error messages;
/users/home/xyz/domains/creativityinbusiness.net/public_html/jp/index.php is inaccessible
Image directory is not writable: /users/home/xyz/domains/creativityinbusiness.net/public_html/jp/images
.htaccess file is missing
So now I’m probably getting deeper into the smelly stuff.
FYI; the RewriteBase line in the .htaccess file in the public_html directory say; #RewriteBase /relative/web/path/ – does the hash mean it’s commented out?
There isn’t an .htaccess file in the /jp directory – the instructions above didn’t say to create one – is that the problem?
BTW – I also have this error; Some Textpattern files have been modified: /publish/comment.php – I had this before, after the db export and import (as above) but I don’t use comments on the site so I figured I could ignore this error for now
Offline
#21 2007-12-27 14:24:10
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: How do I create a subdomain for developing?
Yusoshi
Don’t panic — I think you’re almost there! Basically you now need to move your .htaccess
file from the original location into the /jp/ sub-folder.
FYI; the RewriteBase line in the .htaccess file in the public_html directory say; #RewriteBase /relative/web/path/ – does the hash mean it’s commented out?
Yes, that’s correct.
— Steve
Offline
#22 2007-12-27 14:33:07
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: How do I create a subdomain for developing?
Yusoshi
Image directory is not writable: /users/home/xyz/domains/creativityinbusiness.net/public_html/jp/images
Sorry, forgot to say you’ll need to make your images directory writable if you want to upload images. So just use SFTP or SSH to go to the mentioned directory and chmod 777 on it.
— Steve
Offline
Re: How do I create a subdomain for developing?
OK – cracked it. Thanks to both of you for your help.
The problem seems to have been this; when I read ‘copy your TxP install into the sub domains folder’, what I did was copy the textpattern folder. What I should have done is copy the textpattern folder, the .htaccess file and the index.php file. Just in case, I’ve copied the content of the images folder as well (Files was empty anyway) … and now done the chmod to 755 (edit).
Is there anything else I have to copy? It does seem to be working now. I’ll worry about the comments.php file later.
Last edited by yusoshi (2007-12-28 09:27:33)
Offline
#24 2007-12-27 14:45:00
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: How do I create a subdomain for developing?
Yusoshi wrote:
Thanks to both of you for your help.
どういたしまして。
Is there anything else I have to copy?
You should copy the /files/ folder over too, even if it’s empty.
おやすみなさい。
— Steve
Offline