Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-05 15:23:18

klim_webcoder
New Member
From: Sevastopol, Ukraine
Registered: 2010-09-05
Posts: 5

The following PHP functions... are disabled

Hi.

I have installed textpattern and checked site diagnostics.

According to this article: http://textpattern.com/faq/266/the-following-php-functions-are-disabled
Quote:
“…If you have any listed in the message but not listed here, create a new topic in the Troubleshooting forum…”

I’m writing here about 2 functions (not listed in the list):
posix_getpwuid, eval

TXP version: 4.2.0 (r3275)

I have no problems now with this, just reporting this to you.

Offline

#2 2010-09-05 16:49:45

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: The following PHP functions... are disabled

posix_getpwuid, eval

Do you have working plugins? I thought disabling eval() disables them…


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#3 2010-09-05 16:58:51

klim_webcoder
New Member
From: Sevastopol, Ukraine
Registered: 2010-09-05
Posts: 5

Re: The following PHP functions... are disabled

No plugins yet. I’m new to txp :)
This is bad, if it so… I’ll read about this function.

Offline

#4 2010-09-05 18:58:20

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: The following PHP functions... are disabled

the_ghost wrote:

Do you have working plugins? I thought disabling eval() disables them…

Yep, it does. It does also disable the use of <txp:php> tags and raw PHP, altho the latter is depracated. Loading plugins from the txp_plugin table when eval() is disabled will cause plugin_load_error_above -error message and plugins won’t work.

klim_webcoder wrote:

I’ll read about this function.

Eval does what the name suggests; it evaluates code. You’ve (or host) better to enable it if you fancy about using plugins the traditional easy way.

But you can still use plugins (most of them at least), even when eval is disabled, by adding the plugins to plugin cache directory. Plugin’s that are added to plugin cache directory do not need to be evaluated with eval().

Last edited by Gocom (2010-09-05 19:01:24)

Offline

#5 2010-09-05 19:50:31

klim_webcoder
New Member
From: Sevastopol, Ukraine
Registered: 2010-09-05
Posts: 5

Re: The following PHP functions... are disabled

Thanks a lot!
I’ll ask my host company about enabling it.

Offline

#6 2010-09-07 18:22:49

klim_webcoder
New Member
From: Sevastopol, Ukraine
Registered: 2010-09-05
Posts: 5

Re: The following PHP functions... are disabled

My hosting company enabled eval only for the folder, where is my site located: public_html.
I checked it with this code:

$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "<br/ >";
eval("\$str = \"$str\";");
echo $str;

And it is working and displays:

Eval Test
This is a $string with my $name in it.
This is a cup with my coffee in it.

But TXP site diagnostics tells again about eval absence.
How does this diagnostics work? Maybe diagnostic script checks the whole host settings and ignores the folder settings?

Offline

#7 2010-09-07 19:05:42

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: The following PHP functions... are disabled

klim_webcoder wrote:

How does this diagnostics work? Maybe diagnostic script checks the whole host settings and ignores the folder settings?

TXP uses ini_get() function to get disable_functions value from the active configuration.

My hosting company enabled eval only for the folder, where is my site located: public_html.

Sub-directories too? That obviously should be the case, tho depending on the method used to allow the function for specific directory.

The diagnostics may not tell the truth in some cases. If everything really works, it’s somewhat advicable to ignore the notices.

Last edited by Gocom (2010-09-07 19:13:33)

Offline

#8 2010-09-07 19:47:15

klim_webcoder
New Member
From: Sevastopol, Ukraine
Registered: 2010-09-05
Posts: 5

Re: The following PHP functions... are disabled

Gocom wrote:

Sub-directories too?

Yes, I put my script in sub-directories also. Particularly, in /textpattern/ directory.
It works.

So, it seems, that everything really works:)
Thanks again (also for how diagnostics works).

Last edited by klim_webcoder (2010-09-07 19:48:45)

Offline

Board footer

Powered by FluxBB