If I set my PHP version to 5.6.25, all my JSON Views will become inaccessible and throw HTTP 500 error.

My JSON Views works fine if PHP is set to 5.5 or lower.

Comments

ericwongcm created an issue. See original summary.

GeduR’s picture

I've got this module running with 5.6 successfully with json module.
Could you provide info about the current error and configuration? Please attach the log message.

ericwongcm’s picture

What log? there is nothing in Drupal log. I tried just now.

The problem is NOT whether JSON module works or not when you use PHP 5.6. The problem is AFTER you setup a JSON Views, the url you visit to see the JSON Views will display HTTP 500 error, i.e. inaccessible.

GeduR’s picture

Drupal logs error in its internal log to check it later: have you checked /admin/reports/dblog ?

I'm using json views in php 5.6 successfully, I'm just trying to figure out what is different in your system to help resolving this issue.

tunic’s picture

ericwongcm if dblog is empty check the PHP error log. There should be an error. That error will help to track down the source of your error. May be is related to your installation as this module is indeed working with PHP 5.6 in other installations.

ericwongcm’s picture

/admin/reports/dblog
is where I checked and it is empty, i.e. does not contain any information related to the HTTP 500 error and does not contain any entry at the time I see HTTP 500 error.

My server Cpanel "Errors pages" is empty too but I am asking my web host to confirm if this page is actually working.

My web host recently migrated my account to a new server and there had been many problems that I am trying to solve with my web host. PHP 5.6 is only made available in this new server and the HTTP 500 is the result when I try to use it.

Take note that other Drupal pages seems to work fine when I set my server to run on PHP 5.6. The only page that shows HTTP 500 error is those JSON Views pages. I won't reject the possibility that the problem I see is server configuration related but my observation indicate that it is more likely to be related to this module.

May I know the exact PHP 5.6 version that you are using on your server? It could be related to the specific PHP 5.6 version being used.

tunic’s picture

It could be related to a specific PHP version. We've this module working with PHP 5.6.20.

It's important to get the PHP error. The dblog you have checked is the Drupal error log but some PHP fatal error are not logged. To have them, you have to check the Apache error log. It should be somewhere in your cPanel.

In this StackOverflow question PHP error log location is discussed: http://stackoverflow.com/questions/5127838/where-does-php-store-the-erro...

ericwongcm’s picture

Status: Active » Closed (fixed)

Thanks everyone for your input.

I have contacted my web host for the error log and it turns out mbstring is not enabled when I use PHP 5.6.

When mbstring is enabled in PHP selector, my JSON Views page is displayed.

tunic’s picture

Status: Closed (fixed) » Closed (works as designed)

Thanks to report back!

Changing to works as desinged because is a server configuration problem.