Closed (fixed)
Project:
Taxonomy VTN
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 May 2008 at 13:59 UTC
Updated:
1 Jun 2008 at 09:31 UTC
I have installed on Drupal taxonomy_vtn release 6.2 6.x-1.0-rc1
When I am accesing taxonomy_vtn page,iI am getting this error
warning: ksort() expects parameter 2 to be long, string given in
/var/www/vhosts/---/httpdocs/modules/taxonomy_vtn/taxonomy_vtn.pages.inc on line 61.
Comments
Comment #1
tomaszx commentedHi,
Look in line 61:
where we see string type? is constans only.
Tell me what is your version of php and apache?
Comment #2
greekman commentedI completely agree to your argument,
I suspect old version of PHP on my hosting
PHP Version 4.3.9
Apache/2.0.52
Though,hoster annonced PHP5 before,their techical support reply always with excuse "PHP4 is a global on our server"
But I can't move to another hoster,at least not soon.
Comment #3
tomaszx commentedlook here:
http://pl2.php.net/manual/en/function.setlocale.php
and here:
http://pl2.php.net/manual/en/function.sort.php
Look:
SORT_LOCALE_STRING - compare items as strings, based on the current locale. Added in PHP 4.4.0 and 5.0.2. Before PHP 6, it uses the system locale, which can be changed using setlocale(). Since PHP 6, you must use the i18n_loc_set_default() function.
This look like php < 4.4 is not supported in this things.
I must create dependencies for my module for php version. Thanks for info.
You can probably set php5 n your hosting but in .htaccess file - maybe.
Good luck.
Regards.
Comment #4
greekman commentedI found somewhere this code
if (!defined('SORT_LOCALE_STRING')) { // PHP < 4.4.0 - TODO: remove in 2.0
define('SORT_LOCALE_STRING', SORT_STRING);
}
I pasted in the top of taxonomy_vtn.module
And for me it works now.
Comment #5
tomaszx commentedbut work setlocale for you? proper order? whats language?
thanks for info.
Comment #6
tomaszx commentedI add rc2 release.
This should detect your version of php and turn off setlocale support.
Should be no more errors.
Regards.
Comment #7
greekman commentedThanks a lot,in my case I dont need setlocale support.
Thanks for codework of your module.
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.