|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61941 Compiled script on Win32 wont work on Linux
Submitted: 2012-05-04 18:40 UTC Modified: 2017-01-10 07:59 UTC
Avg. Score:3.5 ± 0.9
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: gug at mail dot ru Assigned:
Status: Suspended Package: bcompiler (PECL)
PHP Version: 5.3.12 OS: Win32+CentOS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: gug at mail dot ru
New email:
PHP Version: OS:


 [2012-05-04 18:40 UTC] gug at mail dot ru
I've compile script at Windows:

<?php echo 'test';

by second script:
$fh = fopen("out.php", "w");
bcompiler_write_file($fh, "test.php");

In Windows, when I open browser and point to http://localhost/out.php i've got correct result - compiled script says "test". It's correct!

BUT if I copy this compiled script in Linux (CentOS el5 x86_64), script opens AS IS! (bcompiler v0.27s ����(test>����(N:\home\localhost\public_html\out.php����n����ine/temp����). Anyway how I've open that: in browser or console (php ./out.php) - its show me file as is.

If compile test.php exactly in destination Linux, out.php will work fine!

And otherwise, if compile at Linux - it's won't work on Windows.

When i've transfer file (SFTP, binary mode), MD5SUM correct in Windows and Linux.

Apache 2.0 Handler 
Thread Safety 	enabled 
PHP API 	20090626
PHP Extension 	20090626
Zend Extension 	220090626
Zend Extension Build 	API220090626,TS,VC9
PHP Extension Build 	API20090626,TS,VC9 
bcompiler version 	1.0.2s 

Apache 2.0 Handler 
Thread Safety 	disabled 
PHP API 	20090626
PHP Extension 	20090626
Zend Extension 	220090626
Zend Extension Build 	API220090626,NTS
PHP Extension Build 	API20090626,NTS 
bcompiler version 	1.0.2s 

Test script:
<?php echo 'test';

Expected result:

Actual result:
bcompiler v0.27s ����(test>����(N:\home\localhost\public_html\out.php����n����ine/temp����


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-05 07:08 UTC]
Sounds likely - You might need to compare the two files using an hex editor to 
find out what is different. The file format should be pretty simple to 
 [2012-05-05 09:26 UTC] gug at mail dot ru
There is:

Seems that they have different header and some else...
 [2012-06-28 10:35 UTC] icukeng at gmail dot com
Looks like your windows box is 32bit and linux box is 64 bit.
binaries will not work on differ arch
 [2012-06-28 11:10 UTC] gug at mail dot ru
Thanks for comment, but linux i386 and Windows 32 have similar problem: compiled at linux wont work on windows and compiled ad windows wont at linux.

But windows have PHP/5.3.10, linux have PHP/5.2.5 - its important?
 [2017-01-10 07:59 UTC]
-Status: Open +Status: Suspended
 [2017-01-10 07:59 UTC]
Suspending this report as the extension have not had a release for almost 6 years.  Please revive this if the extension once again shows life
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Jun 01 02:03:36 2023 UTC