{"action":"created","issue":{"url":"https://api.github.com/repos/spotweb/spotweb/issues/100","repository_url":"https://api.github.com/repos/spotweb/spotweb","labels_url":"https://api.github.com/repos/spotweb/spotweb/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/spotweb/spotweb/issues/100/comments","events_url":"https://api.github.com/repos/spotweb/spotweb/issues/100/events","html_url":"https://github.com/spotweb/spotweb/issues/100","id":114803930,"number":100,"title":"Spot filesize >2GB problem with 32bit PHP 5.6 (and maybe others)","user":{"login":"mbirth","id":130302,"avatar_url":"https://avatars.githubusercontent.com/u/130302?v=3","gravatar_id":"","url":"https://api.github.com/users/mbirth","html_url":"https://github.com/mbirth","followers_url":"https://api.github.com/users/mbirth/followers","following_url":"https://api.github.com/users/mbirth/following{/other_user}","gists_url":"https://api.github.com/users/mbirth/gists{/gist_id}","starred_url":"https://api.github.com/users/mbirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbirth/subscriptions","organizations_url":"https://api.github.com/users/mbirth/orgs","repos_url":"https://api.github.com/users/mbirth/repos","events_url":"https://api.github.com/users/mbirth/events{/privacy}","received_events_url":"https://api.github.com/users/mbirth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spotweb/spotweb/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-03T12:19:48Z","updated_at":"2016-04-03T09:28:11Z","closed_at":null,"body":"I have Spotweb running on a Raspberry Pi 2 (32bit) and since the migration from my 64bit Atom, I noticed that all spots larger than 2GB are always listed as 2GB only. So even a 8GB spot would show up as \"2 GB\" in the spots list or details.\r\n\r\nToday I looked into that. I first checked the database and it already contained PHP_INT_MAX (2<sup>31</sup> = 2,147,483,648 = 2 GB) instead of the real value, although the database field was BIGINT. I traced the problem back to the [Dao_Base_Spot.php::addSpots()](https://github.com/spotweb/spotweb/blob/master/lib/dao/Base/Dao_Base_Spot.php#L429) method and the PDO batch insert.\r\n\r\nIt seems that `PDO::PARAM_INT` can't handle BIGINTs. [This comment on the PHP page](http://php.net/manual/en/mysqli-stmt.bind-param.php#89544) suggests using `PDO::PARAM_STR` instead.\r\n\r\nAfter making the change, I now see spots with larger sizes than 2GB again."},"comment":{"url":"https://api.github.com/repos/spotweb/spotweb/issues/comments/204923673","html_url":"https://github.com/spotweb/spotweb/issues/100#issuecomment-204923673","issue_url":"https://api.github.com/repos/spotweb/spotweb/issues/100","id":204923673,"user":{"login":"mesa57","id":6350469,"avatar_url":"https://avatars.githubusercontent.com/u/6350469?v=3","gravatar_id":"","url":"https://api.github.com/users/mesa57","html_url":"https://github.com/mesa57","followers_url":"https://api.github.com/users/mesa57/followers","following_url":"https://api.github.com/users/mesa57/following{/other_user}","gists_url":"https://api.github.com/users/mesa57/gists{/gist_id}","starred_url":"https://api.github.com/users/mesa57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mesa57/subscriptions","organizations_url":"https://api.github.com/users/mesa57/orgs","repos_url":"https://api.github.com/users/mesa57/repos","events_url":"https://api.github.com/users/mesa57/events{/privacy}","received_events_url":"https://api.github.com/users/mesa57/received_events","type":"User","site_admin":false},"created_at":"2016-04-03T09:28:11Z","updated_at":"2016-04-03T09:28:11Z","body":"Tested on a win32 environment with php 5.6.16, mysql 5.6, pdo_mysql : 5.0.11-dev\r\nProblem is not reproducable. I am going to mark this issue the same, and if not commented on, close it."}}