System() disabled? Need help installing

FrozenTime

Member
Messages
84
Reaction score
0
Points
6
Supers Simple Blog Script

After creating the SQL database and successfully connecting to it with the script, I tried the next setup step where you enter preferences, but got the following error:

Warning: system() has been disabled for security reasons in (path)/setup.php on line 145
Warning: system() has been disabled for security reasons in (path)/setup.php on line 156
Warning: system() has been disabled for security reasons in (path)/setup.php on line 222

the line for one of the errors above for example is is:
system("chmod -R 777 \"$SET0/blogImages\" ");

Is there a way to fix that?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
As the error message states, the function is disabled for security reasons. It will not be enabled.

There is a PHP function, chmod(), but it is not recursive. Also, the system will start throwing 500 errors if you set directory permissions to 0777. They have to be 0755.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
No. There's no way to enable system() without endangering the entire environment (and there are, unfortunately, people who will deliberately mess up the system for their own purposes, even if it only works for a few minutes or hours -- that's long enough for them to get what they came for). That being said, you can probably figure out what the setup script is doing and replicate most of the actions manually. You can change file and folder permissions through cPanel or an FTP client.

One little problem, though -- 777 is going to result in a 500 error. Files in your public_html (or www) directory have a max permission of 644 and folders max at 755, again for security reasons.
 

FrozenTime

Member
Messages
84
Reaction score
0
Points
6
Alrighty then, thanks for the quick reply! :)

Edit: I guess I could try and install it manually, but I don't know too much about php so it'd take a really long time and there's a good chance it won't work, so I think I'll just look for a better script. Thanks :)
 
Last edited:

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
367
Points
83
If your site is not hosted on x10Hosting (maybe x10VPS or something?) then you can edit your PHP.INI and remove 'system' from the disabled_functions list.
 
Top