Bug#651944: Feedback on the (unreleased) package

2013-04-19 Thread Carsten Pfeiffer
I found another problem:

It seems that Squeeze's php is somehow compiled with built-in oauth support. 
This conflicts with the (re-)definition of the class OAuthException in 
library/OAuth1.php.

The whole thing just doesn't work, in that case. You can verify this by simply 
calling the API http://yourBaseURL/api/account/verify_credentials
It should return 200 and a json object with your user data in case you are 
logged in. Otherwise it's supposed to return 401.

Alas, with the above problem, it always return 200 (but no user object).

If I wrap the class OAuthException in library/OAuth1.php with '!class_exists' 
like this:

if (!class_exists('OAuthException')) {
class OAuthException extends Exception {
  // pass
}
}

it works for me.

Thanks,
Carsten


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201304192317.37781.g...@leonde.de



Bug#651944: Feedback on the (unreleased) package

2013-03-23 Thread Tobias Diekershoff
On Sat, 23 Mar 2013 12:09:36 +0100
Carsten Pfeiffer  wrote:

> Without that, you would get a mail from cron every 10 minutes by
> default...

I have not seen these warnings lately in mails from my cron job so I
guess they got fixed in ~friendica code. But I'll check the logs later
if any recent such warnings are in there.

so long
  Tobias

-- 
   \|/
   O O
/--uUu-/ \-uUu-\
|  \_/   Tobias Diekershoff|
| Web  www.diekershoff.net |
|   @$HOME ... diekershoff.homeunix.net|
| ยต Blog . @$HOME/statusnet/bavatar|
| Jabber . tob...@diekershoff.homeunix.net |
| ~friendica . tob...@diekershoff.homeunix.net |
| PGP-ID . 0x66A73B17  |
\--/


pgpWVwQulo6Cy.pgp
Description: PGP signature


Bug#651944: Feedback on the (unreleased) package

2013-03-23 Thread Carsten Pfeiffer
Am Saturday, 23. March 2013 schrieben Sie:

> > - after that finished, I found a /etc/apache2/conf.d/friendica.conf,
> > which I replaced with the apache2.subdomain.conf from the doc examples
> > directory
> 
> I see did the friendica.conf didn't work? Did you face some error?

No, no error (except for the whitespace in the accept/deny config). AFAIR, it 
contained some comment like "replace this with an appropriate config from 
/usr/share/doc/friendica/examples or something like that. So I had a look and 
found that one more appropriate for my setup. 

> > - the web interface was available, but it showed the installer (is that
> > supposed to happen?)
> 
> Yeah for now it should get you installer. I'm not sure if that can be
> automated may be friendica devs can answer (hint hint Tobias)

AFAIU, it wouldn't show the installer if the generated htconfig.php would have 
been copied to /usr/share/friendica/.htconfig.php (after the database tables 
had been successfully created). Maybe that would even have happened.

> > - installer complained about /usr/share/friendica/.htaccess not being
> > available and not creatable either, so I created the file and made it
> > writable
> 
> Weird I think I fixed in the last week upload to mentors! Did you try
> this with which package?

Ahh, I see the problem now. I did get the package on March 19th (UTC+1)
dget -x 
http://mentors.debian.net/debian/pool/main/f/friendica/friendica_3.1-1.dsc

Your new package was apparently made public a little later, even though it was 
uploaded on March 17th. At least I get a different dsc file, when I download it 
again, now (same version number).
 
So the version I have installed now, is probably 3.1-1 from 2013-01-13 05:19

All those problems that you thought you had fixed, can probably be attributed 
to that.

> > - I manually created the database with /usr/share/friendica/database.sql
> > and finally got friendica up and running
> 
> Uh was the database.sql was missing in installation? I'm not sure what
> might have gone wrong.

No, it was there, but somehow it wasn't applied. After I did this manually, 
the Apache crashes were gone.

> > Then online help didn't work at all (internal server error), I had to
> > remove the symlink /usr/share/friendica/library/markdown.php and replace
> > it with the PHP Markdown Extra "markdown.php" from
> > http://littoral.michelf.ca/code/php-
> > markdown/php-markdown-extra-1.2.6.zip
> 
> The markdown.php on squeeze that might be the reason. I'm not planning
> to target friendica to squeeze as it will be soon old stable.

