AFP connection problem when accessing sinology from mac

I was able to fix the issue by doing the following on DSM 6.1.3-15152 Update 2, macOS Sierra 10.12.6

Go to system preference and then go to Sharing. Select the File Sharing menu in the left side vertical bar, then go in option and uncheck the Share files and folders using SMBand leave the Share files and folders using AFP checked.

MySQL find first, last row

SELECT
this,
query,
SUBSTRING_INDEX(GROUP_CONCAT(CAST(rocks AS CHAR) ORDER BY _date), ',', 1 ) as top,
SUBSTRING_INDEX(GROUP_CONCAT(CAST(rocks AS CHAR) ORDER BY _date DESC), ',', 1 ) as bottom

FROM database

MySQL, loading fixed width file

LOAD DATA INFILE '/tmp/test.txt'
INTO TABLE table(@var) SET
name=Trim(SUBSTR(@var,1,24)),
something=Trim(SUBSTR(@var,25,4)),
else=Trim(SUBSTR(@var,29,3));

The first number is the starting row, the second number is the length of the field. @var in this example is a randomly named variable. Name, something & else describe the database column(s).

Executing a PHP script every few seconds

Open /etc/crontab with VI and add lines similar to the ones seen below. Make sure to use <tab> instead of spaces!

* * * * * root php /your/file/location.php > /dev/null 2>&1
* * * * * root sleep 10; php /your/file/location.php > /dev/null 2>&1
* * * * * root sleep 20; php /your/file/location.php > /dev/null 2>&1
* * * * * root sleep 30; php /your/file/location.php > /dev/null 2>&1
* * * * * root sleep 40; php /your/file/location.php > /dev/null 2>&1
* * * * * root sleep 50; php /your/file/location.php > /dev/null 2>&1

 

Restart cron deamon using the command show in this post.

Back to Top