1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To combat forum spam, new accounts will need to make at least one (valid) post.
    Otherwise, we will periodically purge all users without posts or that haven't confirmed their account.

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

Discussion in 'General Support' started by kbc, Apr 12, 2004.

Thread Status:
Not open for further replies.
  1. kbc

    kbc New Member

    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
     
  2. Brian

    Brian EPC Developer Staff Member

    Are you using a flat-file or mySQL database?

    What program are you using to unzip?
     
  3. kbc

    kbc New Member

    Hi -
    I'm using flatfile.
    Winzip to unzip.

    Thanks,
    KC
     
  4. kbc

    kbc New Member

    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.
     
  5. Brian

    Brian EPC Developer Staff Member

    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.
     
  6. Brian

    Brian EPC Developer Staff Member

    Your installation should be working without the error now. :D
     
  7. xcaliber

    xcaliber New Member

    I am having this same problem can you post the solution. I am using mysql

    Thanks You
     
  8. Brian

    Brian EPC Developer Staff Member

    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?
     
  9. Argos

    Argos Jurgen Nijhuis

    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
     
  10. Argos

    Argos Jurgen Nijhuis

    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!!
     
    Last edited: Jun 6, 2004
  11. Brian

    Brian EPC Developer Staff Member

    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:

     
  12. Argos

    Argos Jurgen Nijhuis

    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 :-(
     
  13. Brian

    Brian EPC Developer Staff Member

    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?
     
  14. Argos

    Argos Jurgen Nijhuis

    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
     
  15. Brian

    Brian EPC Developer Staff Member

    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.
     
  16. Argos

    Argos Jurgen Nijhuis

    Yes, I had to enter a name, so I entered the name "table".
     
  17. Brian

    Brian EPC Developer Staff Member

  18. Argos

    Argos Jurgen Nijhuis

    YES!!!!! It works like a charm now!!

    Great Brian, thanks for the support!!
     
  19. Brian

    Brian EPC Developer Staff Member

    No worries! :bigsmiley
     
Thread Status:
Not open for further replies.

Share This Page