TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-28-2008, 08:30 AM   #1 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default Gotta love errors... Help out with require problem?

Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/<snip>/public_html/index.php on line 1

Warning: require_once(http://aetherdesigns.com/include/func_lib.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/<snip>/public_html/index.php on line 1

Fatal error: require_once() [function.require]: Failed opening required 'http://aetherdesigns.com/include/func_lib.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/<snip>/public_html/index.php on line 1

the error happens because I am giving the script an absolute path to the include file... Which is kinda lame because If the path is relative I need to change it for every file.
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 03-28-2008, 11:25 AM   #2 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default

There isn't an error, that means you can include complete "urls" in your inclusion path.

If its a complete domain from a different server good luck, its disabled on about all new servers. Try:

PHP Code:
require_once("./include/func_lib.php"); 
__________________
PHP/XHTML Freelancer:
Cleanscript.com v3 - Programming starting at just $5 act now!
Nor is offline  
Reply With Quote
Old 03-28-2008, 06:07 PM   #3 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

That means that I need to edit the includes on different files, which is like... a lot of work when the site gets bigger... :(

Is there any way around this?
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 03-28-2008, 06:16 PM   #4 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

you can change it through php.ini
I don't know what option exactly it is, but have a look at it it's well comented.
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 03-28-2008, 06:26 PM   #5 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

I just found something:

Quote:
allow_url_fopen = On
allow_url_include = On
Add these to your php.ini or set them to On if they were Off
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 03-30-2008, 03:01 AM   #6 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

I found a shinier way.
PHP Code:
@include('$_SERVER["DOCUMENT_ROOT"]./include/func_lib.php'); 
__________________
Signatures are nothing but incriminating.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:41 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design