Page 1 of 1

fgets() problem

Posted: Fri Jul 18, 2003 12:14 pm
by tnix
Hello,

when i try to install the blog software on a fresh debian-stable system,
I always get this error:

SERENDIPITY_INSTALLATION

Attempting to setup Database...

Warning: Wrong parameter count for fgets() in /home/web/blog.paupau.org/htdocs/serendipity_admin_installer.inc.php on line 142


The last to lines continue endless and apache must be restarted.
Some ideas?

I did not find any link to the dev-mailinglist on
http://sourceforge.net/mail/?group_id=75065
Is the list dead?

Tobias.

Posted: Fri Jul 18, 2003 2:35 pm
by jhermanns
Weird, are you using a fresh cvs version? Sourceforge's anonymous CVS is causing a lot of trouble at the moment. But we are moving to a new location for CVS (/subversion) and the Mailinglists.

So - when did you fetch the sourcecode?

Posted: Thu Jul 24, 2003 5:45 am
by eternal
I just installed it, I however ran into the same roadblock, but I do have a fix :)

in serendipity_admin_installer.inc.php
on line 141 $line = trim(fgets($fp));
this should be $line = trim(fgets($fp, '4096'));

This will fix the problem.

Also, on the newspaper template there is a reference to randomtitle.php, which is not included, and not a realitive url.

Posted: Fri Jul 25, 2003 7:54 pm
by mmacfadden
As for the fgets() problem, I can assume that you are using php 4.1 or earlier. As of php version 4.2, the length argument to fgets is now optional.

string fgets ( resource handle [, int length])

That is the current function spec for php 4.3. If you put a length in it will work. Or you can upgrade to php 4.2 or later.

PS.. I also get the missing randomtitle.php error upon installation.

Posted: Tue Sep 02, 2003 6:49 pm
by tomsommer
It's been fixed

Thanks :)