Zend Guard 5.1.0 EA & __DIR__ constant

General discussion on Zend Guard / Optimizer

Zend Guard 5.1.0 EA & __DIR__ constant

Postby asdasdzzz on Tue Jun 08, 2010 8:42 pm

Zend Guard 5.1.0 EA does not correctly handle __DIR__ constant.

Simple script (encoded with ZG 5.1.0EA) yields incorrect output for __DIR__:

<?php

echo '<!-- ' .__DIR__ .' ' .__FILE__ .' -->';
die();

?>

When running encoded script on Linux server (script encoded on windows machine) the following output is generated:

<!-- C:\Users\Dmitry\Work\...\public_html /var/www/sites/.../public_html/index.php -->

__FILE__ constant is being handled correctly, but __DIR__ outputs the source directory, where file did reside on windows machine prior to encoding!
asdasdzzz
 
Posts: 1
Joined: Tue Jun 08, 2010 8:40 pm

Re: Zend Guard 5.1.0 EA & __DIR__ constant

Postby kentatzend on Tue Jun 08, 2010 9:14 pm

Thanks for the bug report. I'll have our development organization look into it and see if we can get it fixed for GA.
User avatar
kentatzend
 
Posts: 1781
Joined: Thu Dec 11, 2008 1:08 pm

Re: Zend Guard 5.1.0 EA & __DIR__ constant

Postby michielroding on Thu Jun 17, 2010 2:11 pm

In our case both __DIR__ and __FILE__ point to the source directory, not the actual directory.

Linux, php5.3, ZG 5.1 32-bit.
michielroding
 
Posts: 1
Joined: Thu Jun 17, 2010 2:09 pm

Re: Zend Guard 5.1.0 EA & __DIR__ constant

Postby fiona1985 on Mon Aug 08, 2011 7:53 am

Thanks for the information. I've followed your advice and the problem is over :)
fiona1985
 
Posts: 3
Joined: Mon Aug 08, 2011 7:49 am

Re: Zend Guard 5.1.0 EA & __DIR__ constant

Postby coldstar on Thu Aug 30, 2012 10:54 am

i use Zend Guard 5.5.0,php 5.3.3, found this error again, are you shure fixed the bug?
coldstar
 
Posts: 2
Joined: Thu Aug 30, 2012 10:53 am


Return to Zend Guard / Optimizer

Who is online

Users browsing this forum: No registered users and 8 guests