473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

php5 URL file-access is disabled

52
I have a php page that has an include. when using php4 I needed to put the whole url http://www etc. to get the include to load, thought it a bit strange but left it.
Now I can turn on php5, so I did, the include stopped working because URL file-access is disabled. I tried again without the url but it still wouldn't work.

Does anyone know what i'm talking about and what to do?
Oct 28 '07 #1
5 3612
pbmods
5,821 Expert 4TB
Heya, hinksta.

In your php.ini file, look for this line:
Expand|Select|Wrap|Line Numbers
  1. allow_url_fopen = Off
  2.  
Change it to:
Expand|Select|Wrap|Line Numbers
  1. allow_url_fopen = On
  2.  
If that doesn't work, then you'll need to have a word with your hosting provider.
Oct 28 '07 #2
hinksta
52
thanks pbmods, where should php.ini be? should I be able to get the incdlude to work without the url?
Oct 28 '07 #3
hinksta
52
I uploaded php.ini to my root but it didn't get it going.
Oct 28 '07 #4
pbmods
5,821 Expert 4TB
Heya, hinksta.

If the file is located on the same server, you can provide a local path to the file:
Expand|Select|Wrap|Line Numbers
  1. include 'somefile.php';
  2. include 'relative/path/to/somefile.php';
  3. include 'absolute/path/to/somefile.php';
  4.  
  5. // Or the ever-popular...
  6. include dirname(__FILE__) . '/relative/path/to/somefile.php';
  7.  
You can also set where PHP looks for include()d and require()d files by setting the include_path setting.
Oct 28 '07 #5
hinksta
52
This is the strange thing, I have other includes on the same page that load ok with the local path.
This one will not, the only thing I can see that's different is it's making a query ie: file.php?doing=something could that be the problem?
Oct 28 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Rob Ristroph | last post by:
I have tried out PHP 5 for the first time (with assistance from this group -- thanks!). The people I was working with have a site that uses lots of php objects. They are having problems with...
5
by: Tim Tyler | last post by:
I'm sure this is a FAQ - but I could not find a coherent statement of the answer: Some of my clients want PHP4. Other ones want PHP5. Can I run both PHP4 and PHP5 under the same instance of...
4
by: badbetty | last post by:
Dear Googlers I have installed PHP5 to run on WinXP against Apache 2. It works! ie. I have tested a few simple scripts and a basic xml document parse. I now want to try the XSL extension so I...
14
by: billy.becker | last post by:
I need to save a wav file that is HTTP POSTed to a php page. What does PHP5 do automatically to a POSTed variable when it puts it in the $_POST superglobal array? I haven't been able to find any...
2
by: Auddog | last post by:
Hello everyone, I have been trying for the past couple of days to get php5 installation on either my laptop or my test server. I'm not having much luck with either. I would like to get my test...
2
by: Stefan Huber | last post by:
Hi I've got a really strange problem, and can't find out why it's not working as intended. in order to use php4 and 5 together on a webserver and the requirement for running as different...
0
by: cty | last post by:
Title: Problem in session using php5 Good day, I use php5+mySQL4+IIS5.x Previuosly i use php4 and no error occur,
19
by: McKirahan | last post by:
I am working in two environments neither configuration of which I can change; one's my Web host the other a client. My Web host requires the use of the ".php5" extension to use PHP v5.1.4; where...
0
by: Pablo | last post by:
Hello, I have read some books, blogs and tutorials about managing data in php5, but all are focused on mysql, instead native xml. They talk about the new php5 xml functions, xml as web services,...
12
by: Alan M Dunsmuir | last post by:
After having worked with Apache/MySQL/PHP for a year or so under Linux I need, purely for convenience, to set up a parallel platform under Windows. Unfortunately, since I last did this (using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.