Ticket #5485 (closed Bugs: wontfix)

Opened 5 months ago

Last modified 3 months ago

Comments starting with '#' are deprecated in php 5.3

Reported by: mbrevda Assigned to: p_lindheimer
Priority: minor Milestone: 2.11
Component: Asterisk SIP Settings Version: 2.9-branch
Keywords: Cc:
Confirmation: Need Feedback SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

Sipsettings throws this error when pasring sip.conf et al:

2012-Jan-02 06:44:10	SNIP/framework/branches/2.10/amp_conf/htdocs/admin/modules/sipsettings/page.sipsettings.php:993
[]: Comments starting with '#' are deprecated in /etc/asterisk/sip.conf on line 30

Change History

01/02/12 12:44:54 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.
  • component changed from - choose - to Asterisk SIP Settings.

that is a result of this line in the sip.conf file:

#include sip_general_additional.conf

well sipsettings is parsing the files in sipsettings_check_custom_files() with:

$sip_conf = @parse_ini_file($file,true);

where we are checking if there are any settings in the custom or other files so we can warn them of potential conflicts. The same thing will exist in IAX Settings I think. We are already suppressing the warning with the "@" notation.

If we are concerned about the warning (which is always valid), we could use file() and then dump all the lines that have a #include, then implode what remains into parse_ini_string() instead?

Thoughts?

01/02/12 13:19:35 changed by mbrevda

(We apparently ARENT suppressing the error.) If the function will fail in the future then we should find a new way to parse the file. The parse_ini_file() seems to no longer be designed to handel our needs. Hence, we should probably write our own.

01/02/12 13:27:27 changed by p_lindheimer

'@' suppresses the error to the screen, I think notices are always sent if you have an error handler.

In any event, I agree it could mean problems in the future. In this case and IAX Settings there is simply a need to parse the ini while ignoring the #includes (since we don't care about what is in the auto-generated ones). So we can add a utility that does this and used by both these modules, affectively doing what I described above which is stripping out the #includes and then parsing what is left.

01/02/12 13:33:53 changed by GameGamer43

I agree that a more flexible method for us will be to write our own method to handle parsing files.

03/01/12 16:06:41 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to wontfix.
  • milestone set to 2.11.

given the current usage of this, closing as wontfix for now and if it makes PHP fail going forward or becomes a real issue we can address the problem down the road.