使用ocaml读取时,我遇到了以下示例服务器代码:
# let establish_server server_fun sockaddr =
let domain = domain_of sockaddr in
let sock = Unix.socket domain Unix.SOCK_STREAM 0
in Unix.bind sock sockaddr ;
Unix.listen sock 3;
while true do
let (s, caller) = Unix.accept sock
in match
发现了这个问题,参见下面的结尾
我有一个php页面,我保存了一个cookie:
include "scripts/mytoolkit.php";
...
if ($val != "") saveCookie('mycookie', $val, 100*365, "www.domain.com"); // tested, $val is not empty and is a string. Want to keep the cookie for 100 years :-))
...
用mytoolkit.php
function
我需要一个cron作业来更改目录并运行命令。
命令:
cd /var/www/domain.com/httpdocs
sake cron/test
我写了这个.sh文件(/var/here/and/here/test.sh):
#!/bin/bash
cd /var/www/domain.com/httpdocs
sake cron/test
我对文件进行了"chmoded“处理:
chmod 777 test.sh
当我运行它时:
sh /var/here/and/here/test.sh
输出是这样的:
[1] : No such file or directoryrons/tes
我用ubuntu18.04设置了一个新的VPS,包括virtualmin/usermin。在auth.log里我看到了很多
su[12936]: Successful su for domain by root
su[12936]: + ??? root:domain
systemd-logind[148]: New session c315 of user domain .
su[12936]: pam_unix(su:session): session opened for user domain by (uid=0)
su[12936]: pam_unix(su:session): s
我使用scp将文件复制到本地计算机。该文件是html文件,我认为错误是由于html标记造成的,因为错误是:
syntax error near unexpected token `newline'
/home/admin/web/domain.tld/document_errors/50x.html-old: line 1: `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&g
tameen@tameen-HP:~/Downloads/$ sudo -u postgres
tameen@tameen-HP:~/Downloads/$ sudo -u postgres psql
[sudo] password for tameen:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgres