Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
Fatal Error - Is it Joomla 1.5.11 (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Fatal Error - Is it Joomla 1.5.11
#966
tyhuls (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Fatal Error - Is it Joomla 1.5.11 1 Year, 2 Months ago Karma: 0  
Hello,

Here is the error I am getting when activating PHP Module:
Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/site/public_html/modules/mod_php/mod_php.php(36) : eval()'d code on line 3

Warning: require_once(http://site.com/LinkRotate/showlink.php?id=2) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/site/public_html/modules/mod_php/mod_php.php(36) : eval()'d code on line 3

Fatal error: require_once() [function.require]: Failed opening required 'http://site.com/LinkRotate/showlink.php?id=2' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/site/public_html/modules/mod_php/mod_php.php(36) : eval()'d code on line 3
Here is the PHP Code inside of PHP Module: <?php require_once 'http://site.com/LinkRotate/showlink.php?id=2'; ?> It basically calls a bank of links that rotate randomly. Nothing special. I have this exact thing working on another site on the same server with no issues the only difference I can tell is the one that works is Joomla 1.5.10 and the one that doesn't is on a Joomla 1.5.11 install. Any thoughts? Thanks
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/06/22 14:06 By tyhuls.
  The administrator has disabled public write access.
#967
admin (Admin)
Admin
Posts: 422
graph
User Offline Click here to see the profile of this user
Re:Fatal Error - Is it Joomla 1.5.11 1 Year, 2 Months ago Karma: 9  
The PHP configuration doesn't allow you to request URLs as files. This is probably for security.

see: http://phpsec.org/projects/phpsecinfo/tests/allow_url_fopen.html

and: http://us3.php.net/manual/en/filesystem.configuration.php#ini.allow-url-include

The two PHP settings that affect this are allow_url_fopen and allow_url_include. The two Joomla sites must have different settings affecting them. Use phpinfo() and ini_get() to figure out the difference.

allow_url_fopen enables/disables all remote file access for PHP.
allow_url_include enables/disables remote file execution (file access through include() or require())

The allow_url_include was introduced in 5.10 but allow_url_fopen since PHP4.

Not being able to do require() means either allow_url_include or allow_url_fopen is disabled, or both. Usually it would be just allow_url_include.

First you have to ask, do you really trust the URL: http://site.com/LinkRotate/showlink.php?id=2
Since you will be executing any PHP on that URL.

If you do, then you can use an alternative:

eval(file_get_contents('http://site.com/LinkRotate/showlink.php?id=2'));
Even if you fully trust site.com, this is still very dangerous. Anyone that can modify network traffic between site.com and your site can run arbitrary code on your site.

If allow_url_fopen is also turned off, then you'll have to use CURL, or other HTTP client, if available. Or ask the host if they could change the PHP.ini settings, or you could change it for your specific site. Some sites even allow you to have your custom built PHP binary.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1133
webportal (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Fatal Error - Is it Joomla 1.5.11 8 Months, 1 Week ago Karma: 0  
Hey i seen your errors.. am not a expert in joomla like you but i always use this website for clarifications while getting errors with joomal, php.. kindly please visit here http://www.joomla.org/about-joomla/getting-started.html hope you will get good result.. thanks for your interest by sharing the error with ma kind of persons..
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.