p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Adv_mailer (chapter 15)


Message #1 by "Darren Spink" <dvs1@b...> on Wed, 2 Oct 2002 13:35:26 +0100
Just a quick/simple question for someone.  I have been trying to get this
adv_mailer script going, but with much success.  Although it does send a
mail, it doesn't attach a file correctly.  The file attachment that arrives
is normally about 70 bytes and is incomplete.

When the script is run it does report 3 warnings, they are as follows:

Warning open_basedir restriction in effect. File is in wrong directory in
/usr/local/psa etc

Warning fopen("/tmp/phphfc2MQ","r") - Operation not permitted in
/usr/local/psa etc

Warning Supplied argument is not a valide File-Handle resource in
/usr/local/psa etc

Does anyone have any ideas why this is happening ?  Why the attachment isn't
complete ??

Thanks in Advance

Regards


Darren


Message #2 by "Nikolai Devereaux" <yomama@u...> on Wed, 2 Oct 2002 09:26:08 -0700
I don't know if this will solve your problem, but it's worth a shot.


Open_basedir is a setting in PHP that restricts a script's access to the
filesystem.  When a directory is specified in open_basedir, then you can only
access files located at or beneath that directory.

There's a small comment about it in your php.ini file.

My guess is that it's set to your directory to prevent your scripts from
accessing the home directories of other users or virtual hosts.  Sadly, this
means that the tmp directory is off limits unless you specifically permit
access to it.

Try this:

[php.ini]
open_basedir = "/whatever/exists/already:/tmp/"

   and/or
[httpd.conf]
php_admin_value open_basedir "/whatever/exists/already:/tmp/"


take care,

nik

Message #3 by "jorge" <jorge@d...> on Wed, 2 Oct 2002 14:34:36 -0500
Darren:
Can you please let me know when problem is fixed thanks

Jorge Cordero

----- Original Message -----
From: "Darren Spink" <dvs1@b...>
To: "beginning php" <beginning_php@p...>
Sent: Wednesday, October 02, 2002 7:35 AM
Subject: [beginning_php] Adv_mailer (chapter 15)


>
> Just a quick/simple question for someone.  I have been trying to get this
> adv_mailer script going, but with much success.  Although it does send a
> mail, it doesn't attach a file correctly.  The file attachment that
arrives
> is normally about 70 bytes and is incomplete.
>
> When the script is run it does report 3 warnings, they are as follows:
>
> Warning open_basedir restriction in effect. File is in wrong directory in
> /usr/local/psa etc
>
> Warning fopen("/tmp/phphfc2MQ","r") - Operation not permitted in
> /usr/local/psa etc
>
> Warning Supplied argument is not a valide File-Handle resource in
> /usr/local/psa etc
>
> Does anyone have any ideas why this is happening ?  Why the attachment
isn't
> complete ??
>
> Thanks in Advance
>
> Regards
>
>
> Darren
>
>
>



  Return to Index