0

Hi this is scorpionz.. i am facing a problem for the last 5 hours as
URL file-access is disabled in the server configuration

Description:
I have a project with path

c:/xampp/htdocs/mysite/config.php

Thats my configuration file name.

I have a folder in root which is getting connection
c:/xampp/htdocs/mysite/folder/testpage.php

now when I include my config.php to PHP file testpage.php
It gives the error:

c:/xampp/htdocs/mysite/config.php

Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\xampp\htdocs\mysite\utilities\testpage.php on line 2.

I am including the config in this way

<?php include 'http://'. $_SERVER .'/config.php'; ?>

I am stuck to move..
Any response will be apprecited.
One more thing i am using drupal 6.

Regard
scorpionz

6
Contributors
13
Replies
14
Views
8 Years
Discussion Span
Last Post by scorpionz
0

Thanks for response back But

Warning: include_once(./includes/bootstrap.inc) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\mysite\config.php on line 12

I got this error.
In fact config.php is present though.

0

This latest error looks as though you have an include error in the config module. Do you have an include for bootstrap.inc on line 12 of config.php?

0

Sounds like the old problem with folder navigation - relative vs.absolute, which may be further complicated by running on a local/test server. You have a file under the mysite/folder/ directory and this is including the main config file. Where is the include call for this new file coming from? The testpage itself or the config file.

0

Well Thanks for your response back

To chrishea:
Drupal provides in own style of connecting to DB that is:

<?php

	include('./includes/bootstrap.inc');
	//include_once('./includes/bootstrap.inc');
	drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
	// Now you can run queries using db_query().
	$result = db_query('SELECT title FROM node');

?>

this file is bind with the name config.php and placed on root.
on the other side when i place my testpage.php file which has db queries on the root it easily connected to db and shows the results but when i placed on particular folder on the root, it shows an error.

To ardav :
Well your answer has bee quoted in way that config is a connection file and testpage is a result file. see the answer i provide to chrishea.

Thanks anyways, but i am stuck here.

Regards

0

if your config file is inside any other folder then use the path as

root dirctory/innerfolder/config.php

but if the config file is outer folder and the file in which u r including config like then use as
../folder/config.php

its just an exmple.

0

Well I have tried all the possibilities

I have now open the allow_url_include On
Now it seems to me drupal itself is not allowing to use its library within folder, but allowing to use when the files are on root.

So what to do ?
Is there any person of Drupal here?

0

Are you running this on localhost only? Do you get the same problem on a remote site? I've often had problems with localhosts myself. If you put everything under htdocs without the mysite folder, you'll probably find that it works. Unfortunately, that may not be possible. For an alternative - set up virtual hosts under windows - search this forum Airshow and I discussed it in a thread some time ago. What this does is give you a localhost url like: http:// mysite.local/ index.php.

0

Hello ardav
sorry for late...
Thanks for responding
yes i am running on localhost, as u know we can change the system path at system32 so not a big deal.
coz i need to run apps to test before moving to online...
do u have an idea regarding drupal 6... and its folder structure?
coz i have an structure like this setup:

http://mysite/myfolder/test.php
http://mysite/config.php

now, how to map this config.php to test.php

the folder mysite is basically an installed drupal.

Kindly figured out this issue...

Thanks.

Regards
scorpionz.

0

Darn. Sorry scorp, I can't help with your urls because I'm on holiday at the moment and am using my Blackberry. Also I don't have any experience with Drupal, just some experience with problems with localhost and the './' reference. But good luck with the problem.

0

No problem ardav
But thanks for your cooperation anyways....

will wait for response from anyone with best of luck...

Regards
scorpionz.

0

Hi this is scorpionz.. i am facing a problem for the last 5 hours as
URL file-access is disabled in the server configuration

Description:
I have a project with path

c:/xampp/htdocs/mysite/config.php

Thats my configuration file name.

I have a folder in root which is getting connection
c:/xampp/htdocs/mysite/folder/testpage.php

now when I include my config.php to PHP file testpage.php
It gives the error:

c:/xampp/htdocs/mysite/config.php

Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\xampp\htdocs\mysite\utilities\testpage.php on line 2.

I am including the config in this way

<?php include 'http://'. $_SERVER .'/config.php'; ?>

I am stuck to move..
Any response will be apprecited.
One more thing i am using drupal 6.

Regard
scorpionz

... I believe it's because allow_url_fopen is set to 0. Change it to 1 in either your php.ini or your httpd.conf. ...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.