Author |
Message |
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 8:21 am (20 years, 10 months ago) |
|
My site has suddenly started producing Warning errors, I thought the php.ini was configured not to display 'warnings'
Warning: open_basedir restriction in effect. File is in wrong directory in /web/sites/128/ddalley/www.ddalley.co.uk/themes/Chess/theme.php on line 106
It is a phpnuke based site, so I'm sure some on must have hasd this problem before.
I have had this problem in the past, but can not remember how I fixed it.
Has this forum moved home? I used to use another excellent f2s support forum, which was full of posts from Justin, but I have lost the addr and can't find it on searches.
Thanks
Dave |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Jun 18, 2003 8:23 am (20 years, 10 months ago) |
|
Freedom2Support, of which Justin is a member, is still at http://www.freedom2support.net/.
Can you tell us what is on line 106 please? |
________________________________
|
|
|
|
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 8:33 am (20 years, 10 months ago) |
|
the file does exist...will double check now.
line 106:
include("head.php"); |
|
|
|
|
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 8:38 am (20 years, 10 months ago) |
|
Yes the included file does exist, if I try
include("/xxx/yyyy/head.php")
get another error msg:
Warning: Unable to access /xxx/yyy/head.php in /web/sites/128/ddalley/www.ddalley.co.uk/themes/Chess/theme.php on line 106
Warning: Failed opening '/xxx/yyy/head.php' for inclusion (include_path='.:/usr/local/lib/php') in /web/sites/128/ddalley/www.ddalley.co.uk/themes/Chess/theme.php on line 106 |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Jun 18, 2003 8:48 am (20 years, 10 months ago) |
|
Yes, because the / means the root of the hard disk, not the root of your site, which would be /web/sites/128/ddalley/www.ddalley.co.uk/ ...
What directory is head.php in? |
________________________________
|
|
|
|
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 9:25 am (20 years, 10 months ago) |
|
|
|
|
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 9:40 am (20 years, 10 months ago) |
|
I though warnings were disabled.
Any idea what the value of error_reporting is in the php.ini? |
|
|
|
|
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 9:53 am (20 years, 10 months ago) |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Jun 18, 2003 10:13 am (20 years, 10 months ago) |
|
What version of PHP are you running on your server? As to error reporting, I think for this kind of error it appears anyway, unless you put an @ sign in front of the function (not absolutely sure though). |
________________________________
|
|
|
|
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 10:36 am (20 years, 10 months ago) |
|
Excellent, putting an @ in front of the include has fixed the problem, what does this do?. I have not come across this before.
The strange thing is only certain includes are producing this error??
I guess I will have to traul through the site putting @'s every where.
The version of php is 4.2.2.
Many thanks for your help Daniel
(I think you M$ quote is excellent) |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Jun 18, 2003 10:37 am (20 years, 10 months ago) |
|
The @ only suppresses the error, so the file probably still isn't being included... It might cause some problems, but you'll see as you do it.
Yes, I find the M$ quote hilarious |
________________________________
|
|
|
|
ddalley
Junior WebHelper
Joined: 18 Jun 2003
Posts: 8
|
Posted:
Wed Jun 18, 2003 10:46 am (20 years, 10 months ago) |
|
That is the really strange part the file is being included
function list_matches($club, $league, $division){
include("header.php");
OpenTable();
@include("fixture_list.php");;
CloseTable();
include("footer.php");
}
now works without a warning, fixture_list.php contains a form which is being displayed no problem
http://www.ddalley.co.uk/modules.php?name=Chess_club&chess_op=new_match
(I really do need to sort out the security) |
|
|
|
|
Cayden
Junior WebHelper
Joined: 23 Jun 2014
Posts: 6
|
Posted:
Wed Jul 16, 2014 7:46 am (9 years, 9 months ago) |
|
Hi, As to error reporting, I think for this kind of error it appears anyway, unless you put an @ sign in front of the function (not absolutely sure though). |
________________________________ digital signature |
|
|
|
|