I have a very limited access to server php configuration files .
when I run some of my cron scripts which involves writing log files , I am getting a warning like this
Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0
I googled a lot to find the reason , I got to know that we need to replace the '#' with ';' in ming.ini file .
I informed this to my server admin to fix this
below is the link where I got this fix
How to fix: PHP Deprecated errors
Later , for some of the scripts issue got fixed but for some of them I started getting same error in different php configuration file
eg .
PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0 PHP Deprecated: Comments starting with ‘#’ are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
What actually is the problem , below is my server specification
OS : ubuntu 12 php : 5.4
Is this a usual behaviour do I need to change these comments from '#' to ';' in every file .
OR is this an issue with PHP 5.4 .
Please provide any information if you have or an easy way to avoid this error in application level ( code )
Thanks in advance for reading this post
Use the introduction to get the reader's attention and interest in the topic. Define the problem you are going to discuss and provide a short overview on what you think and why. Summarize the most important arguments that best support your opinion.
An HTML comment begins with <! –– and the comment closes with ––> . HTML comments are visible to anyone that views the page source code, but are not rendered when the HTML document is rendered by a browser.
Inline comments are comments made by an instructor that appear directly on top of your paper. These comments are usually brief.
-- --> is an HTML comment tag.
You can patch the comments with this shell command:
find /etc/php5/cli/conf.d/ -name "*.ini" -exec sed -i -re 's/^(\s*)#(.*)/\1;\2/g' {} \;
It basically finds all .ini
files below /etc/php5/cli/conf.d/ and executes sed on it, which replaces any #
comment line literal by ;
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With