freebsd

How to populate SCRIPT_FILENAME and SCRIPT_PATH server vairables to php-cgi from the command line

梦想与她 提交于 2019-12-11 14:19:16
问题 I'm trying to run cron php script from command line. The server does not have PHP CLI but php-cgi exists. I tried to pass PHP directly to php-cgi but this does not work because two server environment variables are missed ( $_SERVER['SCRIPT_FILENAME'] and $_SERVER['SCRIPT_PATH'] ). I tried to fill variables using following recommendation but these variables are not populated. What is missed in this answer? How to make php-cgi populate these server values? The question is not platform specific,

How to read actual file data from Freebsd VFS vnode

拈花ヽ惹草 提交于 2019-12-11 13:38:42
问题 I am currently trying to extract file data from Freebsd VFS vnode. struct vnode { /* * Fields which define the identity of the vnode. These fields are * owned by the filesystem (XXX: and vgone() ?) */ const char *v_tag; /* u type of underlying data */ struct vop_vector *v_op; /* u vnode operations vector */ void *v_data; /* u private data for fs */ /* * Filesystem instance stuff */ struct mount *v_mount; /* u ptr to vfs we are in */ TAILQ_ENTRY(vnode) v_nmntvnodes; /* m vnodes for mount point

String normalization in pure bash

穿精又带淫゛_ 提交于 2019-12-11 10:48:46
问题 The characters 'É' ( E\xcc\x81 ) and 'É' ( \xc3\x89 ) have different code points. They look identical, yet when testing for a match the result is negative. Python can normalize them, though: unicodedata.normalize('NFC', 'É'.decode('utf-8')) == unicodedata.normalize('NFC', 'É'.decode('utf-8')) returns True . And it prints as É. Question: is there a way to normalize strings in pure bash* ? I've looked into iconv but as far as I know it can do a conversion to ascii but no normalization. *GNU

FreeBSD issue a system call from another system call

家住魔仙堡 提交于 2019-12-11 10:32:11
问题 I wrote some freebsd kernel modules like 1 year ago, they were working fine at that time. But now I can't compile. What I'm trying to do is to hook an existing system call by modifying sysent table. static int mkdir_hook (struct proc *p, struct mkdir_args *ua) { printf("Making dir: %s\n", ua->path); return mkdir(p, ua); } static int load (struct module *module, int cmd, void *arg) { int error = 0; switch (cmd) { case MOD_LOAD : sysent[SYS_mkdir]=mkdir_hook_sysent; break; case MOD_UNLOAD :

No formats supported in PHP/ImageMagik/imagick

我的未来我决定 提交于 2019-12-11 10:11:24
问题 I've installed pecl-imagick from FreeBSD ports and it can't do a thing with images. phpinfo() reports this: ImageMagick number of supported formats: 0 ImageMagick supported formats: no value But ImageMagick installed correctly and show all it's stuff: $ convert -list configure ... DELEGATES bzlib fftw fontconfig jpeg jng lzma png zlib ... What could be wrong and how to fix it? 回答1: I found that having an extension for GraphicsMagick (a "better" fork) installed causes that. If you don't feel

Redhat镜像-RHEL-官方镜像下载大全

无人久伴 提交于 2019-12-11 09:40:32
Redhat镜像-RHEL-官方镜像下载大全 转载 weixin_30911451 发布于2019-05-30 15:24:00 阅读数 4316 收藏 展开 原网站内容链接:https://pan.baidu.com/s/12XYXh#list/path=%2F 已经存在自己的云盘上了 转载于:https://www.cnblogs.com/yr1126/p/10949794.html Linux操作系统各版本ISO镜像下载(包括oracle linux\redhat\centos\ubuntu\debian等) 2015年2月25日, 下午7:49 1、Oracle Linux( 下载地址 ) (1)OracleLinux-Release6-Update0-x86_64-dvd.iso (2)OracleLinux-Release6-Update1-x86_64-dvd.iso (3)OracleLinux-Release6-Update2-x86_64-dvd.iso (4)OracleLinux-Release6-Update3-x86_64-dvd.iso (5)OracleLinux-Release6-Update4-x86_64-dvd.iso (6)OracleLinux-Release6-Update5-x86_64-dvd.iso (7)OracleLinux

A simple new system call in FreeBSD-11.0-RELEASE-amd64

旧街凉风 提交于 2019-12-11 06:43:15
问题 I am a newbie in FreeBSD. I installed FreeBSD-11.0-RELEASE-amd64 on VMware. I want to add first new system call. I find this link. I Did: cd /usr/src/sys/kern ee mykern.c #include <sys/sysproto.h> #include <sys/proc.h> #include <sys/types.h> #include <sys/systm.h> #ifndef _SYS_SYSPROTO_H_ struct myargs { int k; }; #endif int func(struct thread *p, struct myargs *uap) { printf("Hello"); return (0); } I added my system call to the end /kern/syscalls.master 550 AUE_NULL STD { int func(int k);}

How can a process inquire, when it was started?

房东的猫 提交于 2019-12-11 04:34:37
问题 Is there a call, that can be used to ask the OS, when the current process started? Of course, one could simply call gettimeofday() at start-up and refer to that once-recorded value through the life of the process, but is there another option? Obviously, the OS keeps the record for each process (one can see it in the output of ps , for example). Can it be queried by the process itself (using C)? An ideal solution would, of course, be cross-platform, but something (Free)BSD-specific is fine too

awk/sed: Insert file content before last line of specific block number

僤鯓⒐⒋嵵緔 提交于 2019-12-11 04:14:53
问题 Given are two files, the first is an Apache config file: $ cat vhosts-ssl.conf <VirtualHost *:443> vhost 1 foobar 1 foobar 2 barfoo 1 barfoo 2 </VirtualHost> <VirtualHost *:443> vhost 2 foobar 2 barfoo 1 foobar 1 barfoo 2 </VirtualHost> <VirtualHost *:443> vhost 3 foobar 1 barfoo 1 foobar 2 barfoo 2 </VirtualHost> <VirtualHost *:443> vhost 4 foobar 1 foobar 2 barfoo 1 barfoo 2 </VirtualHost> And the second file contains lines that should be added to the end of one (variable) specific

Add a new system call at FreeBSD-11.0-RELEASE-amd64

。_饼干妹妹 提交于 2019-12-11 01:19:26
问题 I am a beginner in FreeBSD. I installed FreeBSD-11.0-RELEASE-amd64 on VM. I want to add first new system call. And this is my post in last week. Now I want to build kernel. I see handbook. But In command make buildkernel , indicates errors! mykern.c #include <sys/sysproto.h> #include <sys/param.h> #include <sys/types.h> #include <sys/systm.h> #include <sys/module.h> #include <sys/kernel.h> #include <sys/proc.h> #include <sys/sysent.h> #ifndef _SYS_SYSPROTO_H_ struct myargs { unsigned int k0;