php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76961 https://bugs.php.net/vote.php throws a Server Error over ipv6
Submitted: 2018-10-02 15:19 UTC Modified: 2018-11-24 00:30 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:2 of 3 (66.7%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: sjon at hortensius dot net Assigned:
Status: Verified Package: Website problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-10-02 15:19 UTC] sjon at hortensius dot net
Description:
------------
Voting seems broken - vote.php returns a white page for me


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-02 15:48 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-10-02 15:48 UTC] cmb@php.net
Thanks for reporting!
 [2018-10-02 15:51 UTC] cmb@php.net
-Package: *General Issues +Package: Website problem
 [2018-10-23 03:45 UTC] petk@php.net
Automatic comment on behalf of peterkokot@gmail.com
Revision: http://git.php.net/?p=web/bugs.git;a=commit;h=3b0b87e230f278e0db9b04fbbff05a8a7dd55cc6
Log: Fix #76961: bugs.php.net/vote.php throws a Server Error
 [2018-10-23 03:45 UTC] petk@php.net
-Status: Verified +Status: Closed
 [2018-10-23 03:46 UTC] petk@php.net
-Assigned To: +Assigned To: petk
 [2018-10-23 03:46 UTC] petk@php.net
Hello, I think this should now be fixed via above patch. In case this repeats, let us know.
 [2018-11-15 12:47 UTC] sjon at hortensius dot net
Hi petk, thanks for your fix. However, this issue still / again exists
 [2018-11-15 13:43 UTC] cmb@php.net
While being logged out, I just voted on bug 77155, and it worked
as expected.
 [2018-11-15 14:05 UTC] sjon at hortensius dot net
are you sure? Because your vote doesn't show in that bugreport? I tried voting on https://bugs.php.net/bug.php?id=77163 but I get a 500-server-error. There should be an exception logged somewhere accordingly?
 [2018-11-15 14:10 UTC] sjon at hortensius dot net
-Summary: https://bugs.php.net/vote.php throws a Server Error +Summary: https://bugs.php.net/vote.php throws a Server Error over ipv6
 [2018-11-15 14:10 UTC] sjon at hortensius dot net
Maybe this is caused by me using ipv6. The code uses ip2long which doesn't work for ipv6 - also, the schema uses int(10) instead of varbinary(16)
 [2018-11-15 14:15 UTC] cmb@php.net
-Summary: https://bugs.php.net/vote.php throws a Server Error over ipv6 +Summary: https://bugs.php.net/vote.php throws a Server Error -Status: Closed +Status: Re-Opened
 [2018-11-15 14:15 UTC] cmb@php.net
Oops, I've meant <https://bugs.php.net/bug.php?id=77124>.  Before
I voted, there was only a single vote.

Just voted on <https://bugs.php.net/bug.php?id=77163> (also while
being logged out), and it worked fine.

> The code uses ip2long which doesn't work for ipv6 - also, the
> schema uses int(10) instead of varbinary(16) 

Aha!  Re-opening.
 [2018-11-15 14:15 UTC] cmb@php.net
-Summary: https://bugs.php.net/vote.php throws a Server Error +Summary: https://bugs.php.net/vote.php throws a Server Error over ipv6
 [2018-11-24 00:30 UTC] petk@php.net
-Status: Re-Opened +Status: Verified -Assigned To: petk +Assigned To:
 [2018-11-24 00:32 UTC] petk@php.net
I've attached a pull request https://github.com/php/web-bugs/pull/53

This will also require to change the database schema where the ip column is currently integer to a new varbinary(16) type. Additionally current values should be converted accordingly... Maybe someone with server access can give some more pointers this could be approached and fixed.

Thanks.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Dec 10 08:01:24 2018 UTC