473,320 Members | 1,853 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,320 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 3609
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.