Reply to Re: Suppressing PHP Warnings from CLI

Your name:

Reply:


Posted by Rik Wasmus on 01/22/08 23:37

On Tue, 22 Jan 2008 16:54:34 +0100, jerrygarciuh <jerrygarciuh@gmail.com>
wrote:
> On Jan 22, 9:29 am, ZeldorBlat <zeldorb...@gmail.com> wrote:
>> On Jan 22, 10:27 am, jerrygarciuh <jerrygarc...@gmail.com> wrote:
>> > Hello,
>>
>> > I have a couple of PHP scripts I use via cron and from the CLI. They
>> > always produce warnings like
>>
>> > PHP Warning: Module 'mysql' already loaded in Unknown on line 0
>> > PHP Warning: Module 'gd' already loaded in Unknown on line 0
>> > PHP Warning: Module 'zlib' already loaded in Unknown on line 0
>>
>> > I have read all of the commandline flags docs and there does not
>> > appear to be a flag to silence these warnings.
>>
>> > I currently call the scripts like so:
>>
>> > /usr/local/bin/php -f /www/subsites/foo/htdocs/bar/baz.php >> /dev/
>> > null
>>
>> > or
>>
>> > /usr/local/bin/php -q /www/subsites/foo/htdocs/bar/baz.php >> /dev/
>> > null
>>
>> Why not fix your PHP installation so those warnings don't happen?
>> It's always better to fix the problem rather than cover up the symptom.
>
> Thanks for the reply. Why do you assume I have root? I don't have
> the ability to alter the PHP install on this server.

Then tell the one who does to fix it. Especially on a server apparantly
run by someone else (do you pay for that?) one may expect some
professionalism & error-less setup.

On a side note:
command > /dev/null 2>&1
command &> /dev/null
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация