bug issue when u refresh

Discussion in 'General PHP' started by cyclops4real007, Mar 29, 2017.

  1. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    i see you put a lot of effort in here and i was just trying to return a little bit. hopefully i will be able to do a lot more when knowledge grows.

    i will get to this shortly . im currently trying to add a todo list for admin panel, been at it a while but im learning loads :D

    i have php version 7.1.2 and PHP 5.6.30-0+deb8u1 (cli) (built: Feb 8 2017 08:50:21). i tend to update the debian built-in version as and when it comes out.
     
  2. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    To be honest, I may have fixed that ASC DESC issue before and messiah was in her causing chaos with everybody once he saw that tim did a major overhaul on the script. That invoice section needs a lot of work. When you use the script for 3 years and can't sort it, it's awful. It could be sorted by year and month for example or paid an unpaid.

    I have put enough time into this script and then got no credit for my time and that's why I only work on it when I got time now. I am not going to devote so much time to the script but, I will still help.

    I understand the script a whole lot more than I did when I first started here and that has a lot to do because I retook coding courses last year and then stuff started to click. I still have a lot to learn.

    Do you know where to turn off the password on the sell.php page? I thought it would of been in the admin panel under the auction settings. I used to know where to disable and enable the password. It would make it a lot easier to refresh my screen if the password was disabled.
     
  3. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    I looked for it in the admin panel to turn off the password and I forget where it is to turn off the request for the password on the sell.php page but, I did go to my database and went to settings>usersauth and changed the y to n. It's sad that I had to look at the code on the sell.php page to figure it out how to do rather than waste more time looking for it in the admin panel. I thought that setting should of been in the settings>auction settings in the admin panel but, I don't see it. I will trace the coding and see where it is or where it was and let you know. Turning off that password just makes it easier for running refresh test like this.
     
  4. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    I traced it to the settings>user settings. What a weird place to put that. It's in the Users Authentication selection.
     
  5. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    The version I got off Webid last week doesn't show the fee on the first or second sell.php page. The previous version did right on the bottom right next to the first submit button.

    I can't even run a full test because it gives me an internal 500 error page and won't let me run the 2nd submit.

    This is what my first sell page looked like.

    capture-20170401-210045-vert.jpg

    I will try and see why the internal 500 page is coming up and not letting me submit my sell item. It could be a security block on my end.

    Just a note: No errors are coming up in the admin panel.
     
  6. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    This is the only thing I see in my Google Console Debugger.
    debugger:///VM723 sell.php

    It's not showing a code when I click on it. I will have to do more digging to see what's causing that.
     
  7. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    New note at least on my end: The latest Webid script from Github won't allow us to select a category on the sell page using php 5.4. It has to be 5.5 or higher.
     
    BabyDunk likes this.
  8. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    @renlok Can you please look at the sell.php page and see if you can submit a sell item. It's giving me an internal 500 page on the 2nd confirm.

    I removed all of my .htaccess code and tried it just in case my codes were blocking it and I also tried to use php 7.0 version and it still gave me an the 500 page.
     
  9. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    Well, I found out why I wasn't seeing the fees adding up on the first page. I had to manually go into fees in the admin panel and enable the Enable/Disable Fees. Now I have it set to enable and now I see the fee next to the first submit. The could of been programmed to switch to enable once I added a reserve charge.

    Even though I figured that fee amount not showing issue, I still can't submit the 2nd page without getting a internal 500 page. I've listed in post #26 the only error I could find. Hopefully that can help.
     
  10. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    Hey @david62311 just a wee message to let you know i didn't get a change to look at any of this yet. was busy getting my first project finished with the todo list. i'm well chuffed , it's all finished and submitted to the resources for approval. i am gonna catch some zzzz's now and will get a look when i get up up, you'll probs be hacking away by that time.

    i'll post back asap ;)
     
  11. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    I only work on the Webid Script when I got time. A note on this sometimes we waste time here and it's been updated on the Github site and nobody says anything and we continue to try to solve it and find out later that the issue has been solved.

    It looks like Renlok made a fix for the double charge last January. Check the functionsell.php and the sell.php page changes here. https://github.com/renlok/WeBid/commit/0f4061cab2ab1a79e409d3b8b3a21fcb3ef2788e

    I'm going to take a look at the file changes there too because my previous version from July was working with no problems.
     
  12. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,135
    Likes Received:
    242
    I'm not sure about my issue. It could be something to do with the php version.

    When I switch down to php 5.5 I get a blank page after the final submit.

    When it's in php 5.6 I get an error on the page saying my site can not handle the request and I see this error in the console:
    debugger:///VM3818 sell.php

    I'm not sure if there is supposed to be 3 forward slashes there but, it seems odd to me.

    Anyways, I am stumped. I am going to take a break from trying to work on this and will come back tomorrow. If somebody has the same problem then please let us know. If you can come up with a fix then please share it.

    I did see this note in this link:
    http://php.net/manual/en/debugger-about.php

    About debugging in PHP
    PHP 5.6 is shipped with the phpdbg interactive debugger. PHP versions below 5.6 do not have an internal debugging facility though. You can use one of the external debuggers though. The » Zend IDE includes a debugger, and there are also some free debugger extensions like DBG at» http://www.php-debugger.com/dbg/, the » Advanced PHP Debugger (APD) or » Xdebug.

    User Contributed Notes
    There are no user contributed notes for this page.
     
    Last edited: Apr 3, 2017
  13. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    sometimes u get frustrated u wanna quit, then u remember, someone built it from nothing, life of a programmer
     
  14. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    i seen that @david62311 but that was a different problem, that was a fix for double charge on edit..

    Is there any chance you can up load your core files so i can run them through winMerge and see what the difference is between your version and mine? i have my version updated to 1.2.2.2 now
     
  15. renlok

    renlok Administrator Staff Member

    Joined:
    Oct 20, 2008
    Messages:
    2,858
    Likes Received:
    330
    I had a problem in the past it would load because it could send emails maybe thats it? try disabling emails and try
     
    david62311 likes this.
  16. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    @david62311 on line 99 of sell.php i had to put this to get it post for me, some thing to do with DateInterval function not allowing decimal point in the integer.

    PHP:
                    $start_datetime->add(new DateInterval('P' intval($duration) . 'D'));
     
  17. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    well the bug is two things if refresh after submit

    1. if theres a few u get deducted again
    2. if refresh the auctions keeps multipling
     
    BabyDunk likes this.
  18. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22
    @cyclops4real007 in your database, go to table webid_useraccounts and give column auc_id a UNIQUE constraint. you will not get double fees after that. if i understand it right auc_id should always be a unique integer as each auction has it's own row for fees. the only problem with that is if you have debugging mode enabled you will get a warning when page is refreshed or back button pushed,

    @renlok @david62311 is it sensible to have auc_id in the webid_useraccounts table set to UNIQUE?

    i just need to get my problem sorted now of auction without fees lossing image on refresh or when back button is used.
     
    Last edited: Apr 3, 2017
  19. BabyDunk

    BabyDunk Active Member

    Joined:
    Feb 26, 2017
    Messages:
    279
    Likes Received:
    22

    Nope scrub that, doesn't work you can't edit the auction :( back to the drawing board :)
     
  20. cyclops4real007

    cyclops4real007 Member

    Joined:
    Jan 25, 2017
    Messages:
    147
    Likes Received:
    6
    was gonna say didnt work well i guess u checked it out also
     

Share This Page