I am having problems running a php program on my Asustor 302T box which runs fine on my Windows box.
I traced the problem down to a line of code:
$higherValue = 0xFFFFFFFF;
This should be an maximum unsigned int value of 4294967295, but PHP doesn't handle unsigned int so it should convert it to a float when it overflows an int. This is not happening on my Asustor. Instead it is just converting it to a max int value of 2147483647.
I wrote a small php test script:
var_dump(0x00000000);
var_dump(0xFFFFFFFF);
var_dump(0xFFFFFFFE);
On Windows:
int(0)
float(4294967295)
float(4294967294)
On Asustor Linux:
int(0)
int(2147483647) << no overflow to float
int(2147483647) << no overflow to float
Versions:
Windows:
>.\win32\php -c php-win.ini -v
PHP 5.3.15 (cli) (built: Jul 20 2012 00:20:38)
Copyright © 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2012 Zend Technologies
Asustor Linux:
> php -v
PHP 5.3.27 (cli) (built: Jun 24 2014 01:48:44)
Copyright © 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2013 Zend Technologies
How do I get integer overflow working? Do I have a bad build of PHP?
php integer overflow not working
Web hosting, MySQL, PHP and all that good stuff.
Moderator: Lillian.W@AST
-
- Posts: 11
- youtube meble na wymiar Warszawa
- Joined: Fri Jul 11, 2014 11:48 pm
Jump to
- General
- ↳ Announcements
- ↳ Meet and Greet
- ↳ Feature Requests
- ↳ Presales
- ↳ Tips & Tricks
- All about NAS
- ↳ ADM, the OS
- ↳ ADM general
- ↳ [Beta] ADM
- ↳ [Beta] ADM 3.1 for All Series
- ↳ [Official] For AS70XX Series
- ↳ [Official] For AS-60X Series
- ↳ [Official] For AS-30X Series
- ↳ [Official] For AS-20X Series
- ↳ [Official] For AS50xx/51xx Series
- ↳ [Official] For AS61XX/62XX Series
- ↳ [Official] For AS31XX/ AS32XX Series
- ↳ [Official] For AS10XX Series
- ↳ [Official] For AS40XX Series
- ↳ [Official] For AS63XX/64XX Series
- ↳ [Official] For AS52xx/53xx/66xx Series
- ↳ [Official] For AS65xx Series
- ↳ [Official] For AS67xx Series
- ↳ NAS Utilities
- ↳ ASUSTOR Control Center
- ↳ ASUSTOR Download Assistant
- ↳ ASUSTOR Backup Plan
- ↳ Download Center Helper
- ↳ ASUSTOR EZ Connect
- ↳ ASUSTOR Ez Sync
- ↳ Hardware Compatibility
- Apps Unlimited
- ↳ Official ASUSTOR Apps
- ↳ ASUS Webstorage
- ↳ ASUSTOR Portal
- ↳ Avast
- ↳ Boxee
- ↳ Chrome
- ↳ ClamAV
- ↳ DataSync for Dropbox
- ↳ Data Sync for Google Drive
- ↳ DataSync for hubiC
- ↳ Data Sync for OneDrive
- ↳ DataSync for Yandex (Beta)
- ↳ Download Center
- ↳ EZ Sync Manager
- ↳ exFAT Driver
- ↳ FFmpeg
- ↳ File Explorer
- ↳ FTP Explorer
- ↳ Gogs
- ↳ Geo IP DataBase
- ↳ HiDrive Backup
- ↳ DataSync for Onedrive Business
- ↳ Mail Server
- ↳ iTunes Server
- ↳ Linux-Center
- ↳ Media Cast
- ↳ LooksGood
- ↳ Mail-Server
- ↳ Mono
- ↳ Media-pack
- ↳ nodejs
- ↳ OnlyOffice Document Server (Beta)
- ↳ Perl
- ↳ Photo Gallery
- ↳ Radius Server
- ↳ RALUS
- ↳ Ruby
- ↳ Syslog Server
- ↳ Snapshot Center Beta
- ↳ SoundsGood
- ↳ StreamsGood
- ↳ Surveillance Center
- ↳ Subversion
- ↳ phpmyadmin
- ↳ Python
- ↳ Takeasy
- ↳ TomCat
- ↳ UPnP Media Server
- ↳ UPnP Media Server 2
- ↳ Portainer
- ↳ VirtualBox
- ↳ VPN Server
- ↳ Xunlei
- ↳ xorg
- ↳ My Media for Alexa
- ↳ 3rd-party Apps
- ↳ Developer's Corner
- ↳ Cloodtools
- ↳ dislocker
- ↳ Desktop_Engine
- ↳ Fillezilla
- ↳ Gateone
- ↳ Foreign Keyboard Layout
- ↳ HD_Engine
- ↳ Home_assistant
- ↳ Kodi
- ↳ LibCEC
- ↳ Mykodi17
- ↳ myHD
- ↳ Mypyload
- ↳ NZBmegasearcH
- ↳ OpenPlexHome Theater
- ↳ PMP (PlexMediaPlayer)
- ↳ Python
- ↳ Rtorrent
- ↳ Serviio
- ↳ Tailscale-native
- ↳ Xnc-Server
- ↳ aMule
- ↳ Ajaxplorer
- ↳ aria2
- ↳ asunder
- ↳ BaiduPCS (Beta)
- ↳ BicBucStriim
- ↳ BitTorrent Sync
- ↳ BubbleUPnP
- ↳ CouchPotato
- ↳ CrashPlan
- ↳ Deluge
- ↳ Docker
- ↳ Domoticz
- ↳ Dolphin
- ↳ Droidmote
- ↳ Duplicati
- ↳ DVBLink TV Server
- ↳ Entware
- ↳ Eynio Server
- ↳ freeciv
- ↳ Firefox
- ↳ Emby
- ↳ Gallery
- ↳ Gamez
- ↳ Git
- ↳ Gitbucket
- ↳ Headphones
- ↳ Hi-Res Player
- ↳ Hotstar
- ↳ Jackett
- ↳ Jellyfin
- ↳ Jdownloader2
- ↳ Libreoffice
- ↳ Leanote (Beta)
- ↳ Logitech Media Server (Beta)
- ↳ madsonic (Beta)
- ↳ Mame
- ↳ Jeedom
- ↳ mednafen (Beta)
- ↳ Minimserver
- ↳ MongoDb
- ↳ minecraft
- ↳ MiniDLNA
- ↳ Mylar
- ↳ Netdata
- ↳ Nextcloud
- ↳ Nuclear
- ↳ NHome Server
- ↳ NzbDrone
- ↳ NZBGet
- ↳ Odoo-8.0
- ↳ ownCloud
- ↳ OpenPHT
- ↳ optware
- ↳ osTicket
- ↳ QuikFynd
- ↳ Plex
- ↳ Popcorn Time
- ↳ pyLoad
- ↳ qBittorrent
- ↳ Resilio Sync
- ↳ Radarr (Beta)
- ↳ RainLoop Webmail
- ↳ SABnzbdplus
- ↳ SickBeard
- ↳ Subsonic
- ↳ snes9x
- ↳ sonarr
- ↳ Spotify
- ↳ Squid
- ↳ Syncthing
- ↳ transmission
- ↳ Tvheadend (Beta)
- ↳ Twonky (Beta)
- ↳ Teamspeak
- ↳ Ubooquity
- ↳ uTorrent
- ↳ Plex Media Player
- ↳ URL-Pack-NEWS
- ↳ vtigercrm
- ↳ Wonderbox (Beta)
- ↳ Pandora
- ↳ WordPress
- ↳ xCloud
- ↳ Zappiti Server
- ↳ ZurmoCRM
- ↳ Mobile Apps
- ↳ AiCast
- ↳ AiData
- ↳ AiDownload
- ↳ AiFoto
- ↳ AiMaster
- ↳ AiMusic
- ↳ AiRemote
- ↳ AiSecure
- ↳ AiVideos
- Tech Talk
- ↳ Web Hosting
- ↳ Backup and Data Protection
- ↳ Virtualization
- Misc.
- ↳ Archives
- ↳ XBMC