问题标签 [suphp]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3393 浏览

php - 来自远程服务器的 PHP scp 文件

如何从 PHP 脚本 scp 来自远程服务器的文件?

我已经尝试过shell_exec("scp remote:file dir"),但这不起作用,因为用户apaache在远程服务器上没有关联的 shell,因此不能执行 ssh。

我试图创建一个Copy.shsetuid 脚本,创建为user1并使用shell_exec("Copy.sh file dir"). Copy.sh然而,尽管有 setuid 标志,Apache 服务器(或 PHP?)在执行时并未更改 uid 。

本文 https://serverfault.com/questions/7589/how-do-you-run-a-php-script-as-the-files-owner-rather-than-as-the-webserver-us 建议安装suPHP,我似乎没有安装。这是要走的路吗?我已经mod_suexec安装了,但是这个模块似乎只能更改 PHP 脚本本身的 uid。它可以(ab)用来做我想做的事吗?

也许有一种方法可以user1为 PHP 脚本提供 ssh 密钥,所以它可以进行复制?

0 投票
0 回答
24 浏览

php - SuPhp versus no suPhp script

I have an error, with Suphp activated, no problem, but with Suphp not activated I have this error appears

I suppose in this case imagewebp is not supported by the server. Do you know how to resolve this ?

Also I would like to add that the image in successfully added in "/sources/images/products/" with .jpg extension. On the contrary, in SuPHP server where is image is uploaded successfully the image is saved with ".jpg.webp" in same location. I guess something is breaking during image conversion while saving an image.

Thank you.

There my function

line 101 is : imagewebp( $this->image, $filename, $compression );