[FLOW3-general] "Encoding declaration pragma" when creating package

Michael Sauter mail at michaelsauter.net
Wed May 5 13:18:12 CEST 2010


On 05.05.10 09:52, Peter Lind wrote:
> On 5 May 2010 07:27, Søren Malling<soren.malling at gmail.com>  wrote:
>> Hi,
>>
>> Just checked out the newset flow3 data from subversion and tried to
>> create a new package but gets the following error
>>
>> ./flow3 kickstart package photodatabase
>>
>> Fatal error: Encoding declaration pragma must be the very first
>> statement in the script in
>> /Users/sorenmalling/Sites/flow3/Packages/Framework/FLOW3/Classes/Core/Bootstrap.php
>> on line 2
>>
>> These are the very first lines of Bootstrap.php
>>
>> <?php
>> declare(ENCODING = 'utf-8');
>> namespace F3\FLOW3\Core;
>>
>
> Only thing that comes to mind is: have you checked the file itself? I
> know this issue is old, but you might be looking at something like:
> http://bugs.php.net/bug.php?id=22108

Nope, the problem is something different. I had the same issue a while back.

The PHP bundled with Snow Leopard is compiled with 
--enabled-zend-multibyte and that causes problems with declare(). This 
has been fixed in PHP 5.3.2, but Snow Leopard uses PHP 5.3.1.

I would suggest installing PHP 5.3.2 via MacPorts, that's what I did 
(it's worth the effort because then you are able to decide when to 
update your PHP environment and are not dependent on the OS)

More information can be found at:
http://flow3.typo3.org/documentation/manuals/flow3/flow3.installingphp53/
http://michaelsauter.net/blog/2010/04/05/php-environement-with-macports/

Hope this helps,
~michael


More information about the FLOW3-general mailing list