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

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.

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?

Member Avatar for diafol

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.

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

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.

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?

Member Avatar for diafol

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.

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.

Member Avatar for diafol

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.

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

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

Regards
scorpionz.

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. ...

It works... M very late in Responding to this Post

Best Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.