Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-21 14:22:00

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

[resolved] PHP functions disabled

Hi, it probably needs a dev to answer this so I posted it here.

I get this in diagnostics with new install of txp 408:

The following PHP functions (which may be necessary to run Textpattern)
are disabled on your server: proc_close, proc_get_status, proc_nice,
proc_terminate, highlight_file, escapeshellcmd,
define_syslog_variables, posix_uname, posix_getpwuid,
apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid,
posix_setsid, posix_setuid, escapeshellarg, posix_uname, ftp_exec,
ftp_connect, ftp_login, ftp_get, ftp_put, ftp_nb_fput, ftp_raw,
ftp_rawlist, ini_alter, ini_restore, inject_code, syslog, openlog,
define_syslog_variables, apache_setenv, mysql_pconnect, eval,
phpAds_XmlRpc, phpAds_remoteInfo, phpAds_xmlrpcEncode,
phpAds_xmlrpcDecode, xmlrpc_entity_decode, fp, fput

I checked the FAQ link and I seem to be OK, but just want to check if any of the above make the installation risky.

Edit: To make it slightly easier, it is just these that are not mentioned on the FAQ:

posix_uname, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_uname, ftp_exec, ftp_connect, ftp_login, ftp_get, ftp_put, ftp_nb_fput, ftp_raw, ftp_rawlist,
inject_code, eval, fp, fput, xmlrpc_entity_decode,
phpAds_XmlRpc, phpAds_remoteInfo, phpAds_xmlrpcEncode, phpAds_xmlrpcDecode,

Last edited by zero (2009-05-21 15:41:29)


BB6 Band My band
Gud One My blog

Offline

#2 2009-05-22 10:47:57

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: [resolved] PHP functions disabled

I went ahead and installed the whole site and it all seems to work fine.

But I still need to know if 4.0.8 uses any of the above php functions, as the hosting company will move it to a less secure server with full php enabled, if I wish. To my non-dev brain, perhaps txp uses one of these?

ftp_exec, ftp_connect, ftp_login, ftp_get, ftp_put, ftp_nb_fput, ftp_raw, ftp_rawlist,
inject_code, eval, fp, fput, xmlrpc_entity_decode

Thanks if anyone can help.


BB6 Band My band
Gud One My blog

Offline

#3 2009-05-25 06:31:22

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: [resolved] PHP functions disabled

eval is mandatory for executing Textpattern plugins, and for <txp:php>...</txp:php>. If you do not use either one of these features, Textpattern might work on such a restricted server setup.

Offline

#4 2009-05-25 10:22:31

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: [resolved] PHP functions disabled

Thanks, wet, the site only uses zem contact reborn plugin and no txp:php so I guess that’s why it is running OK. But as it expands the site might need plugins so I’ve asked if they’ll enable eval. Thanks again.


BB6 Band My band
Gud One My blog

Offline

#5 2009-05-25 13:18:18

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [resolved] PHP functions disabled

Peter, to clarify: Textpattern uses eval to actually run the plugins, as they are held as text in the database, rather than files that are included. So no plugin would work if eval wasn’t working, unless you had the full PHP copy of it sitting in your plugin cache directory, as those are simply included.

Offline

#6 2009-05-25 14:33:48

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: [resolved] PHP functions disabled

Mmm… that’s strange, Mary, Zem contact reborn was working fine before, and it said in Diagnostics that eval was disabled. I sent a couple of articles and also used the contact form. What do you think happened? Has the plugin accidentally moved into the cache?

The hosts have now kindly enabled eval and I’ve tried it again and all seems to be well.


BB6 Band My band
Gud One My blog

Offline

#7 2009-05-25 18:53:52

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

Re: [resolved] PHP functions disabled

You can run stress test and check for eval be this:
<txp:php>eval('echo "Hello world";');</txp:php>

It’s double :) eval checking which can say – does your hosting allow eval or not.


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

#8 2009-05-25 19:11:24

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: [resolved] PHP functions disabled

Handy to know, Victor, and I’ve tried and it is being allowed here, but strange that zcr worked when it was not allowed (although I didn’t test it then). Cheers.


BB6 Band My band
Gud One My blog

Offline

Board footer

Powered by FluxBB