Jump to content


Click here to lend your support to: Traq and make a donation at pledgie.com !
Photo

New, Different Installation Error


  • Please log in to reply
26 replies to this topic

#21 clem67

clem67

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 June 2011 - 07:01 AM

Do you have the JSON encode and decode functions available on your server?


i don't know, where and how can i find it?

#22 Jack

Jack

    Project Founder

  • Administrators
  • 673 posts
  • LocationAustralia

Posted 25 June 2011 - 10:16 AM

Do you have the JSON encode and decode functions available on your server?


i don't know, where and how can i find it?


Create a file on the server and place this code in it:

if (function_exists('json_encode')) {
print "json_* functions found.";
} else {
print "no json functions found";
}
?>


Go to the address you have it at on the server (yourdomain.com/jsontest.php for example) and if you have the json_encode/decode functions it should say "json_* functions found".


#23 codemate

codemate

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 26 June 2011 - 08:06 PM

Hi Jack,

I had same problem with JSON enabled and magic_quotes_gpc overridden to Off. Although as a bit lazy on Sunday evening - I just specified connection variables in /system/libraries/db.class.php and this made the issue go away :D

Although if you wan't to solve it properly - have a look at my phpinfo - this might put you on the track ;)

http://www.codemates.co.uk/phpinfo.php

#24 universum

universum

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 07 December 2011 - 12:31 AM

json_encode and json_decode is not supported in PHP until PHP 5.3.0 (well, at least not with the options-parameter that is used in the traq code)
A work-a-around is to copy the magic quotes stuff earlier in this thread that Jack posted, and also replace all json_encode with serialize, and all json_decode with unserialize.

That worked perfectly for me and I'm running PHP 5.2.11

#25 Jack

Jack

    Project Founder

  • Administrators
  • 673 posts
  • LocationAustralia

Posted 07 December 2011 - 10:34 AM

json_encode and json_decode is not supported in PHP until PHP 5.3.0 (well, at least not with the options-parameter that is used in the traq code)


Traq doesn't use the options parameter for json_encode or json_decode at all.

#26 universum

universum

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 07 December 2011 - 06:41 PM

json_encode and json_decode is not supported in PHP until PHP 5.3.0 (well, at least not with the options-parameter that is used in the traq code)


Traq doesn't use the options parameter for json_encode or json_decode at all.


Oh, sorry. I got it all wrong. I mixed it upp with the assoc-parameter which is used in the code. I'm not sure what went wrong for me then, cause I think it was those json-lines with the assoc-parameters that screwed it up for me (but I'm not 100% sure). And yes, I had json enabled on the webservers (json version 1.2.1) PHP-installation.

Anyhow it worked perfectly when I replaced the json-commands with serialize and unserialize, and that's the important thing to point out for users who have installation problems.

Edit: If you check the changelog for PHP 5: http://php.net/ChangeLog-5.php you will see that there has been some bugs with json-commands. That's probably the explanation, somewhere there was a bug with json that was corrected somewhere after PHP 5.2.11

#27 hyperclock

hyperclock

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 14 April 2012 - 07:11 PM

I know this forum is a bit older, but i was also having problems with this issue. I am using a free hosting site that has magic_quotes_gpc on.

I tested a lot of what is in the forum, but nothing seemed to work. After about 2 hours of testing and trying, I rememered the php_flag thing - so my solution was creating an .htacess file and putting ==> php_flag magic_quotes_gpc Off <==
into that file. (keeping the install/index.php file original)

This now works fine.

I thought I'd post this as an easy solution in case somebody needs this again.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users