Where to find shell_exec to enable or disable it? - shell-exec

I have a tube with MechBunny script on it, and the encoder is not running at all. The developer said it is because shell_exec being blocked. I quote: "you most likely have shell_exec on the list of disabled functions in php"
Tried searching in php.ini, but I only see this:
disable_functions=
How can I find shell_exec and enable or disable it?
Thank you,

You need to edit php.ini file.
Look for the line which contains: (your line might be having more functions listed, this is just an example)
disable_functions = "show_source, system, shell_exec, exec"
And remove shell_exec from that list.
When you are finished editing your php.ini, you will need to restart your Apache server.

Related

Set Extended Attributes with AppleScript Objc

So I am looking for a way to set Mac specific extended attributes (specifically kMDItemWhereFroms) for a file (Image File, Jpg) using AppleScript or AppleScript-Objc.
There is a command line tool that will do this xattr -w kMDItemWhereFroms . The problem is that on the several machines that I have access to (10.12, 10.13, and 10.14) when you run this command as a do shell script from within an AppleScript it does not work, the metadata is not added to the file. If I set Script Debugger to debug mode, and go through the script step by step it will actually set the metadata, but since that is not the way I am running the script, it is more of an interesting fluke than anything else. I have tried running the command with both "com.apple.metadata:" included and not included with the shell script and that makes no difference.
I have tried running my script through SD, Script Editor and osascript, and they all fail to update the metadata. So I am thinking that this tool might be broken when called from an AppleScript.
I found setxattr but that looks like it only applies to C.
So my questions are
1. Is there a way to set the extended attributes of a file on MacOS using Aobjc? if not then
2. Is there a way to get setxattr to work with either version of AppleScript? Probably not so
3. Any ideas how I might be able to get the command line tool xattr -w kMDItemWhereFroms to work when using scripting?
This is more of an annoyance for me, I am just being stubborn with wanting the source of the file to show up in the "Where From" data in the Get Info window from the Finder. I already am setting some metadata for the file using exiftool. So it is more of an interesting problem for me, than a critical problem that I must try and solve now. Thanks!

Use only a single Geany instance under Windows

I'm running Geany 1.34.1 under Windows 10. Whenever I click a text file on Windows Explorer Geany opens the file in a new instance.
How can I configure Geany so that it opens all files in a single instance only?
According to a section of the Geany documentation, the behavior you want should occur unless Geany is started with the appropriate command line option. From the table of command line options, that would be either -i or --new-instance.
Check your file type association for text files and delete either of those command line options if they're there.
If no options are found, you might check your Geany configuration file to see if there's something related to starting a new instance. If so, you can try deleting the related stuff and see what happens. Be sure to make a backup copy of the configuration file before editing it so you can recover in case something goes terribly wrong.
If no options are found anywhere, then it may be a bug in the Windows version of Geany.

calling/executing unix scripts on windows with cygwin

Imagine you have a program or script which calls shell scripts or commands on Unix/Linux.
For example, php example:
<?php
$call = system('./myscript.ksh', $retval);
?>
Now, that PHP script is being moved to windows.
Will installing cygwin allow system calls like "./script.ksh" to work,
or will it need changed to something like "cmd /c script.ksh"?
You could associate .ksh files with c:/cygwin/bin/ksh.exe this way:
right click a .ksh file
Open with...
Browse to and select c:/cygwin/bin/ksh.exe
Make sure you check Always use this program to open this kind of file
Test the above procedure by double-clicking the .ksh file.
I think your original PHP code should work after this. But try it first, I'm not absolutely sure.
I'm not sure that SzG's answer will work. It may. And if it does, it's probably the easiest way.
However, you should be able to get this working exactly as you want by installing the Cygwin version of PHP. Unfortunately, it's not one of the regular Cygwin packages, but it is available from Cygwin Ports. You can get the instructions on how to install that from the Cygwin Ports home page: http://cygwinports.org/.

weird chars on tab completition terminal

I am using putty to connect to the a server.
Whenever i press tab.. for file name completion... it puts some weird character..
the ups and downs arrow doesnt work.. and ulimately i end up typing everything.. (the file names..)
for example
directory has file.. foo.py foo.txt
$python foo.py fo[tab].... i am hoping to see the selections.. (foo.py, foo.txt) and stuff
and it shows that...but it also adds a char to the end..and if i try to erase it.. it puts more characters in the end.. :(
Any suggestions on what might be the issue?
Thanks
Autocomplete and history depends on what environment the server is running. So I'm afraid there's nothing to enable from the client-side. If you can find out what environment the server is running and you have write-access, then maybe you could find some environment-specific edits to be made (to config files and such).

jMeter Server Mode - Windows can not find "rmiregistry"

When I try to execute jMeter in server mode, I get this exception:
"Windows can not find 'rmiregistry'"
. I don't know how to solve this, I googled about it, but I didn't find anything related to my problem.
It sounds like you don't have the rmiregistry in your path. Make sure the java\bin directory is in your path.
Once that's done, to check it's working:
Start -> Run -> cmd -> start rmiregistry
If that doesn't work, check your path again.
You may need to start the registry yourself, before running the jmeter-server.bat. Additionally, edit the batch file to make sure it's running with the correct server settings.
Dylan's answer is the most likely, but just to add clarification, your path is stored as an environment variable in Windows. From the command line, you can run:
echo %PATH%
To see the value of the variable. You should see a semi-colon delimited output of various directory paths.
To append to the variable (if java\bin isn't in there) use the following:
set PATH=%PATH%;[full path to java\bin]
To check that the RMI registry has started correctly, you can check that it is listening on its standard port (1099 unless you've specified otherwise) with a tool such as TCP View.

Resources