fgets() problem

Having trouble installing serendipity?
Post Reply
tnix
Posts: 1
Joined: Fri Jul 18, 2003 12:12 pm

fgets() problem

Post 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.
jhermanns
Site Admin
Posts: 378
Joined: Tue Apr 01, 2003 11:28 pm
Location: Berlin, Germany
Contact:

Post 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?
eternal
Posts: 3
Joined: Thu Jul 24, 2003 5:40 am

Post 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.
mmacfadden
Regular
Posts: 5
Joined: Fri Jul 25, 2003 7:42 pm

Post 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.
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post by tomsommer »

It's been fixed

Thanks :)
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
Post Reply