Hi,
I'm currently installing serendipity v1.1. at the webserver of my university, like I've done at several ISPs well. But this admin has disabled fgets for security reasons. By this reason the installation fails with looped warnings "fgets has been disabled for security reasons" from include/functions_installer.inc.php line 1123
So far as I can see fgets is used at least in /Net/Socket.php, /Onyx/RSS.php and Smarty/libs/plugins/function.fetch.php too.
Do you have some arguments for a little discussion with the administrator? Or is it possible to implement a bypass for running the installation successfully?
Thx, Juergen
fgets workaround?
file_get_contents(), fgetc()
Hopefully your sysadmin does not know everything about PHP so maybe he left fgetc() or file_get_contents() enabled.
Example for fgetc():
Example for file_get_contents():
Example for fgetc():
Code: Select all
$resource = fopen(__FILE__, 'r');
$string = '';
while (!feof($resource))
$string .= fgetc($resource);Code: Select all
$string = file_get_contents(__FILE__);-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: file_get_contents(), fgetc()
Hi!
With disabled fgets, I'm afraid you won't be able to use many portions of Serendipity. You should not bother with it altogether, there are too many places where fgets is required.
Disabling it is like locking the door to your closet to prevent it from getting dirty.
Best regards,
Garvin
With disabled fgets, I'm afraid you won't be able to use many portions of Serendipity. You should not bother with it altogether, there are too many places where fgets is required.
Disabling it is like locking the door to your closet to prevent it from getting dirty.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: file_get_contents(), fgetc()
I'm agree with you.garvinhicking wrote: Disabling it is like locking the door to your closet to prevent it from getting dirty.
The sysadmin means, fgets() runs with webserver uid and all files (with passwords and so on) are readable using a simple script. Locking the door was the easiest way for him to prevent this.
I'll looking for another server...
Juergen
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: file_get_contents(), fgetc()
Hi!
Definintely. There are other means of jailing users installations (fastCGI, suPHP, ...). Locking write access prevents most of the PHP applications to work at all...
HTH,
Garvin
Definintely. There are other means of jailing users installations (fastCGI, suPHP, ...). Locking write access prevents most of the PHP applications to work at all...
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/