Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

define_syslog_variables, open_log

Posted on 2013-12-16
4
Medium Priority
?
584 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 1336 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 1336 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 111

Accepted Solution

by:
Ray Paseur earned 664 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

722 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