1.2.1 sell.php Error

Discussion in 'General Support' started by Transjob, Jan 5, 2018.

  1. Transjob

    Transjob New Member

    Joined:
    Jan 5, 2018
    Messages:
    1
    Likes Received:
    0
    Hello,

    i want add a new auction and after i add all infos and i click on Submit is coming a new page:

    This page does not work
    can not handle this request right now.
    HTTP ERROR 500

    some helps? Ideas??

    rgds Danilo
     
  2.  
  3. hhavatar

    hhavatar Donor Donor

    Joined:
    Jul 28, 2014
    Messages:
    747
    Likes Received:
    74
    What does the error log say?
     
  4. Krunch

    Krunch New Member

    Joined:
    Aug 12, 2018
    Messages:
    7
    Likes Received:
    0
    I have been getting the same message. If I try to modify am auction, after pressing submit I am greeted with this page.

    Where is the log file located? I think it had to do with the token expiring, or too many windows open.
     
  5. nay27uk

    nay27uk Super Moderator Staff Member

    Joined:
    Nov 24, 2009
    Messages:
    5,558
    Likes Received:
    542
    In Webid Admin click the TOOLS TAB and it is the first page that opens
     
  6. pskura

    pskura New Member

    Joined:
    Nov 24, 2018
    Messages:
    3
    Likes Received:
    0
    Hello,
    I'm facing the same problem on mint installation of WeBid.

    I already solved this:
    Warning [2] A non-numeric value encountered on /home/protrad1/auction.protradecommodities.uk/select_category.php line 33
    by changing 'box' to 'cat_no' in line 33.

    Now I can go all the way through to creating an auction, then after clicking "Submit auction" it returns blank page.

    Any ideas?
     
  7. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,098
    Likes Received:
    235
  8. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,098
    Likes Received:
    235
    @pskura The blank page is probably a 500 Error. I think I fixed that blank issue problem too.

    Try this: Go into your cpanel and
    • find select PHP Version.
    • Select Switch To PHP Options
    • Turn display_errors on and select save. Note: You will need to reverse this step after you are done testing. You shouldn't want the public to see the errors.
    After you turn on the display errors, try to sell something and get back to where you saw the blank page. Then see if there is an error reported there and let us know what the error is minus your sensitive information like your server and Website info.

    Make sure you clear your cache while running the test or you might not see any difference.
     
    Last edited: Nov 26, 2018
  9. pskura

    pskura New Member

    Joined:
    Nov 24, 2018
    Messages:
    3
    Likes Received:
    0
    Hi @david62311 ,
    Thanks for replying.
    I already followed #4. Sell Blank page and fixed the code at line 33, so I can select categories.

    As to PHP, it seems like there's no such option. I'm using PHP 7.2 and these are available options:
    apcu imagick newrelic posix tidy
    bcmath imap oauth propro timezonedb
    brotli inotify oci8 pspell trader
    dba interbase odbc raphf uploadprogress
    dbase intl opcache redis uuid
    dom ioncube_loader pdf snmp vips
    eio json pdo soap wddx
    enchant ldap pdo_dblib sockets xdebug
    fileinfo lzf pdo_firebird sodium xmlreader
    gd mailparse pdo_mysql sourceguardian xmlrpc
    gender mbstring pdo_oci sqlsrv xmlwriter
    geoip memcache pdo_odbc ssh2 xsl
    geos memcached pdo_pgsql stats yaf
    gmagick mongodb pdo_sqlite swoole yaml
    gnupg mysqli pdo_sqlsrv sysvmsg zip
    grpc mysqlnd pgsql sysvsem zmq
    http nd_mysqli phalcon3 sysvshm
    igbinary nd_pdo_mysql phar tideways

    WeBid log shows no errors and the auction still goes to blank screen (most likely 500).

    Try registering a test account and adding a random auction, let me know what happened: https://auction.protradecommodities.uk.
     
  10. pskura

    pskura New Member

    Joined:
    Nov 24, 2018
    Messages:
    3
    Likes Received:
    0
    Here's the error:
    Fatal error: Uncaught Exception: DateInterval::__construct(): Unknown or bad format (P1.00D) in /home/protrad1/auction.protradecommodities.uk/sell.php:99 Stack trace: #0 /home/protrad1/auction.protradecommodities.uk/sell.php(99): DateInterval->__construct('P1.00D') #1 {main} thrown in /home/protrad1/auction.protradecommodities.uk/sell.php on line 99

    This is the line of code in sell.php, line 99:
    $start_datetime->add(new DateInterval('P' . $duration . 'D'));
     
  11. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,098
    Likes Received:
    235
  12. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,098
    Likes Received:
    235
    It's very odd that have the old code on my sell.php page. I just unzipped all new files and did a semi-fresh install of what was on Github. I can't believe when I extracted it that my old sell.php page didn't get replaced.

    Try this solution that I found on Github from BabyDunk:

    BabyDunk commented on Apr 4, 2017

    On line 99 of sell.php, we have a problem . DataInterval only allow integers but for the auction duration we use floats to get parts of a day.

    This does work, a simple fix is to change this
    PHP:
    $start_datetime->add(new DateInterval('P' $duration 'D'));
    To this
    PHP:
    $start_datetime->add(new DateInterval('P' intval($duration) . 'D'));
    Try this and let us know if that worked so, it could help others that might be seeing the same problem.
     
  13. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,098
    Likes Received:
    235
    I made a mistake. I was looking at the wrong sell.php page that I had on my server. That code was definitely outdated. Here's the latest code I have and it matches up to BabyDunk's code and mine is currently working.

    PHP:
                // finalize start and end times
                
    $a_starts = (empty($start_now) || !$caneditstartdate) ? $a_starts $dt->currentDatetime();
                if (
    $custom_end == 0) {
                    
    $start_datetime = new DateTime($a_starts$dt->timezone);
                    
    $start_datetime->add(new DateInterval('P' intval($duration) . 'D'));
                    
    $a_ends $start_datetime->format('Y-m-d H:i:s');
                }
     

Share This Page