What causes "Call to Undefined Function session_status()"?

Asked

Viewed 888 times

1

I have the following mistake:

Call to Undefined Function session_status() in /home/a5872788/public_html/index.php on line 2

Why is this error? This is not a standard PHP function?

  • 5

    This question seems to be out of date because it is in English.

  • This error appears when running the page in filleZilla

  • I tried to edit it to not make things worse but it didn’t work; he should look in the code and at least Google some reference of what is happening.

  • 1

    If you can post the code it will be easier to help you

  • 3

    Your PHP is old, you need version 5.4 or higher: http://www.php.net/manual/en/function.session-status.php

  • 1

    ... and how so "run the page on filleZilla"? You meant Mozilla?

  • 1

    Although it has already been answered, it was a bit confusing. session_status() is a feature of PHP 5.4. If a code with this function is executed in any version less than 5.4 it will be considered a user function which, as it was not implemented, produces this undefined function error. As for the relationship with Filezilla, which is a mere FTP client for the case, it is the one that is interfacing the local file, which is probably already 5.4 or higher, with the server that should surely be 5.3 or lower.

  • 1

    @Brunoaugusto The question has been reopened, do not want to post your comment as an answer?

  • If you suggest, why not?

Show 4 more comments

1 answer

1

This answer has already been given in the form of commentary and, as suggested, I will be adding it as an answer too, in addition to better elaborate it, with links and formatting.

session_status() is a resource introduced in PHP 5.4.

If a code with this function is executed in any version less than 5.4 it will be considered a user-defined function which, as it was not implemented and/or could not be automatically located, as by include/require failed but suppressed error, this undefined function error is triggered.

Regarding the relationship with the Filezilla, which is a mere FTP client for this case, it is the one that is intermading the local file, which is probably running under a server on which the installed PHP is version 5.4 or higher, with the server which surely must be 5.3 or lower.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.