CakePHP error.log does not show url - cakephp

I am looking at the error.log file for my site and I am seeing a few errors.
It tells me the file and the line number which helps, but it would be a lot easier to figure out what was going on if I knew what URL was requested that caused the problem.
Anyways to tell the logs to log the URL requested when they log an error?

Cake has support for customising your logging. You probably want to override write to prepend the URL for the request before letting parent::write() do all the hard work.

Related

Importing apache logs into piwik

I am in the process of switching my site analytics from GA to Piwik and would like to incorporate all the historic data that I can. I have already concatenated the full trail of apache log files I have in my possession. However, what I do next is not at all clear to me and the Piwik documentation does not help. It says something along the lines of
python /path/to/piwik/misc/log-analytics/import_logs.py --url=http://analytics.example.com access.log
I have my concatenated log file, all.logs, in the log-analytics folder. I would have thought that I just need to issue
python /path/to/piwik/misc/log-analytics/import_logs.py all.logs
but that throws up an error message. When I provide the URL to the site in question too I get an error saying that it gets back an HTML document (naturally) which it does not like.
I'd be most grateful to anyone who might be able to put me on the right track here.
I think --url=http://analytics.example.com let's you set the URL of Piwik, not your website.

Joomla site shows IP address instead of url

I am finalizing my Joomla-site with a Siteground host and encounter the following problem: my site shows the IP-adress instead of the url. Although I type in the url (www.nooitmeerfile.be by the way), it shows the IP-adress.
Could someone please give me a step-by-step explanation on how to fix this? I happen to find a lot of fragmented answers cluttered around the web. I am a novice user, and I'm stuck :-)
Thanks!
Possible steps to debug your issue:
Check configuration.php public $live_site = ''; and try to add your
domain (without trailing slash).
Check if .htaccess file is not altered and try to download and use a fresh copy.
Check if you are using 3rd party sef components / plugins and try to disable them.
Clear your joomla and browser cache.
Contact your hosting provider if something in your hosting is misconfigured.
Hope this helps

New to CakePHP: Need help setting up error log

I'm new to CakePHP. I'm getting an internal server error in my app, but I haven't been able to locate my error log. I looked at the official docs, but I didn't find anything on what the log file is named or where I could find it. I'm not even sure whether error logging is enabled by default. Any help you can offer is appreciated. Thanks.
Look in your /app/tmp/logs/ folder, the file name should be error.log
I believe it is enabled by default, at least when debug is set to 2 in /app/Config/core.php.
Configure::write('debug', 2);

Joomla Redirect when Download File not Found

I have a website where customers can download msi files. Over time, I retire older version and drop them from my site.
I've noticed that a number of users are following links to the older file paths. When the do, they're seeing the following:
Not Found
The requested URL /files/VBADiff/VBADiff_Professional_Setup_2_0.msi was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I would like to either display my custom 404 message or redirect them to the correct download path. Unfortunately I can't figure out how to do this - I'm a bit surprised that visitors aren't already seeing my 404 message. Can anyone help?
Edit: I'm using version 1.5.11 of Joomla.
File downloads, particularly direct links from an outside referrer do not instantiate the Joomla framework so nothing in Joomla is going to help your problem. Depending on the URLs you are using to get to the files, you will have to fix this issue with either a typical 301 redirect for URLs without query strings or mod_rewrite for those with.
You can use a redirect plugin for joomla 1.5 which also protocalls 404 accesses. I like this one: http://extensions.joomla.org/extensions/site-management/url-redirection/14676

Apache2 error log full of (13)Permission denied: and File does not exist:?

Before this was not bothering me, but now when website traffic has gone medium i get more and more of these messages in my error.log:
File does not exist:
(13)Permission denied:
What's funny about that is that 90% of the files that are being tagged as permission denied do not actually exist on my server.
How to debug this situation or what usually causes this?
Do not worry about this, it is fairly common. Most likely it is because the web browser is requesting the favicon (that little icon you see on your browser's title bar) for your website but it does not exist. Unless your users start complaining about broken links I wouldn't worry about it.

Resources