Hi everyone, thanks for your interest in
my ajax hack.
I finally got around to upgrading
to 2.3, and I've now updated this hack to v3 which will
work with 2.3. You can find links (I can't post
attachments anymore, not sure why) to the new files on
the first post of this thread.
This problem has
been fixed:
Warning: parse_url() expects parameter
1 to be string, array ....
As has
this one:
"Warning: Invalid argument supplied for
foreach() in /var/www/torrentflux/indexAjax.php on line
858"
If you get anything mentioning headers
already being sent, such as this:
Warning: Cannot modify header
information - headers already sent by (output started at
/var/www/torrent/functionsAjax.php:1745) in
/var/www/torrent/indexAjax.php on line 123
and
you're on Linux, then I think you can solve the problem
by removing the CR/LF (carriage return/line feed) pairs
which are the new line delimiters in most of the
TorrentFlux files, whereas Unix format specifies only
LFs (line feeds) to terminate each line. The extra
character (CR) in the files on Linux causes some output
to be sent which causes the headers to be sent
early.
To convert the CR/LF pairs to only LF for
Linux, you can use a program called tofrodos:
http://www.thefreecountry.com/tofrodos/index.shtmlOr,
as recommended by others in this thread, you can use sed
(sed s/^M$//g -i ...) or tr (run the files through a tr
-d '\r' | grep -v ^$).
Whatever you use, just
make sure you use it on all the *.php files distributed
with TorrentFlux.
If you're still not sure how to
add the ajax entries to the torrentflux database, here
is the SQL for it:
INSERT INTO tf_settings VALUES
('ajax_refresh','5'),('ajax_full_refresh','3600'),('use_ajax','0');
Just
enter that in whatever you use to access your
database.
There's also a patch file for index.php
to add the Ajax functionality to it, in case you have
modified it with other hacks:
index.php.patch