betterphp does not currently provide support for this item.

6 comments found.

Hi. I would like to integrate this soft into existing sites. So I do not need admin protection. Would you please make a version of script with no admin check. Thank you.

Oh, sorry. It was easy. Just needed to take a look at a file :bigsmile:. But script is great as it points out at a security issues you may never even notice!

Just a question. How can I set error level to E_ALL ^ E_NOTICE (everything apart from E_NOTICE)

You will have to modify line 17 of

change it from
set_error_handler(array($this, 'log_error'), E_ALL);
set_error_handler(array($this, 'log_error'), E_ALL & ~E_NOTICE);

I will add a config option for this at some point as it is somethign people would want to change.

Hi there,

I have purchase your script and it’s very useful. Sometimes I get the error in the page error_log/ on line 42 “mysql_unbuffered_query() [function.mysql-unbuffered-query]: A link to the server could not be established” in my log file what can cause that ?


If it is that you are reaching the connection limit of the server, you can make that limit higher.

Ok and how I can change that ?

That depends on your server, it can be edited in your my.cnf file. For GNU based servers that is at /etc/mysql/my.cnf

Just purchased this … but nothing ever logs into the error log file and I can’t sign into the admin section to look at it even if something was logged in the error log file.

Installation was simple enough … change the password in the config and upload to web server via FTP . I tested example.php file and then tried signing into the admin section but it just keeps bringing me back to the sign in page … no errors.

Then I tried checking the error log file manually but there nothing there even though the example.php file I tested should have registered a couple of errors.

Any ideas? I’m testing this on a Windows Server machine using PHP 5 .x.

Well … I’m finally able to log in to the administrative section but no errors are ever recorded. I’d like to have the errors recorded to the errors.log file. I read the help document provided … but am I confused as to how this needs to be setup? It should automatically record to the file shouldn’t it? I don’t want to log the errors to MYSQL so I’m assuming I don’t need to change the configuration file at all to make this happen.

Any ideas what could be preventing this script from writing to the file?

Ok … finally got this to work.

I had to change up the file slightly to get this to work properly by modifying the following on line 120 …

if (file_exists($this->log_file)) { foreach (file($this->log_file, FILE_IGNORE_NEW_LINES) as $line => $data){ $data = unserialize($data); if ($this->show_full_paths !== true){ $data['file'] = basename($data['file']); } $errors[] = array_merge(array('id' => $line), $data); } }

This problem was likely caused because of the different permissions the server sets for a web user and an FTP user. Since I copied the files over using FTP , the errors.log file didn’t have the proper permissions. I deleted the errors.log file from the server using FTP and simply allowed file_put_contents to create the file, which in turn would give the file the proper permissions.

The modification above is really only to stop a couple of errors that show up when trying to view the error log view the admin panel when no error log exists.

Ah, that sounds like it could be the cause. It seems like a strange server set up to me though, I guess it doesn’t matter too much as long as you got it working :D

I will add a check in for the error log file in a future version, showing an error in the error logging admin area is not very pro ;)

this is great code, but can u upate it ?