Author Topic: Problem with uploading an attachment for sending an email  (Read 2400 times)

debbuxton

  • Posts: 23
    • View Profile
Problem with uploading an attachment for sending an email
« on: July 19, 2006, 01:38:05 pm »
Hey Dean,

Recently upgrade this site to the 1.86b. Went to "Add" a file for Attaching and experienced the following error:

Warning: move_uploaded_file(/dh/cgi-system/attach/castlewo.jpg): failed to open stream: No such file or directory in /home/compass/coachingschoolfornetworkmarketers.com/maillist/upload.php on line 72

Warning: move_uploaded_file(): Unable to move '/tmp/php5T7JYe' to '/dh/cgi-system/attach/castlewo.jpg' in /home/compass/coachingschoolfornetworkmarketers.com/maillist/upload.php on line 72
File Uploaded: castlewo.jpg (7818 bytes)

However the file doesn't upload.

This site is hosted on my dedicated server at Dreamhost.

It appears to be happening with the other 2 installs I have updated also. Any clue what might be the problem?

deb buxton

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Problem with uploading an attachment for sending an email
« Reply #1 on: July 19, 2006, 09:31:13 pm »
Deb,

In recent versions the ListMail "attach" folder is used for temporary storage of uploaded files.  The folder must be set up with the correct "writable" permissions, as per the help page:
http://listmailpro.com/help/attach.html

If you have troubles even with the correct permissions I recommend trying v1.87 as the process has been fixed for later versions of PHP.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

debbuxton

  • Posts: 23
    • View Profile
Problem with uploading an attachment for sending an email
« Reply #2 on: July 20, 2006, 04:18:24 pm »
Well, that was one of the first things I did was check to make sure permissions correct. They were.

I had tried to install 1.87 on another site and had problems, so didn't want to screw with things as I thought maybe because it was still in beta.

Crud....not sure what to do now.

Any other suggestions besides upgrading?

d

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Problem with uploading an attachment for sending an email
« Reply #3 on: July 23, 2006, 01:45:54 am »
Sorry about the delay - I was out of town and am playing catch-up.

This is a bug when PHP is being run as a "CGI" (probably makes no sense to you:).  You can either re-download v1.87 for the fix or search and replace the following line in edituser.php and upload.php (search for the string "$targdir" to find it):
Code: [Select]
    $targdir = substr($_SERVER['SCRIPT_FILENAME'],0,strrpos($_SERVER['SCRIPT_FILENAME'],'/')) . '/attach';
Change to:
Code: [Select]
    $targdir = getcwd(). '/attach';
The fix will be in all future releases.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting

debbuxton

  • Posts: 23
    • View Profile
Problem with uploading an attachment for sending an email
« Reply #4 on: July 23, 2006, 06:03:30 pm »
Thanks Dean. It is the weekend, so didn't expect an answer until next week anyway. :-)

I will check this out. My server is running php as cgi, but has always. But we all know how computers go. :-)

deb

debbuxton

  • Posts: 23
    • View Profile
Problem with uploading an attachment for sending an email
« Reply #5 on: July 24, 2006, 03:47:29 pm »
Thanks Dean. I upgrade to 1.87 no problems this time and everything working good.

Now can again plea for better statistics -- only because client wants to know how many unsubs and removes are happening. :-)

deb

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Problem with uploading an attachment for sending an email
« Reply #6 on: July 26, 2006, 08:14:39 am »
Hi Deb,

Until there are better statistics I recommend enabling "Notify when a user unsubscribes from this list" on the List Settings page.  Using this feature you're sent an email every time a user unsubscribes. You can count the notification emails to provide the data to your client.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting