Hi Guys,

I'm new to php, i'm trying to get a form to mail to work with a .doc attachment and i keep getting errors :mad:

here is the form in question:

http://www.cafcfootball.org.uk/careers.html

whenever you fill it in and press send I get the following errors:

Warning: fopen(): open_basedir restriction in effect. File(/tmp/phpk77Fe0) is not within the allowed path(s): (/home/cafcfootbauk/public_html) in /home/cafcfootbauk/public_html/careersuccess.php on line 101

Warning: fopen(/tmp/phpk77Fe0): failed to open stream: Operation not permitted in /home/cafcfootbauk/public_html/careersuccess.php on line 101

Warning: fread(): supplied argument is not a valid stream resource in /home/cafcfootbauk/public_html/careersuccess.php on line 102

Warning: fclose(): supplied argument is not a valid stream resource in /home/cafcfootbauk/public_html/careersuccess.php on line 144
Attachment has been sent Successfully.

Thanks in advance to anyone able to shed light on this. 🙂

    I suspect that it's the file upload (though showing us the source code around the line numbers cited in the error message would help) coupled with the fact that your server has an open_basedir restriction in effect. If that is the case, then the system administrator probably needs to add whatever directory is specified for the PHP upload_tmp_dir configuration value to the open_basedir setting, too. Otherwise, you will never be able to access uploaded files via your PHP scripts.

      Problem sorted now, thanks for the advice 😃

        Write a Reply...