4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 PHP Warnings
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 8:21 am (14 years, 4 months ago) Reply with QuoteBack to Top

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
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jun 18, 2003 8:23 am (14 years, 4 months ago) Reply with QuoteBack to Top

Freedom2Support, of which Justin is a member, is still at http://www.freedom2support.net/.

Can you tell us what is on line 106 please?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 8:33 am (14 years, 4 months ago) Reply with QuoteBack to Top

the file does exist...will double check now.
line 106:
include("head.php");
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 8:38 am (14 years, 4 months ago) Reply with QuoteBack to Top

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
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jun 18, 2003 8:48 am (14 years, 4 months ago) Reply with QuoteBack to Top

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?

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 9:25 am (14 years, 4 months ago) Reply with QuoteBack to Top

the head.php file is in the dir

www.ddalley.co.uk/themes/Chess/head.php
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 9:40 am (14 years, 4 months ago) Reply with QuoteBack to Top

I though warnings were disabled.
Any idea what the value of error_reporting is in the php.ini?
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 9:53 am (14 years, 4 months ago) Reply with QuoteBack to Top

Could this be a php bug?

http://bugs.php.net/bug.php?id=19292
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jun 18, 2003 10:13 am (14 years, 4 months ago) Reply with QuoteBack to Top

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

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 10:36 am (14 years, 4 months ago) Reply with QuoteBack to Top

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)
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jun 18, 2003 10:37 am (14 years, 4 months ago) Reply with QuoteBack to Top

The @ only suppresses the error, so the file probably still isn't being included... Confused It might cause some problems, but you'll see as you do it.

Yes, I find the M$ quote hilarious Very Happy

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
ddalley
Junior WebHelper
Junior WebHelper


Joined: 18 Jun 2003
Posts: 8

PostPosted: Wed Jun 18, 2003 10:46 am (14 years, 4 months ago) Reply with QuoteBack to Top

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)
OfflineView User's ProfileFind all posts by ddalleySend Personal Message
Cayden
Junior WebHelper
Junior WebHelper


Joined: 23 Jun 2014
Posts: 6

PostPosted: Wed Jul 16, 2014 7:46 am (3 years, 3 months ago) Reply with QuoteBack to Top

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
OfflineView User's ProfileFind all posts by CaydenSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.064122 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme