php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23410 bcompiler on windows error
Submitted: 2003-04-29 08:56 UTC Modified: 2003-11-28 19:21 UTC
Votes:5
Avg. Score:3.6 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:4 (100.0%)
From: mike at blueroot dot net Assigned: alan_k (profile)
Status: No Feedback Package: PEAR related
PHP Version: 4.3.1 OS: Win32
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
17 + 33 = ?
Subscribe to this entry?

 
 [2003-04-29 08:56 UTC] mike at blueroot dot net
I am using bcompiler on windows with apache.

PHP version 4.3.1
Apache 1.3.24

I downloaded the php_bcompiler.dll from snaps.php.net

I can compile classes using this code,

$fh = fopen("classes/portfolio.class.phc", "w+");
bcompiler_write_header($fh);
bcompiler_write_class($fh,"Portfolio");
bcompiler_write_footer($fh);
fclose($fh);

no errors are given and the files seem to be generated correctly.

When I try to reload the class using this code I get the error Warning: bcompiler: Read Past End of File repeated many times and then apache crashes.

$fh = fopen("classes/my.class.phc","r");
bcompiler_read($fh);
fclose($fh);

if I use the bcompiler_load function 
ie. bcompiler_load('classes/my.class.phc'); I get the error
Warning: Could not find Magic header in stream


Sorry if this is the same cause as bug 21160.  If it is, when will the dll at snaps.php.net be fixed?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-29 09:08 UTC] arnaud@php.net
yeah, i know, too fast :)
 [2003-04-30 00:27 UTC] alan_k@php.net
can you try the bcompiler.dll included in this - it should be in the Program Files directory.

http://devel.akbkhome.com/gtkmdbdesigner_setup.exe

Regards
Alan
 [2003-04-30 07:26 UTC] mike at blueroot dot net
Same errors.... :(
 [2003-04-30 07:54 UTC] alan_k@php.net
ok - I better look at it then.. :)
 [2003-06-06 04:06 UTC] alan_k@php.net
can you try in  a few days when the snaps has built the latest release


 [2003-06-11 19:10 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-09-15 22:13 UTC] joel at digitallandmarks dot com
This bug is still arround in the current Snap

Has any progress been made addressing it?

Ive worked for days trying to find a work arround to no avail.

Please Help
--Joel
 [2003-11-28 15:57 UTC] yvan dot taviaud at m4am dot net
Hello,

I've experienced the same problem. Thought it was because I transfered files from Linux to Windows, but retransfering the file from Windows to Linux and the script works fine on Linux :o(

Had another error, perhaps it's linked : if I try to include a file, I get the
Warning: bcompiler: unable to open stream
error, and I don't know what this means (so the line where the error occurs is an include/require, whatever it contains in the file).

My bcompiler DLL is the one available on snaps.php.net

So it's very strange, because some class can be compiled, and some other can't ! I use mcrypt and bz2 Libraries, perhaps it may helps ? I'll try it without these 2, and it the results are ok, I'll tell you.

So many bugs then, such as the bcompiler_load() which kills Apache under Win32, but a so wonderful PECL package !! It works under Linux fine, and I love it :o)

HTH, Regards,
Yvan.
 [2003-11-28 18:09 UTC] yvan dot taviaud at m4am dot net
So I tried without bz2 or mcrypt, and PHP just complained about missing bz2, so...

So far I looked to the code of the same bcompiled class, but one with bcompiler 0.4 (Linux Debian), the other one under Windows (the last Stable version available on snaps.php.net, I assume it's 0.5). I can't build the 0.5 under Linux, sorry, I've already post a bug report about it.

bcompiler 0.4 (linux) :
   bcompiler v0.3s????:@   decrypt              ,E@   `?-@       ??&?      get_real_name 

bcompiler 0.5 (windows) :
   bcompiler v0.3sٿwU   decrypt              ??w   ??       ??&?      get_real_name 

The strange thing to me is that both version claim a 0.3 format, but the code isn't the same ! Any kind of idea ?
 [2003-11-28 19:21 UTC] alan_k@php.net
windows and linux bytecodes are not compatible - From what I remember the output for an integer(eg. 01 was b1000001 or something on windows, rather than 00000001 on linux) was very different.
 [2003-12-05 18:04 UTC] yvan dot taviaud at m4am dot net
Hello Alan, thanks for the reply.

I've just thought about compiling the class under windows with the PHP script made under Linux, it seems to work perfectly. So I think I'll compile the class once under Windows, and then use the linux to compress/crypt files (so my class just compress/crypts files, which can be done whatever the OS once the good class has been loaded).

So, thanks a lot Alan, it's a great great lib :o)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC