Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: integrate with poll script
maniqui wrote:
Disclaimer: I don’t know what I’m talking about below.
I’m not sure if it’s possible to create another DB connection (to a different DB) from within a TXP website…
Hi Julián,
I think that you can. I have slimstat installed on a different db.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: integrate with poll script
but without db install (textfile), it works fine
<txp:txp_me />
Offline
Re: integrate with poll script
I’m found a nice poll script called Little Poll
it’s simple in setup. I’ve tested it in simple php page, it’s works fine, but in txp it’s dont work(((
(previous script dont work at all)
Can someone test it in own txp? it’s very nice script, and i want to use it..
in header i get an error:
Tag Error: <txp:php> -> Warning: fopen() [function.fopen]: Filename cannot be empty on line 34
Tag Error: <txp:php> -> Warning: fread() expects parameter 1 to be resource, boolean given on line 35
Tag Error: <txp:php> -> Warning: fclose() expects parameter 1 to be resource, boolean given on line 36
Last edited by Katalonian (2010-07-16 10:01:56)
<txp:txp_me />
Offline
Re: integrate with poll script
I’m more than sure, that problem is with paths within scripts. Try to look though their code and change to absolute paths. For ex. insted of include('script.php'); i should use include('/home/userdir/www/script.php'); – you can look how your absolute url looks like in prefs->diagnostic
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: integrate with poll script
No,trouble not in path.
Tag Error: <txp:php> -> Warning: fopen() [function.fopen]: Filename cannot be empty on line 34
global $filename; line 34 in lp_source.php -> $fp=fopen($filename, “r”); line 35 in lp_source.php -> $file_contents=fread($fp,filesize($filename)-1); line 36 in lp_source.php -> fclose($fp);Last edited by Katalonian (2010-07-16 10:41:40)
<txp:txp_me />
Offline
Re: integrate with poll script
Do you have raw php enabled in the preferences?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: integrate with poll script
yes.
<txp:txp_me />
Offline
Re: integrate with poll script
Why are you so sure that problem is not is path? fread() can’t read resourse which should be opened by fopen()
1. find where var $filename is defined and post here it’s value – or add to script debugging output near fopen – print_r($filename);
2. post here path from diagnostic tab
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: integrate with poll script
the_ghost wrote:
Why are you so sure that problem is not is path?
fread()can’t read resourse which should be opened byfopen()
Because i do same thing in other simple php file, all work fine
1. find where var
$filenameis defined and post here it’s value – or add to script debugging output nearfopen–print_r($filename);
// File in which voting scores are kept
$filename = “lplist.txt”;
2. post here path from diagnostic tab
D:\xampp\htdocs\adiu\
<txp:txp_me />
Offline
Re: integrate with poll script
There might be something else… Can we see your diagnostics?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: integrate with poll script
colak wrote:
There might be something else… Can we see your diagnostics?
you mean txp diagnostics?
<txp:txp_me />
Offline
Re: integrate with poll script
colak wrote:
There might be something else… Can we see your diagnostics?
And I ensis that problem is in path – it always happens when you run server under Windows – script may operate with normal slash, but windows handles other slash symbol.
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: integrate with poll script
colak wrote:
There might be something else… Can we see your diagnostics?
this is short diagnostic of txp
and full
<txp:txp_me />
Offline
Re: integrate with poll script
i thing, it’s may be good, if someone try to use this poll in own txp, and see what’s going on…
<txp:txp_me />
Offline
Re: integrate with poll script
I am not familiar to how windows work but the paths in your diagnostics use a backslash to a foreslash. Did you try using the backslashes?
Also I understand that this is a local install. Will you be migrating it online or will you be setting up a server locally?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline