Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7865827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:12:14+00:00 2026-06-03T00:12:14+00:00

My PHP version is 5.1.6 I have install Json by follow the instructions: #

  • 0

My PHP version is 5.1.6
I have install Json by follow the instructions:

# yum install php-devel
# yum install php-pear
# yum install gcc
# pear install json
# cd /etc/php.d
# echo "extension=json.so" > json.ini
# service httpd restart

Now, I check that Json enabled, but I cannot run json_encode:

Check 1:

[root@69-64-69-43 ~]# php -i | grep json

Result 1:

/etc/php.d/json.ini,
json
json support => enabled
json version => 1.2.1

Check 2:

[root@69-64-69-43 ~]# php -r 'var_dump(function_exists("json_encode"));'

Result 2:

bool(true)

But when run:

Fatal error: Call to undefined function json_encode() in /var/www/vhosts/ykite.com/httpdocs/fre/json.php on line 8

Here is run link:

Check Json: http://69.64.69.43/fre/json.php

php_info(): http://69.64.69.43/fre/info.php

I was really looking and read many documents but I can not find the cause of this case.

I sincerely appreciate your help.

Cuong

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:12:16+00:00Added an answer on June 3, 2026 at 12:12 am

    If your var_dump( function_exists( 'json_encode' ) ) returns true, while your HTTP request says the function doesn’t exist; there’s only one explanation I can think of: CLI and HTTP requests use a different php.ini. In your phpinfo( ) document, it says that it’s loading json.ini, but I don’t see any other reference to JSON in there.

    Check your logs to see whether or not json.so is actually loaded upon a HTTP request. My bet is that it isn’t.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems like PHP have removed dbx-extension as default install since version 5. I
I have followed all the instructions here: http://www.tonyspencer.com/2003/10/22/curl-with-php-and-apache-on-windows/ to install & config apache get
My server have default php version of 4, so when I run some script
I have Eclipse PDT version 1.3.0 PHP Version 5.3.8 Running on windows XP Pro
I know in PHP, it sends the X-Powered-By header to have the PHP version.
I'm trying to install a couple of pear packages but have an issue with
As per title, I am simply trying to install pecl_http extension for php in
I have just done a fresh install of the latest stable PyroCMS version on
I have WAMP server installed in my PC. Apache Version : 2.2.17 PHP Version
I have installed xampp 1.7.4 with php version 5.3.5 on windows xp. How to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.