Fatal error: Call to undefined function: htmlspecialchars_decode()

Asked by ArronC

I'm looking forward to trying the script however I have been unable to get past the login

this is the error i receive...

Fatal error: Call to undefined function: htmlspecialchars_decode() in /home/lethalwo/public_html/wrestling_news/inc/function.php on line 147

Thank You

Question information

Language:
English Edit question
Status:
Answered
For:
phpns Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
alecwh (alecwh) said :
#1

Hello,

PHP5 is required to use phpns.

Revision history for this message
Primus (primusnova) said :
#2

Hello,

I also get the same error when trying to login.

PHP Version: 5.2.5
MySQL Version: 4.1.22-standard

Thank You.

Revision history for this message
alecwh (alecwh) said :
#3

Hey Primus,

That's interesting, the function is defined in the PHP manual:

http://us3.php.net/htmlspecialchars_decode

Marked as: (PHP 5 >= 5.1.0)

You should have it, but you don't. You can try defining a function
yourself:

function htmlspecialchars_decode($str) {
    return strtr($str,
array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
}

I found that in the PHP.net comments. I don't know if it will work, but
you should try it.

Revision history for this message
Primus (primusnova) said :
#4

Excellent! That works and now I'm able to get past the login screen.

Thank you for the quick answer.

Revision history for this message
Cornelius (pwz2k) said :
#5

I had PHP 5 enabled on my server, and it reads PHP 5 is Installed! from my host as I needed it for other scripts in the past. I am receiving the same error after submitting login information.

Fatal error: Call to undefined function: htmlspecialchars_decode() in /home/prowr7/public_html/mmaing/news/inc/function.php on line 145

Can you help with this problem?

Provide an answer of your own, or ask ArronC for more information if necessary.

To post a message you must log in.