fopen() [function.fopen]: URL file-access is disabled in the server configuration
Tech-Today

fopen() [function.fopen]: URL file-access is disabled in the server configuration


I am checking it my link verifier script is working when I have encountered this error.

This is my function that checks if a url is existing.


function ipiel_ping_link($obj) {
$flag = 0;
try {
$handle = fopen($obj, "r");

if (!$handle) {
$flag = 0;
} else {
$flag = 1;
fclose($handle);
}
} catch(Exception $e) {
$flag = 0;
}
return $flag;
}


But, it always return the above error. I tested locally and found out that it's working.

Problem: Most web hosting company have strict default value for php setting. Example: allow_url_fopen is default to off. Which is why I have the mentioned error.

Solution:
Create a php.ini in your root directory and just add this line:

[ini]
allow_url_fopen = 1
[/ini]

This will enable file-access.




- Web Development
WordpressConfigure Custom Wordpress PermalinkZencartHow to add a customize product admin fields in zencart by editing/adding extra codesJoomlaHow to install/setup/configure joomla to run in a xampp setup. This avoids the technical detail of manually installing...

- Jquery Document.ready $("#controlid") Is Null Error
I'm working on a script that uses jquery and it's working normally on a simple page that I made. However when I create a master page in c# and put the jquery code in the page that extends the master page I get this error: $("#controlId") is null...

- Copy A File From Desktop/pc To A Pda Or Mobile Device And Vice Versa Using Rapi Api
Objective: -To copy a file from desktop to a pda device and vice versa using RAPI API. -http://msdn.microsoft.com/en-us/library/aa921197.aspx Requirement: -microsoft activesync must be installed -of course either .net framework 2 or greater To implement...

- Operation Must Use An Updateable Query
I am currently developing a certain application in MS Access and I need to link 2 databases, select data from one and move it to the second. In access I have no problem using the TransferDatabase command. DoCmd.TransferDatabase acLink, "Microsoft Access",...

- Php_network_getaddresses: Getaddrinfo Failed: No Such Host Is Known.
Wondering how to disable the above error? Even if you set in your php.ini: display_errors = Off Errors will still pop out. Solution: Just add @ at the beginning of the function: $handle = @fopen($obj, "r"); @, suppress the warnings produced Php documentation...



Tech-Today








.