[SOLVED] error_reporting and CodeLock

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jumpshotjonny
Forum Newbie
Posts: 5
Joined: Tue Sep 21, 2004 9:48 pm
Location: MD, USA

error_reporting and CodeLock

Post by jumpshotjonny »

I'm having a problem here, I'm trying to set the error_level to show only errors and parse errors for a PHP application I am working on and some of the files must be encrypted. The encryptor being used is CodeLock(http://www.codelock.co.nz/). The reason I need the error level set to that level is so that the warnings that come up when fsockopen cannot connect to a host are not displayed.

With all of the script files unencrypted everything works fine and no warnings are displayed but once the files that need to be encrypted are encrypted these warnings are displayed and I need to get them removed.

Has anyone had any experience with Codelock? Or have had similar problems as I have?

Codelock makes use of the eval function to execute encrypted code, would code executed with eval have problems using the error level set using the error_reporting function?

Any help anyone can provide would be greatly appreciated.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

have you tried using the @ operator?

http://www.php.net/manual/en/language.o ... ontrol.php
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

php.ini

Post by phpScott »

look for "Error handling and logging" section in your php.ini file to set error levels and how to display or log them.
The top or the ini file also has a lot of explanation on error reporting/logging.
jumpshotjonny
Forum Newbie
Posts: 5
Joined: Tue Sep 21, 2004 9:48 pm
Location: MD, USA

Post by jumpshotjonny »

have you tried using the @ operator?
Gah! I feel like such a dunce. :) The thought just hadn't crossed my mind. That seems to have worked. Thanks!

I can't set the error level in the php.ini file because this application is being distributed so it has to work with a wide variety of configurations. And people tend to get scared when they see those warnings so I needed get rid of them.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

[php_man]ini_set[/php_man]
jumpshotjonny
Forum Newbie
Posts: 5
Joined: Tue Sep 21, 2004 9:48 pm
Location: MD, USA

Post by jumpshotjonny »

Actually, I tried ini_set as well but for whatever reason error_reporting and ini_set have no effect when I have the files encrypted. It's really odd but those were the main warnings I couldn't rid of but the @ operator has solved that. Everything else was taken care of by cleaning up the code.
Post Reply