This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.0 » Snow Leopard - longvarchar
Snow Leopard - longvarchar [message #84663] Tue, 01 September 2009 09:20 Go to next message
masterK  is currently offline masterK
Messages: 2
Registered: September 2009
Junior Member
Hello,

i'm using Symfony 1.0.20.

When i start "symfony propel-build-model" i get an error:


[propel-om] + payment_paypal
[propel-om] -> BasePaymentPaypalPeer [builder: SfPeerBuilder]
[propel-om] -> BasePaymentPaypal [builder: SfObjectBuilder]
[phingcall] Unable to return 'affix' for unknown CreoleType:


in the "payment_paypal" description is a "longvarchar" field. When i delete this line all works. On other definitions of classes i have the same problem.


I installed yesterday the new "Snow Leopard" (Apple). Before i installed "Snow Leopard" all works fine.

PHP Version:
PHP 5.3.0 (cli) (built: Jul 19 2009 00:34:29)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies


Re: Snow Leopard - longvarchar [message #84664 is a reply to message #84663 ] Tue, 01 September 2009 09:43 Go to previous messageGo to next message
masterK  is currently offline masterK
Messages: 2
Registered: September 2009
Junior Member
There is a problem with PHP 5.3.0 on Snow Leopard.

The answer of this problem:
Download MAMP and install
cd /usr/bin/
sudo mv php php.backup
sudo ln -s /Applications/MAMP/bin/php5/bin/php php

all works fine Smile
Re: Snow Leopard - longvarchar [message #84719 is a reply to message #84663 ] Wed, 02 September 2009 13:14 Go to previous messageGo to next message
Tharabas  is currently offline Tharabas
Messages: 1
Registered: December 2008
Junior Member
That is not a problem of PHP 5.3 + SL, even though it happend after the update.
It's rather a Creole problem.

Check CreoleTypes.php (usually @ symfony/lib/vendor/creole/CreoleTypes.php)

There the two constants TEXT and LONGVARCHAR are both defined as (int) 17.

At lines 90-116 the creoleMapType array is populated, with the integer-constants as keys.
Both self::TEXT and self::LONGVARCHAR will be assigned a value, their corresponding String values.

But as they are both 17 only one of them can survive ...
Apparently php 5.2.x used to overwrite the early 17 (TEXT) with the later (LONGVARCHAR) and apparently that behaviour has changed with 5.3 so that "LONGVARCHAR" is no longer known as a creoleMapType.

In short: a design flaw @ Creole. Remove the self::TEXT => ... line from the array definition or wait until there is a fix from the creole creators. Wink

- Ben


/bb|[^b]{2}/
Precision is futile! You will be approximated
Re: Snow Leopard - longvarchar [message #84751 is a reply to message #84719 ] Thu, 03 September 2009 06:29 Go to previous messageGo to next message
deej  is currently offline deej
Messages: 2
Registered: September 2009
Junior Member
I'm having the same problem with Creole recognizing Longvarchar and TEXT. I'm using Vista/Wamp5/Symfony 1.0.20. I didn't have this problem in XP until I migrated my project to Vista. I removed the static Longvarchar definition line 111 from CreoleTypes.php but I still get the unable to return 'affix' for unknown Creoletype. Any ideas why?
Thanks
Re: Snow Leopard - longvarchar [message #84896 is a reply to message #84751 ] Sun, 06 September 2009 14:15 Go to previous messageGo to next message
malas  is currently offline malas
Messages: 154
Registered: December 2007
Location: Vilnius, Lithuania
Senior Member
dont remove any lines from CreoleTypes.

just change the const TEXT = 17 an unused digit (i changed it to 30) and LONGVARCHAR will start working as they used to. however i did not tested if the TEXT works after this change.


jaglas.lt - professional web developers.
Re: Snow Leopard - longvarchar [message #85018 is a reply to message #84663 ] Tue, 08 September 2009 23:22 Go to previous messageGo to next message
smeves  is currently offline smeves
Messages: 56
Registered: April 2006
Location: New York, NY
Member
Thank you all for contributing to this thread. It saved me a lot of time. In lib/vendor/creole/CreoleTypes.php I changed

        const TEXT = 17;

to

        const TEXT = 30; //php 5.3.0 fix, using an unused int 


http://stereointeractive.com/images/avatars/stereo_wide_48.png

Stereo :: Interactive & Design
http://stereointeractive.com/blog
Re: Snow Leopard - longvarchar [message #85024 is a reply to message #85018 ] Wed, 09 September 2009 00:41 Go to previous messageGo to next message
deej  is currently offline deej
Messages: 2
Registered: September 2009
Junior Member
Thanks a bunch that fix definitely worked!
Re: Snow Leopard - longvarchar [message #94310 is a reply to message #84663 ] Thu, 25 February 2010 22:36 Go to previous messageGo to next message
Keri Henare  is currently offline Keri Henare
Messages: 1
Registered: May 2008
Location: Auckland, New Zealand
Junior Member

Exactly what I was after. Cheers guys!
Re: Snow Leopard - longvarchar [message #96525 is a reply to message #84663 ] Wed, 31 March 2010 15:19 Go to previous messageGo to next message
Frosty  is currently offline Frosty
Messages: 21
Registered: May 2008
Location: France
Junior Member
Thank you very much ! Smile
icon14.gif  Re: Snow Leopard - longvarchar [message #103227 is a reply to message #84663 ] Thu, 29 July 2010 09:41 Go to previous messageGo to next message
sebwebdev  is currently offline sebwebdev
Messages: 1
Registered: July 2010
Junior Member
Same here on Win 7 and PHP 5.3.2.
Assigning another integer did the trick. Thanks guys!
Re: Snow Leopard - longvarchar [message #103229 is a reply to message #84663 ] Thu, 29 July 2010 10:27 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I should think Propel 1.2.x (as bundled with symfony 1.0) is now out of support, as of course Symfony 1.0 is, but if they are still in active use here, one of you could approach the Propel and Symfony leads to see if you could take over maintainance of the old branches.

This would permit the fix discussed here to get into an "official" Symfony 1.0 download, even if Sensio are no longer the maintainers.


Remember Palestine
Previous Topic:Symfony 1.0 and Oracle 8i
Next Topic:Give me more example
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software