That was my first thought as well, but I learnt that there are two different 
distributions of that markdown parser. One with an "ExtraParser" class and one 
without.  Debian (both stable and newer versions) packages the one without the 
ExtraParser.

BTW, I found another problem, but I probably need to check whether that's fixed 
with the newer version: the cronjob (poller.php) always reports warnings like

PHP Warning:  Invalid argument supplied for foreach() in 
/usr/share/friendica/include/config.php on line 23
PHP Warning:  Invalid argument supplied for foreach() in 
/usr/share/friendica/include/config.php on line 23
PHP Warning:  Invalid argument supplied for foreach() in 
/usr/share/friendica/include/plugin.php on line 150
PHP Warning:  Invalid argument supplied for foreach() in 
/usr/share/friendica/include/datetime.php on line 456
PHP Warning:  Invalid argument supplied for foreach() in 
/usr/share/friendica/include/socgraph.php on line 357
PHP Warning:  Invalid argument supplied for foreach() in 
/usr/share/friendica/include/poller.php on line 168

(and many more). That's not the fault in the package, but a problem in 
friendica itself. The function q() either returns an array (good) or false 
when something is wrong. Callers of the function only check the result with 
count() and then iterate over it with foreach (which fails when trying to 
iterate over 'false'). All these places would need to be changed to something 
like 
if (is_array($r) && count($r)

Without that, you would get a mail from cron every 10 minutes by default...

> Wonderful! Thank you for taking time to share the problems you faced. I
> will see how I can fix these

Thank you so much for working on the package. Getting such things easily 
installable is why I love Debian :-)

Thanks again,
Carsten


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201303231209.37408.g...@leonde.de



Bug#651944: Feedback on the (unreleased) package

2013-03-22 Thread Vasudev Kamath
On 23:41 Thu 21 Mar , Carsten Pfeiffer wrote:
> Hi,
> 
> thanks a lot for packaging friendica! I was eager to try it out, so I got the 
> source package and built it on a Debian stable box (with some necessary 
> jquery 
> packages from backports).
> 
> Here's some feedback that might be used to improve the package:

Thank you carsten for trying out the package!

> 
> - installation of the package went smooth, it asked for the db
> details, etc.

That is nice!

> - after that finished, I found a /etc/apache2/conf.d/friendica.conf, which I 
> replaced with the apache2.subdomain.conf from the doc examples
> directory

I see did the friendica.conf didn't work? Did you face some error?

> - had to remove a space in the "order allow, deny" option (between allow and 
> deny)

Let me reverify the conf files it was created by tobias

> - the web interface was available, but it showed the installer (is that 
> supposed to happen?)

Yeah for now it should get you installer. I'm not sure if that can be
automated may be friendica devs can answer (hint hint Tobias)

> - installer complained about /usr/share/friendica/.htaccess not being 
> available and not creatable either, so I created the file and made it
> writable

Weird I think I fixed in the last week upload to mentors! Did you try
this with which package?

> - instead of continuing with the installer, I copied 
> /etc/friendica/htconfig.php to /usr/share/friendica/.htconfig.php

I see when you use web installer it gets created.

> - however then apache always segfaulted

Umm.. That is weird!

> - I manually created the database with /usr/share/friendica/database.sql and 
> finally got friendica up and running

Uh was the database.sql was missing in installation? I'm not sure what
might have gone wrong.

> 
> However, some more fixes were needed:
> - uploading a profile picture only resulted in a black image, because some 
> javascripts were not found. I had to create a symlink

I thought I fixed these symlinks but alas I need to look again.

> /usr/share/friendica/cropper/lib/prototype.js to the system installed 
> prototype.js, then remove the directory 
> /usr/share/friendica/library/cropper/lib directory and finally create a 
> symlink 
> /usr/share/friendica/library/cropper/lib to
> /usr/share/friendica/cropper/lib

Weird I will have look again!

