Topic: Checking if fopen is enabled
Is there any check that can be made by a script to see if fopen is enabled on the server?
Cheers,
Matt
You are not logged in. Please login or register.
PunBB Forums → Programming → Checking if fopen is enabled
Is there any check that can be made by a script to see if fopen is enabled on the server?
Cheers,
Matt
Are you talking about allow_url_fopen, or the actual fopen function (which is much rarer)
The fopen function. It's one that I use in the download mod to check if a ftp server is accepting connections. Would I need to make it manually enabled/disabled within the script, or could I check via the script itself if fopen will work?
Why use fopen instead of the standard FTP functions?
http://be.php.net/manual/en/ref.ftp.php
if (function_exists('fopen'))
// bla bla
Hosts completely disabling fopen() is quite rare though. They generally just disable allow_url_fopen.
if (function_exists('fopen'))
// bla blaHosts completely disabling fopen() is quite rare though. They generally just disable allow_url_fopen.
If fopen is enabled, but allow_url_fopen is disabled, will that enable the fopen function to access local files but not (remote/external to filesystem) files? If so, I've cocked up on my above question. It's the ability for fopen to connect to an external uri which I was wishing to check for.
My apologies if I have mis-phrased my question.
Many thanks again,
Matt
Matt: Correct. You're looking for allow_url_fopen. Check admin_index.php, PunBB detects it
PunBB Forums → Programming → Checking if fopen is enabled
Powered by PunBB, supported by Informer Technologies, Inc.