MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: WISTFUL on 2013-02-22, 09:54:51

Title: Compile PHP with JSON enabled
Post by: WISTFUL on 2013-02-22, 09:54:51
JSON needs to be compiled into my php build in order for WHMCS to function correctly.
How can I do that?
Title: Re: Compile PHP with JSON enabled
Post by: WPF on 2013-02-22, 11:13:38
Quote from: "WISTFUL"
JSON needs to be compiled into my php build in order for WHMCS to function correctly.
How can I do that?
Why ?? Test mod-php
Title: Re: Compile PHP with JSON enabled
Post by: MRatWork on 2013-02-22, 11:23:22
You can check json enable or diable via phpinfo().

Usually, this module already enable/include on php main package.
Title: Re: Compile PHP with JSON enabled
Post by: WISTFUL on 2013-02-22, 11:25:28
Quote from: "INDTEAM"
Why ?? Test mod-php
For widgets on the Home page, otherwise income loading issue appeared!
Quote from: "MRatWork"
You can check json enable or diable via phpinfo().
When I try phpinfo(), I can see '--disable-json' on my "Configure Command" section but json support is enabled on "json" section.
Title: Re: Compile PHP with JSON enabled
Post by: MRatWork on 2013-02-22, 11:38:55
Hi.

You must learn what's different things between '--with', '--without', '--enable' and '--disable' when compile rpm. Googling about rpmbuild topic.

About json, you can see inside '/etc/php.d' for json.ini exist or not. Try rename json.ini to json.nonini and check again with phpinfo(). You will see what's different info.
Title: Re: Compile PHP with JSON enabled
Post by: WISTFUL on 2013-02-22, 11:57:02
Ok,

I say that because WHMCS support team after getting FTP access and admin login, answer me:
Quote
Please recompile your PHP with JSON enabled - please refer to http://docs.whmcs.com/System_Requirements (http://docs.whmcs.com/System_Requirements)
So after I learned it, I have to teach it to them!  :D
Title: Re: Compile PHP with JSON enabled
Post by: WISTFUL on 2013-02-22, 12:45:04
:| WHMCS supporter say :
Quote
Sorry, it is showing disabled in your phpinfo - see the top disabled functions:
'--disable-json' - if you remove this from your php.ini and restart apache and see if this corrects the issue.
Title: Re: Compile PHP with JSON enabled
Post by: MRatWork on 2013-02-22, 13:31:51
What the hell with WHMCS support!.

Originally, json is embed to php. But you can non-embed with '--disable-json'. Because json including in php src, 'disable' mean json still installed if you installing php but as module. In another word, 'including in src' but 'disable' mean '--with-json'.

You can see inside '/etc/php.d', file json.ini exist on not.

To proof, json active or not you can see with phpinfo() or run 'php -m' via ssh.

That it.

So... What the hell with WHMCS support!.
Title: Re: Compile PHP with JSON enabled
Post by: WISTFUL on 2013-02-22, 13:35:55
Quote from: "MRatWork"
What the hell with WHMCS support!.
:D
Title: Re: Compile PHP with JSON enabled
Post by: WISTFUL on 2013-02-26, 14:00:07
Finally WHMCS support admitted that JSON is enable!

Now I opened Firefox > Tools > Web Developer > Web Console:
and on the admin homepage I'm seeing a number of 500 errors in response to the requests of the admin homepage widgets:
Code: [Select]
[11:17:56.881] GET http://www.domain.ltd/admin/reports.php?displaygraph=graph_monthly_signups&homepage=true [HTTP/1.1 500 Internal Server Error 215ms]
[11:17:56.882] GET http://www.domain.ltd/admin/reports.php?displaygraph=graph_daily_income&homepage=true [HTTP/1.1 500 Internal Server Error 220ms]
[11:17:56.924] POST http://www.domain.ltd/admin/index.php [HTTP/1.1 500 Internal Server Error 220ms]
[11:17:56.925] POST http://www.domain.ltd/admin/index.php [HTTP/1.1 500 Internal Server Error 220ms]
WHMCS support said:
Quote
As I advised earlier, you'd need to check your server admin log to discover the cause of this error and take the necessary steps in the server configuration to resolve.