Page 1 of 1
A PHP error was encountered
Posted: 04 Jul 2009, 03:10
by HeSitated
This morning i'm getting an error if i go to the download page:
A PHP error was encountered
Severity: warning
Message: stream_socket_client()[function.stream-socket-client]:unable to connect to unix:///tmp/ftdeamon (Connection refused)
Filename: ftd/ipc.php
Line number: 33
I don't know if it has something to do with it, but yesterday i updated my B2.
What is the problem?
And how do i resolve it?

Re: A PHP error was encountered
Posted: 05 Jul 2009, 04:31
by RobV
Hi HeSitated,
Maybe you had a torrent download active while updating?
Anyhow, the issue and a solution have been discussed in the forum before.
Please check:
http://forum.excito.net/viewtopic.php?p=6734#p6734
RobV
Re: A PHP error was encountered
Posted: 05 Jul 2009, 06:13
by HeSitated
Hi RobV,
RobV wrote:
Maybe you had a torrent download active while updating?
Nope, the update i had done the day before. The day it crashed, i just added a torrent...
RobV wrote:
Anyhow, the issue and a solution have been discussed in the forum before.
Thanks.
There is no ssh alternative?
Then you could write a script that:
- stop the process
- move the files
- start the process again
- move the files back
Re: A PHP error was encountered
Posted: 05 Jul 2009, 06:27
by RobV
Hi HeSitate,
Most probably it is possible, but I'm not that into Linux...
The most essential part of the trick is that the 'downloads' folders get cleaned up completely. The downloader service should be inactive during the cleaning.
RobV
Re: A PHP error was encountered
Posted: 06 Jul 2009, 07:52
by kfudd
Yes, there is a way to fix it from the Web GUI. Do the following:
- Log in as the user that caused the FTD to crash.
- Choose 'File Manager' from the links at the top.
- Delete the 'torrents' folder by checking it and choosing 'Delete' from the drop down at the bottom.
- Recreate the 'torrents' folder using the 'Create Folder' button at the bottom, use the default permissions.
- Log off.
- Login as the 'admin' user.
- Click the 'Services' link at the top,
- Uncheck 'Up and Downloads' at the bottom.
- Click the 'Update' button.
- Check the 'Up and Downloads' at the bottom.
- Click the 'Update' button.
- Log off.
Now the problem should be gone.
Re: A PHP error was encountered
Posted: 06 Jul 2009, 13:23
by HeSitated
Hi kfudd,
kfudd wrote:
Yes, there is a way to fix it from the Web GUI.
Thanks, i've read that in the link above.
But i would like to do it in a script, i can copy and/or remove files and folders.
But i do not know which proces to stop, how to do it and how to start it again.
Grtz
Re: A PHP error was encountered
Posted: 06 Jul 2009, 14:16
by asparak
/etc/init.d/filetransferdaemon stop might be a good place to start
Re: A PHP error was encountered
Posted: 06 Jul 2009, 18:56
by kfudd
Oh sorry.
You can start / stop / restart the FTD from the root account as follows:
/etc/init.d/ftd start
/etc/init.d/ftd stop
/etc/init.d/ftd restart
Re: A PHP error was encountered
Posted: 07 Jul 2009, 03:54
by tor
The service script is renamed in the latest upgrade.
To stop the downloader do:
Code: Select all
/etc/init.d/filetransferdaemon stop
start it again:
Code: Select all
/etc/init.d/filetransferdaemon start
/Tor
Re: A PHP error was encountered
Posted: 07 Jul 2009, 14:18
by kfudd
My bad, upgrading now.

Re: A PHP error was encountered
Posted: 08 Jul 2009, 15:41
by HeSitated
tor wrote:
To stop the downloader do:
Code: Select all
/etc/init.d/filetransferdaemon stop
start it again:
Code: Select all
/etc/init.d/filetransferdaemon start
Thank you all for your help!
The next time the daemon strikes, i'll write the script and try to embed it in the webpages....
Grtz
Re: A PHP error was encountered
Posted: 10 Aug 2009, 16:43
by jamerson
I don't know if this is a problem for many, but I realised that Mac OS is the culprit in my setup regarding this (and this only).
It creates files called .DS_Store when you put something in the torrent folder. This prevents the FTD from working correctly.
The solution:
http://support.apple.com/kb/HT1629
Might help someone...
/pelle
EDIT: Seems that it's actually a directory called .AppleDouble that is created. I don't know how to stop that.
Re: A PHP error was encountered
Posted: 12 Aug 2009, 04:49
by tor
Hi jamerson,
I think it actually might be the "afp-server" running at Bubba that creates these files. (Very anoying.) This however is something we overlooked when adding AFP. It could be considered a bug in FTD and i will add this to our bugtracker. Hopefully we might push a fix for this in next upgrade.
/Tor