Solved

define_syslog_variables, open_log

Posted on 2013-12-16
4
530 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 109

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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.

770 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