Shifting from App Services to a Docker container due to file persistence?
Thank you @CSharpRocks posting your suggestion as an answer to help other community members for similar issue.
Based on the MS DOC:
- To Customize PHP_INI_SYSTEM directives we can't use the
_.htaccess_
approach. App Service provides a separate mechanism using thePHP_INI_SCAN_DIR
app setting. First, run the
following command in the Cloud Shell to add an app setting calledPHP_INI_SCAN_DIR
.az webapp config appsettings set --name <app-name> --resource-group <resource-group-name> --settings PHP_INI_SCAN_DIR="/usr/local/etc/php/conf.d:/home/site/ini"
For example if want to change the value of expose_php run
the following commands:
cd /home/site
mkdir ini
echo "expose_php = Off" >> ini/setting.ini
For more information please refer this SO THREAD
how to extract TODOS from java source files
Ive made a simple python script which achieves this task thanks for the grep suggestion
#!/usr/bin/python
import commands
import sys
path= sys.argv[1]
a=commands.getoutput("grep -e //.*todo -e //.*TODO -R "+path).split("\n")
print "\\begin{itemize}"
lastFileName=""
firstItem=1;
open=0
for ln in a:
ln=ln.replace("\t","").replace("//","").replace("{","").replace("}","").replace("\\","")
if lastFileName!= ln[0:ln.find(":")]:
lastFileName= ln[0:ln.find(":")]
if firstItem!=1:
print " \\end{itemize}"
open=1
print "\\item "+lastFileName+" \n \\begin{itemize}"
firstItem=0
open=1
print " \\item "+ln[ln.find(":"):len(ln)]
if open:
print " \\end{itemize}"
print "\\end{itemize}"
Call to undefined function imagewebp (Dockerfile, php, gd, webp)
I tested a simple Dockerfile based on an example copied from this repository.
My Dockerfile looks like this:
FROM php:7.2-apache
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions gd
COPY index.php /var/www/html/
Before building, I create a php file, index.php, to copy to my new image.
<?php
phpinfo();
?>
Then, I build and run my new image with these commands:
docker build -t php7-with-gd -f Dockerfile .
docker run -d --rm -p 88:80 --name test-phpgd php7-with-gd
And my output page with the PHP information looks like this.
Is the order of the virtual table important?
The order of the vtable is important for things to work properly, but only to the compiler (i.e. you don't need to care because it takes care of it).
If the compiler put it out of order for itself, then yeah, things would break, because functions are looked up by offset (so an offset would yield a random function which would be catastrophic).But the average programmer doesn't need to worry about what order the vtable is in.
Related Topics
Elf Header or Installation Issue with Bcrypt in Docker Container
Delete a Column from a Delimited File in Linux
Linux 64 Command Line Parameters in Assembly
How to Automate Telnet Session Using Expect
Escaping Quotes When Using Ssh
Bash "Declare -A" Does Not Work on MACos
How to Split Mailbox into Single File Per Message
How to Execute an Local Script in Remote Server with Parameters
How to Send a Sequence of at Commands to a Serial Port in Bash
Install Marklogic Centos Virtualbox Vm
Remove File Coding Mark But Preserve Its Coding
How to Connect a Shell to a Pseudo Tty
How to Find a List of Ip Addresses in Another File
How to Run Multiple Tor Processes at Once with Different Exit Ips