Reputation: 169
I'm making a PHP form that requests a file for download. I've had an error with the script and did some searching found out that it was because my php.ini file needed allow_url_fopen = On
, so I went to change the settings and my site has no php.ini file. I couldn't really find out how to make a php.ini file. How would I create this file? My web host says I need to create it. What are the default settings to put into this file?
Upvotes: 2
Views: 31493
Reputation: 6513
Well, if you have no php.ini file, you can create it with as few lines in it as you need. Just put allow_url_fopen = On
on an ascii file and name it php.ini, copy it to the working directory or the public root. Take in mind that anyway this values can be overrided by hosting's staff in places where you do not have access. To see what is the final and actual setting that aplies use phpinfo().
A side note: .htaccess files can in some circunstances govern and override php settings, so also take a look on all of them (that are accesible to you) to see if you can set your preferences there. Be careful that systax differs from php.ini .htaccess example
Upvotes: 2
Reputation: 2215
Upvotes: 4