Solved

define_syslog_variables, open_log

Posted on 2013-12-16
4
545 Views
Last Modified: 2013-12-17
I am typing words from a tutorial to an ide.  I do not understand what I am doing.

<?php
 define_syslog_variables();
 openlog("CHP7",LOG_USER);
 syslog(LOG_WARNING,"Chapter 7 example warning.");
 closelog();

Open in new window


Deprecated: Function define_syslog_variables() is deprecated in C:\wamp\www\oop-beg\ch6-3.php on line 2

Warning: openlog() expects exactly 3 parameters, 2 given in C:\wamp\www\oop-beg\ch6-3.php on line 3
0
Comment
Question by:rgb192
  • 2
4 Comments
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 334 total points
ID: 39723166
yes, This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.

ref. http://www.php.net/manual/en/function.define-syslog-variables.php
0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 334 total points
ID: 39723169
What is the php version you're using? please check with it. There are most list of functions given here, http://www.php.net/manual/en/migration53.deprecated.php
0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 166 total points
ID: 39724095
As always with PHP functions, if you're not sure what you're doing you can look them up on the PHP.net web site.  I couldn't work at all without it!  Unfortunately the way PHP has organized the pages, it requires you to scroll down quite a bit to see the deprecation warning.  But if you're going to use a function, you really should take a moment to read the entire man page, including the user-contributed notes.
words from a tutorial
Apparently a very, very antiquated tutorial!  I would get away from that -- it will probably be teaching you things that are no longer usable with PHP.

The current version of PHP is at minimum 5.4+ or 5.5+ so it follows that this function is no longer usable at all.

In my experience, I have never had any use for syslog.  Contrast error_log() and trigger_error() which are very useful!
0
 

Author Closing Comment

by:rgb192
ID: 39725131
PHP manual, and do not use syslog
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question