Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » wrong textpath?

#1 2008-06-08 17:34:56

Luc
New Member
From: Brazil
Registered: 2004-09-21
Posts: 8
Website

wrong textpath?

Which paths do i need to alter in the config file after changing to other hostingcompany?

These are the new path the hosting company uses:
home directory: /home/d38625/ public_html directory: /home/d38625/public_html/

Set up on the server side of textpattern:

/public_html/blog/textpattern

So what do i need to put here:

$txpcfg[‘txpath’] = ‘/home/’;
$txpcfg[‘doc_root’] = ‘/home/’;

I tried the following:
$txpcfg[‘txpath’] = ‘/home/d38625/public_html/blog/textpattern’;
$txpcfg[‘doc_root’] = ‘/home/d38625/public_html’;

But that gives me the following error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/d38625/public_html/blog/textpattern/lib/txplib_db.php on line 106
no page template specified for section default


@dzinelabs

Offline

#2 2008-06-08 19:31:40

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: wrong textpath?

$txpcfg['doc_root'] can go, it isn’t in config.php anymore (look at config-dist.php to see what should be in it, over time some lines were removed).

$txpcfg['txpath'] = '/home/d38625/public_html/blog/textpattern';

This should be fine. Does the error message disappear when you remove the doc_root line? You will also likely have to change these three lines:

$txpcfg['db'] = '...';
$txpcfg['user'] = '...';
$txpcfg['pass'] = '...';

Offline

#3 2008-06-08 21:11:04

Luc
New Member
From: Brazil
Registered: 2004-09-21
Posts: 8
Website

Re: wrong textpath?

Hi Els,

removed $txpcfg[‘doc_root’] and because my tables are set up with ‘latin1_swedish_ci’; i also added $txpcfg[‘dbcharset’] = ‘latin1_swedish_ci’;

but the error still remains the same so i can’t acces my blog.

I’m not a php expert but i went to line 106 of the txplib_db.php file. Found the following code there:

function safe_field($thing, $table, $where, $debug=’‘) { $q = “select $thing from “.PFX.”$table where $where”; $r = safe_query($q,$debug); if (mysql_num_rows($r) > 0) { return mysql_result($r,0); } return false; }

line 106 is:
if (mysql_num_rows($r) > 0) {

Does this shed any light?

TIA


@dzinelabs

Offline

#4 2008-06-08 22:11:43

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: wrong textpath?

Luc wrote:

removed $txpcfg[‘doc_root’] and because my tables are set up with ‘latin1_swedish_ci’; i also added $txpcfg[‘dbcharset’] = ‘latin1_swedish_ci’;

As far as I know it should be just 'latin1'

I’m not a php expert

Neither am I ;) so I am going to move this to Troubleshooting… someone else will no doubt be able to help you.

Offline

#5 2008-06-08 22:14:03

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: wrong textpath?

IIRC, txpath is auto-detected now. The config.php setting for txpath is ignored.
dbcharset should probably be ‘latin1’

Can you log in on the admin side through /textpattern and check the diagnostics tab for errors?

Offline

#6 2008-06-09 18:32:25

brokenumbrella
Member
Registered: 2008-06-09
Posts: 36

Re: wrong textpath?

Wow… I’m having this exact same problem today. Waiting with bated breath. :)

Offline

#7 2008-06-09 19:06:53

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: wrong textpath?

brokenumbrella

(ruud wrote:)

Can you log in on the admin side through /textpattern and check the diagnostics tab for errors?

Offline

#8 2008-06-09 19:09:48

brokenumbrella
Member
Registered: 2008-06-09
Posts: 36

Re: wrong textpath?

I can’t: It looks like my username and password have changed since I switched hosts. I’m not sure how to log in now.

Offline

#9 2008-06-09 20:11:08

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: wrong textpath?

You can try this.

Offline

#10 2008-06-09 21:00:33

Luc
New Member
From: Brazil
Registered: 2004-09-21
Posts: 8
Website

Re: wrong textpath?

Well, my problem is almost solved. It turned out that upon importing my DB, some txp tables and data were lost. I’m in the process of making the tables again from scratch and populating them with the data i had saved.

At the moment my php errors are solved and i can get into the admin section again, after updating my password … but i still get an error on accessing the blog index page: “no page template specified for section default”. Makes sence because i noticed my index template is lost, i.o.w. not imported in the DB. When i try to import it i get an MySql error which i’m working on right now. Or can i add it in the admin section and if so, how? (haven’t done this since 3 years so i’m a bit rusty on textpattern.


@dzinelabs

Offline

#11 2008-06-09 21:11:40

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: wrong textpath?

Luc, should be copy and paste [Edit: Pages -> Default], in case you can retrieve it in the dump you’ll surely have.
If not: what is the MySQL error?

Last edited by uli (2008-06-09 21:14:19)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#12 2008-06-11 01:11:17

Luc
New Member
From: Brazil
Registered: 2004-09-21
Posts: 8
Website

Re: wrong textpath?

Yeah!!!! Solved. The blog is working 100% now. Dumped the pages back into my DB and Bob’s your uncle lol.

But at the admin side there’s something fishy: the image part gives me a CHMOD alert:

Warning: cannot write to image directory
/blog/images.
Please change file permissions to 777.

Problem is: i don’t have that path.

What i have is; mysite.com/blog/textpattern/txp_img…. where do i alter the path ?


@dzinelabs

Offline

  1. Index
  2. » Archives
  3. » wrong textpath?

Board footer

Powered by FluxBB