In admin I get this error after I clicked on the static option under TinyMCE and hit submit. Now it looks like TinyMCE wont open under the admin. I tried this option since it wouldn't show up when u wanted to add articles:
Fatal error: Call to undefined function: file_put_contents() in /home/jdmex2/public_html/garage411/modules/TinyMCE/TinyMCE.module.php on line 604
Error with TinyMCE in admin
- Silmarillion
- Dev Team Member
- Posts: 483
- Joined: Sun Jan 02, 2005 9:10 pm
- Location: Denmark
Re: Error with TinyMCE in admin
Hi Spartanic
Which version of PHP are you running?
regards sil.
Which version of PHP are you running?
regards sil.
Re: Error with TinyMCE in admin
PHP 4.4.9. I do have the option of enabling PHP 5 but if I do so then I think it might screw up my other sites already on my host, although im not too sure if it will.
- Silmarillion
- Dev Team Member
- Posts: 483
- Joined: Sun Jan 02, 2005 9:10 pm
- Location: Denmark
Re: Error with TinyMCE in admin
Hi again
i just realized that the function if php5-only. Sorry about that. The situation has been worked around in the upcoming release 1.5.3 of cmsms. If you want a quick solution add this to the file TinyMCE.module.php:
just before the line
That should fix it!
regards
Silmarillion
i just realized that the function if php5-only. Sorry about that. The situation has been worked around in the upcoming release 1.5.3 of cmsms. If you want a quick solution add this to the file TinyMCE.module.php:
Code: Select all
if (!function_exists('file_put_contents')) {
function file_put_contents($filename, $data) {
$f = @fopen($filename, 'w');
if (!$f) {
return false;
} else {
$bytes = fwrite($f, $data);
fclose($f);
return $bytes;
}
}
}
Code: Select all
class TinyMCE extends CMSModule {
regards
Silmarillion