Tag Info

Hot answers tagged

2

How about this? find "`php-config --extension-dir`" -name "*.so" | sed 's!^.*/!extension=!' For each line, sed will match the longest string that starts at the beginning (^) and ends at /. It will always match everything up to and including the last /, because it is a greedy match, i.e., it will match everything but the filename. It then replaces that ...


1

Why not use top -bd 5 -n 3 -p `pidof init` >> /home/test/nik/myscriptoutput2 instead of your whole script... In PHP you can use <?php $file = "/home/test/nik/myscriptoutput2"; $output = shell_exec('top -bd 5 -n 3 -p `pidof init`'); file_put_contents($file, $output); ?>


1

php.ini has a directive has been named disable_functions , For example: disable_functions = ...


1

If you have a GNU find you can use -printf option find `php-config --extension-dir` -name "*.so" -printf 'extension=%f\n'


1

If you give a PHP script to someone there is no way you can limit its use, since the person can modify the script as he wishes before putting it into the server. And if you give it to him encrypted, it won't be usable. What you can do is to host your PHP script on your server and allow the person to call it remotely from his script. However, I'm not sure ...


1

While your question actually confused me, I believe you should move away from using a php script to handle the snmptrapd service. That file (/etc/snmp/snmptrapd.conf), is used by the snmptrapd service which can be enabled at whatever run level you wish (3, 4, 5) and can be configured to log traps to MySQL, so there is no need to create a separate daemon. ...


1

Try to specify the full path: zend_extension = /full/path/to/ioncube_loader_lin_5.4.so I don't know from when is this change, but one was used to always specify full path for zend_extension until a build of PHP 5.5 (on Fedora, but I think it's the same on Debian). I think it's a maintainer choice.


1

I suppose you could use readfile to dump the file you've just created towards the browser. Alternatively, you could issue a 302 temporary redirect to index.html.


1

It was a simple syntax issue. vim /etc/php.ini ; Maximum amount of memory a script may consume (128MB) ; http://www.php.net/manual/en/ini.core.php#ini.memory-limit memory_limit = 1536 The problem was with the line I had changed. memory_limit = 1536M If you don't specify the suffix indicating the memory allocation, it does memory ...



Only top voted, non community-wiki answers of a minimum length are eligible