PDA

View Full Version : v5.3 - Warning: Wrong parameter count for count()


kbc
04-12-2004, 08:40 AM
Hello,
I just installed the v5.3 upgrade.

I get this error:
Warning: Wrong parameter count for count() in listings.php on line 1

Unfortunately, line 1 includes the entire file...

I tried adding at least one event thinking that error was due to having no events, but that didn't do anything. The calendar doesn't appear to show the new event and I get the error just beneath the calendar followed by the box that says "There are no events to display for this time period."

Any ideas?

also fyi: neither v5.2 and v5.3 saved folder setup when unzipping.

Thanks,
KC

Brian
04-12-2004, 08:58 AM
Are you using a flat-file or mySQL database?

What program are you using to unzip?

kbc
04-12-2004, 09:06 AM
Hi -
I'm using flatfile.
Winzip to unzip.

Thanks,
KC

kbc
04-13-2004, 03:15 PM
Hello -
Any solution yet to the error:
Warning: Wrong parameter count for count() in listings.php on line 1

Clearly it's at the end of the file:
if (count($eventTitle,COUNT_RECURSIVE)==0) { $empty=explode("<!--empty-->",$template);if ($empty[1]!="") echo $empty[1];}

but I have no idea what it is or how to fix it...
...anxiously awaiting your reply!

Thanks,
KC

p.s. The unzip is a non-issue.

Brian
04-13-2004, 03:19 PM
Sorry, somehow I overlooked your previous reply... :unsure:

I have been unable to replicate this error. Can you provide a link to the page that is experiencing this problem? I may need FTP access as well.

Please send me a PM with the information and I'll look into it.

Brian
04-13-2004, 10:37 PM
Your installation should be working without the error now. :D

xcaliber
04-15-2004, 12:34 PM
I am having this same problem can you post the solution. I am using mysql

Thanks You

Brian
04-15-2004, 12:38 PM
Removing ",COUNT_RECURSIVE" near the end of listings.php file should stop this error from appearing.

Can you tell me what version of PHP you are using?

Argos
06-06-2004, 09:02 AM
Removing ",COUNT_RECURSIVE" near the end of listings.php file should stop this error from appearing.

Can you tell me what version of PHP you are using?
I have the same problem. I don't see this COUNT_RECURSIVE in the listings.php file though. In fact it's not in any files at all. I just bought your script BTW. Setup is a breeze thus far, but this error stops me now...

I use PHP 4.3.6 and a flat file database. You can find the PHP info on another domain (same account): www.argosmedia.nl/info.php (http://www.argosmedia.nl/info.php)

Argos
06-06-2004, 09:57 AM
By adding a return after each " ; " in the escal.php file, I pinpointed the cause of the error to line 38, which says:

$currentData=stripslashes(fread($handle,filesize($ serverPath."database/".$flatFileName)));


When I change to the SQL setup, the database is made without problems, and the script can connect to it (at least, it says so), but now I get another error:

You have an error in your SQL syntax near 'table WHERE startDate<='2004-6-' AND endDate>='2004-6-01'' at line 1

So, either way, I'm stuck. Allthough I can fiddle around in PHP code a bit, I don't understand much of it, so this is as far as I can get. Please help someone!!

Brian
06-06-2004, 05:36 PM
PHP Version 4.3.6 introduced a new "feature" that is causing this problem. I have modified the code for Version 5.5 of the calendar script to compensate for this.

Expect a release soon. :computer:

I have the same problem. I don't see this COUNT_RECURSIVE in the listings.php file though. In fact it's not in any files at all. I just bought your script BTW. Setup is a breeze thus far, but this error stops me now...

I use PHP 4.3.6 and a flat file database. You can find the PHP info on another domain (same account): www.argosmedia.nl/info.php (http://www.argosmedia.nl/info.php)

Argos
06-06-2004, 05:55 PM
PHP Version 4.3.6 introduced a new "feature" that is causing this problem. I have modified the code for Version 5.5 of the calendar script to compensate for this.

Expect a release soon. :computer:
That's great. Do you have any idea when to expect this update? I use the script on a site for a client, and I would like to be able to tell when the calender feature will be available :-) Any rough estimate would be welcome.

Does this update fix the SQL-version as well? Because that doesn't work either :-(

Brian
06-06-2004, 07:06 PM
I hope the release is ready this week. There is one additional remaining to iron out before it is ready. As for the SQL error, did you have any events in the database or was it empty when this error occurred?

Argos
06-07-2004, 02:46 AM
I hope the release is ready this week. There is one additional remaining to iron out before it is ready. As for the SQL error, did you have any events in the database or was it empty when this error occurred?
Well, I cannot complete setup due to the database error both in flat file and SQL mode, so I am not able to enter events at all yet. So the database is empty.

When setting up in SQL mode I get this error:

You have an error in your SQL syntax near 'table WHERE startDate<='2004-6-' AND endDate>='2004-6-01'' at line 1

Brian
06-07-2004, 09:06 AM
When setting up the SQL connection, did you enter a table name? (You may check the config.inc.php file to confirm.) This is the only way I've seen this SQL error occur.

Argos
06-07-2004, 09:11 AM
When setting up the SQL connection, did you enter a table name? (You may check the config.inc.php file to confirm.) This is the only way I've seen this SQL error occur.
Yes, I had to enter a name, so I entered the name "table".

Brian
06-07-2004, 09:20 AM
"table" is a reserved word in mySQL and shouldn't be used as a name.

See: http://dev.mysql.com/doc/mysql/en/Reserved_words.html

Can you manually edit the config file and change this name? Please let me know if this helps.

Argos
06-07-2004, 09:31 AM
YES!!!!! It works like a charm now!!

Great Brian, thanks for the support!!

Brian
06-07-2004, 01:00 PM
No worries! :bigsmiley