> 
> I still found a warning about a type problem in the error log about the 
> profile 
> photo, so I adjusted /usr/share/friendica/mod/profile_photo.php lines 56-59 
> to 
> cast the POST variables to integer values:
> 
> $srcX = (int) $_POST['xstart'];
> $srcY = (int) $_POST['ystart'];
> $srcW = (int) $_POST['xfinal'] - $srcX;
> $srcH = (int) $_POST['yfinal'] - $srcY;
> 
> The javascript console still showed an error in 
> /usr/share/friendica/js/main.js; all accesses to $.someJQuery function or 
> object didn't work. I don't really understand what's going in there (some 
> undesired mangling of '$.'?), but I changed all occurrences of '$.' to 
> 'jQuery.' in js/main.js, so that it looks like this
> 
> $(function() {
> jQuery.ajaxSetup({cache: false});
>  [,,,]
>

Ok Tobias again you need to have a look! Or is the jquery.js modified by
friendica? I prefer it is not to be modified otherwise I need to
duplicate every other js code base in friendica.

> Then online help didn't work at all (internal server error), I had to remove 
> the symlink /usr/share/friendica/library/markdown.php and replace it with the 
> PHP Markdown Extra "markdown.php" from http://littoral.michelf.ca/code/php-
> markdown/php-markdown-extra-1.2.6.zip

The markdown.php on squeeze that might be the reason. I'm not planning
to target friendica to squeeze as it will be soon old stable.

> 
> Finally, everything seems to work :-)

Wonderful! Thank you for taking time to share the problems you faced. I
will see how I can fix these 

Warm Regards
-- 
Vasudev Kamath
http://copyninja.info
Connect on ~friendica: copyninja@{frndk.de | vasudev.homelinux.net}
IRC nick: copyninja | vasudev {irc.oftc.net | irc.freenode.net}
GPG Key: C517 C25D E408 759D 98A4  C96B 6C8F 74AE 8770 0B7E


signature.asc
Description: Digital signature


Bug#651944: Feedback on the (unreleased) package

2013-03-21 Thread Carsten Pfeiffer
Hi,

thanks a lot for packaging friendica! I was eager to try it out, so I got the 
source package and built it on a Debian stable box (with some necessary jquery 
packages from backports).

Here's some feedback that might be used to improve the package:

- installation of the package went smooth, it asked for the db details, etc.
- after that finished, I found a /etc/apache2/conf.d/friendica.conf, which I 
replaced with the apache2.subdomain.conf from the doc examples directory
- had to remove a space in the "order allow, deny" option (between allow and 
deny)
- the web interface was available, but it showed the installer (is that 
supposed to happen?)
- installer complained about /usr/share/friendica/.htaccess not being 
available and not creatable either, so I created the file and made it writable
- instead of continuing with the installer, I copied 
/etc/friendica/htconfig.php to /usr/share/friendica/.htconfig.php
- however then apache always segfaulted
- I manually created the database with /usr/share/friendica/database.sql and 
finally got friendica up and running

However, some more fixes were needed:
- uploading a profile picture only resulted in a black image, because some 
javascripts were not found. I had to create a symlink 
/usr/share/friendica/cropper/lib/prototype.js to the system installed 
prototype.js, then remove the directory 
/usr/share/friendica/library/cropper/lib directory and finally create a symlink 
/usr/share/friendica/library/cropper/lib to /usr/share/friendica/cropper/lib

I still found a warning about a type problem in the error log about the profile 
photo, so I adjusted /usr/share/friendica/mod/profile_photo.php lines 56-59 to 
cast the POST variables to integer values:

$srcX = (int) $_POST['xstart'];
$srcY = (int) $_POST['ystart'];
$srcW = (int) $_POST['xfinal'] - $srcX;
$srcH = (int) $_POST['yfinal'] - $srcY;

The javascript console still showed an error in 
/usr/share/friendica/js/main.js; all accesses to $.someJQuery function or 
object didn't work. I don't really understand what's going in there (some 
undesired mangling of '$.'?), but I changed all occurrences of '$.' to 
'jQuery.' in js/main.js, so that it looks like this

$(function() {
jQuery.ajaxSetup({cache: false});
 [,,,]

Then online help didn't work at all (internal server error), I had to remove 
the symlink /usr/share/friendica/library/markdown.php and replace it with the 
PHP Markdown Extra "markdown.php" from http://littoral.michelf.ca/code/php-
markdown/php-markdown-extra-1.2.6.zip

Finally, everything seems to work :-)

HTH,
Carsten


-- 
To UNSUBSCRIBE, email to debian-wnpp-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201303212341.08258.g...@leonde.de