473,480 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Jan 22 '08 #1
5 1974
On Jan 22, 10:27 am, jerrygarciuh <jerrygarc...@gmail.comwrote:
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.
Jan 22 '08 #2
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 <an*******@freemail.ru>

Jan 22 '08 #3
On Jan 22, 12:48 pm, AnrDaemon <anrdae...@freemail.ruwrote:
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
?>
Jan 22 '08 #4
jerrygarciuh wrote:
On Jan 22, 12:48 pm, AnrDaemon <anrdae...@freemail.ruwrote:
>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
?>
As Rik said - get the admin to fix the problem. If you're paying for
hosting, you should expect at least a clean interface.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 23 '08 #5
On Jan 22, 6:16 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
jerrygarciuhwrote:
On Jan 22, 12:48 pm, AnrDaemon <anrdae...@freemail.ruwrote:
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
?>

As Rik said - get the admin to fix the problem. If you're paying for
hosting, you should expect at least a clean interface.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Gotcha, thank you for the replies!

JG
Jan 23 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1230
by: Qopit | last post by:
Does anyone know how to stop the command line pychecker from analyzing particular modules? It really gets slowed down on some big ones. In particular having 'import wx' takes a long while (30 -...
40
7806
by: Dave Hansen | last post by:
Please note crosspost. Often when writing code requiring function pointers, it is necessary to write functions that ignore their formal parameters. For example, a state machine function might...
4
2282
by: wazdakka | last post by:
I have an Access application developed using Access 2003 that I am trying to distribute. I have used the Package and Deployment Wizard that comes with the Office 2003 Developers Kit, and have been...
5
364
by: usenet | last post by:
Is there any way to selectively suppress compiler warnings from designated header files (Ex: Boost header files) using gcc-3.3.1 on Linux PC? We tried using -Wno-system-headers option but it did...
1
1430
by: Claire | last post by:
Visual Studio 2005 In my setup project, I've needed to include external setup files required to install a manufacturers smart card reader drivers. This collection of files includes those needed...
0
7037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7032
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6730
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6873
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4767
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.