PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Suppressing PHP Warnings from CLI
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Suppressing PHP Warnings from CLI

Réponse
 
LinkBack Outils de la discussion
Vieux 22/01/2008, 15h27   #1
jerrygarciuh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Suppressing PHP Warnings from CLI

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

Any advice?

TIA!!

JG
  Réponse avec citation
Vieux 22/01/2008, 15h29   #2
ZeldorBlat
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Suppressing PHP Warnings from CLI

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
>
> Any advice?
>
> TIA!!
>
> JG


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.
  Réponse avec citation
Vieux 22/01/2008, 15h54   #3
jerrygarciuh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Suppressing PHP Warnings from CLI

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

>
> > Any advice?

>
> > TIA!!

>
> > JG

>
> 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.

JG

  Réponse avec citation
Vieux 22/01/2008, 16h56   #4
jerrygarciuh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Suppressing PHP Warnings from CLI

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

>
> > Any advice?

>
> > TIA!!

>
> > JG

>
> 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.

JG

  Réponse avec citation
Vieux 22/01/2008, 18h48   #5
AnrDaemon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Suppressing PHP Warnings from CLI

Greetings, jerrygarciuh.
In reply to Your message dated Tuesday, January 22, 2008, 18:27:59,

> 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.


Why not fix Your scripts instead?


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

  Réponse avec citation
Vieux 22/01/2008, 19h05   #6
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Suppressing PHP Warnings from CLI

jerrygarciuh 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
>>> Any advice?
>>> TIA!!
>>> JG

>> 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.
>
> JG
>
>


Then you need to get whomever set it up to fix the problem.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 22/01/2008, 21h20   #7
jerrygarciuh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Suppressing PHP Warnings from CLI

On Jan 22, 12:48 pm, AnrDaemon <anrdae...@freemail.ru> wrote:
> Greetings, jerrygarciuh.
> In reply to Your message dated Tuesday, January 22, 2008, 18:27:59,
>
> > 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.

>
> Why not fix Your scripts instead?
>
> --
> Sincerely Yours, AnrDaemon <anrdae...@freemail.ru>



The following script exhibits this problem. How would you suggest I
fix it?

#!/usr/local/bin/php
<?php
// nothing to see here
?>
  Réponse avec citation
Vieux 22/01/2008, 21h22   #8
jerrygarciuh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Suppressing PHP Warnings from CLI

On Jan 22, 1:05 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> jerrygarciuh 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
> >>> Any advice?
> >>> TIA!!
> >>> JG
> >> 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.

>
> > JG

>
> Then you need to get whomever set it up to fix the problem.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================



So your response is that I cannot programmatically suppress these
messages? Yes?

JG
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,19066 seconds with 16 queries