Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Textpattern Forms outside of Textpattern
Contents of txp-one.php
<?php define("txpinterface", "public"); include '/home/driz/public_html/www/textpattern/config.php'; include $txpcfg['txpath'].'/publish.php'; ob_start();?>
this is the config file:
<?php
$txpcfg['db'] = 'driz_wordpress';
$txpcfg['user'] = 'driz';
$txpcfg['pass'] = 'HIDDEN FOR THIS EXAMPLE';
$txpcfg['host'] = 'localhost';
$txpcfg['table_prefix'] = '';
$txpcfg['txpath'] = '/home/driz/public_html/www/textpattern';
$txpcfg['dbcharset'] = 'utf8';
?>
Last edited by driz (2008-09-16 18:14:27)
~ Cameron
Offline
Re: Textpattern Forms outside of Textpattern
I take it this has everyone confused? I can’t see what the problem is with the path, and I hope I can get it fixed soon.
~ Cameron
Offline
Re: Textpattern Forms outside of Textpattern
Sorry driz – can’t help you much further with this one – check the control panel or help docs with your host to see if there’s more to the path that you need to include.
Offline
Re: Textpattern Forms outside of Textpattern
driz wrote:
this is the config file:
$txpcfg['db'] = 'driz_wordpress';
!!! x
Offline
Re: Textpattern Forms outside of Textpattern
I was using WordPress before, I decided to call the database wordpress, it hasn’t got any correlation with my errors. x
~ Cameron
Offline
Re: Textpattern Forms outside of Textpattern
Driz,
All I can tell you is to keep troubleshooting the path – I don’t really use this method (outside of my index.php) so I’m afraid you are in uncharted territory. Please be sure to report back if you figure it out.
Offline
Re: Textpattern Forms outside of Textpattern
renobird wrote:
Sorry driz – can’t help you much further with this one – check the control panel or help docs with your host to see if there’s more to the path that you need to include.
Well that is the whole path, it’s working fine with Textpattern, so it’s clearly correct, I wonder why it’s saying it’s incorrect :S
~ Cameron
Offline
Re: Textpattern Forms outside of Textpattern
Are we sure the code is correct? Because if we look at the error it says something about a variable on txp-one.php not being correct?
Warning: include(/home/driz/public_html/www/textpattern/config.php) [function.include]: failed to open stream: No such file or directory in /home/driz/public_html/forum/include/user/txp-one.php on line 1
Warning: include() [function.include]: Failed opening '/home/driz/public_html/www/textpattern/config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/driz/public_html/forum/include/user/txp-one.php on line 1
Notice: Undefined variable: txpcfg in /home/driz/public_html/forum/include/user/txp-one.php on line 1
Warning: include(/publish.php) [function.include]: failed to open stream: No such file or directory in /home/driz/public_html/forum/include/user/txp-one.php on line 1
Warning: include() [function.include]: Failed opening '/publish.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/driz/public_html/forum/include/user/txp-one.php on line 1
Fatal error: Call to undefined function parse() in /home/driz/public_html/forum/include/user/txp-two.php on line 1
~ Cameron
Offline
Re: Textpattern Forms outside of Textpattern
Everything after the the first error is irrelevant. It can’t find the config file – so everything else is going to error out.
I’ve been using that code snippet since ’05 and it def. works. (troubleshoot the path to config. and you will have it.)
Offline
Re: Textpattern Forms outside of Textpattern
Okies fixed the config error with this code, apparently it doesn’t want the /www/ even so my config file uses it for the txp install :S
<?php define("txpinterface", "public"); include '/home/driz/public_html/textpattern/config.php'; include $txpcfg['txpath'].'/publish.php'; ob_start(); ?>
but i’m still having issues with the publish.php file now? I’ve tried using the same path etc but it doesn’t help :S here is the error:
Warning: include(/home/driz/public_html/www/textpattern/publish.php) [function.include]: failed to open stream: No such file or directory in /home/driz/public_html/forum/include/user/txp-one.php on line 1
Warning: include() [function.include]: Failed opening '/home/driz/public_html/www/textpattern/publish.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/driz/public_html/forum/include/user/txp-one.php on line 1
Fatal error: Call to undefined function parse() in /home/driz/public_html/forum/include/user/txp-two.php on line 1
If I try and change my config file to ALSO have no /www/ the forum spits this error instead:
Fatal error: Cannot redeclare escape_cdata() (previously declared in /home/driz/public_html/forum/include/functions.php:48) in /home/driz/public_html/textpattern/lib/txplib_misc.php on line 112
Last edited by driz (2008-09-16 20:19:09)
~ Cameron
Offline
Re: Textpattern Forms outside of Textpattern
include $txpcfg['txpath'].'/publish.php'
If it’s finding the config file, then that should work.
Offline
Re: Textpattern Forms outside of Textpattern
renobird wrote:
include $txpcfg['txpath'].'/publish.php'
If it’s finding the config file, then that should work.
Well the publish.php is linking from the config file, which had the /www/ but taking that away complains about txp_misc :S Please read my previous post it shows the NEW error created. x
Last edited by driz (2008-09-16 20:24:34)
~ Cameron
Offline