GetSimple Support Forum

Full Version: Here is the "exec PHP" plugin fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have installed exec PHP plugin but it didn't work because the content block becomes blank. After turning the Debug on, found out about these errors:

ERROR 1

Warning: unlink(/var/www/getsimple/admin/install.php) [function.unlink]: Permission denied in /var/www/getsimple/admin/inc/common.php on line 135

ERROR 2

Warning: unlink(/var/www/getsimple/admin/setup.php) [function.unlink]: Permission denied in /var/www/getsimple/admin/inc/common.php on line 140

ERROR 3

Warning: call_user_func_array() expects parameter 2 to be array, string given in /var/www/getsimple/admin/inc/plugin_functions.php on line 139


SOLUTION

For the errors 1 and 2, all you have to do is deleting the files

admin/install.php
admin/setup.php

or rename them to something else like

admin/install.php.off
admin/setup.php.off


For error 3, you have to:

### 1. Open file

admin/inc/plugin_functions.php


### 2. Around line 139 find

$data = call_user_func_array($filter['function'], $data);


### 3. Replace with

$data = call_user_func_array($filter['function'], array($data));



It's because the function call_user_func_array() requires the second parameter to be an array as stated at

http://www.php.net/manual/en/function.ca...-array.php


Hope it helps.



Thanks for this great simple lightning fast CMS, this is probably the only CMS that I could grasp and use within a minute!
What version of GetSimple are you using? Because I thought your third error had been fixed in later versions.

As for the install and setup files, you will want to delete those for security reasons. I don’t know why some servers don’t allow them to be deleted by the script, I think we will have to display a warning when they can’t be removed automatically.
Zegnåt Wrote:What version of GetSimple are you using? Because I thought your third error had been fixed in later versions.

As for the install and setup files, you will want to delete those for security reasons. I don’t know why some servers don’t allow them to be deleted by the script, I think we will have to display a warning when they can’t be removed automatically.

Thanks for the tips, about the debug mode. I am using the latest 2.01 version I downloaded like 5 days ago.
Ths must have been a patch in the yet-to-be-released 2.02 - I see it updated in the SVN