Solved

define_syslog_variables, open_log

Posted on 2013-12-16
4
510 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 108

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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…
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now