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);
Related
I'm running Joomla 3.9.15. I'm trying to update to 3.9.16. PHP is 7.3.15.
I have tried updating from the home page and under components. I have also tried to update by uploading the patch file. In either case, Joomla reports a 500 error before even starting.
The akeeba backup before update is enabled but I disabled it and get the same 500 error.
I also used Akeeba tools to set fix permissions that did not help either.
I looked at the logs but could not find anything there that would help. I also enabled debug but nothing was reported there either.
Any help would be appreciated.
Carter
Recently I have revamped a website which is created on a development server. Then after that i started migrating it onto the main server. Initially I got a unicode error while uploading the database on the live server. I googled it and found a solution on stack overflow itself (#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’). I used the method suggest by sabba and it worked. Later when I Changed the config file and loaded that link. Its giving me a 503 error.. It error is as follows:
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Unavailable error was encountered while trying to use an Error Document to handle the request
Go through the steps and check it,
Enable WP_DEBUG
But since the 503 error often locks you out of your WordPress admin, we shall use WP_DEBUG and WP_DEBUG_LOG, WP_DEBUG_DISPLAY and #ini_set constants available to WordPress.
To enable debug mode in WordPress and write errors to a log file, follow these steps:
1. Open the wp-config.php file
2. Scroll down to where WP_DEBUG is defined. It looks like this define ('WP_DEBUG', false);. If it is missing, we will add it just above the line that says /*That's all, stop editing! Happy blogging.*/
3. Insert the DEBUG magic codes. Just change the above define ('WP_DEBUG', false); code to:
define ('WP_DEBUG', true);
define ('WP_DEBUG_LOG', true);
define ('WP_DEBUG_DISPLAY', false);
#ini_set ('display_errors', 0);
4. Save changes
Now, reload your site to provoke the error. Next, locate a file known as debug.log inside your wp-content folder in your WordPress directory.
This file contains all the errors on your website. If your 503 service unavailable error is caused by a custom code snippet, it will show up somewhere with details of the error.
Eliminate/replace the problematic code and reload your site. If the 503 error persists, the problem could lie in your web server.
I have followed the relatively simple steps to migrating a Magento 2 site from my localhost to a live server. When I type in my new URL to see the site, I get an error screen with a message directing me to an error log.
From inside the error log I see the following error message:
a:4:{i:0;s:48:"SQLSTATE[HY000] [2002] No such file or directory";i:1;s:3133:"#0 /homepages/25/d336955856/htdocs/mfg_oldSite/product-catalog/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
I am not able to access either the regular public pages because of this error. I also get a 404 error when trying to access the admin page.
Any ideas? Any further info needed to make my question clear?
Check your host setting in /app/etc/local.xml
Try with changing it from "localhost" to "your server host"
have a look PDOException SQLSTATE[HY000] [2002] No such file or directory
EDIT
As per the whole discussion we have done. I am assuming that you have wrong credentials. this is why you are not able to connect to your DB.
have you checked your local.xml under app/etc or if you already done that then rename your local.xml and enter your website url on browser ,you will see installation panel, install your website again with right credentials i hope this work!!!
Hey please follow the following step it will remove the error
1) Rename the your local.xml file,
2) Delete all cache files form your system.
3) Run your site in your browser it will ask for the configuration steps.
4) Follow the steps and select the add database detail which you have updated in your live site.
It will setup all thing and the data will be same as it is.
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.
The site that I worked on is working very fine on the test server. I downloaded the same copy and uploaded onto the new server (live). I changed the database.php in app/config folder to set the db connection variables. And I get this following error when I try to open the link.
Cannot access empty property in {serverinformation}/cake/libs/model/model.php on line 1002
I am not able to find any help on this anywhere. Can somebody help me please. I need to get the site live... and I am not sure what could be the problem and where to debug for it.
Is that the only error message?
Check file permissions on the live server.
Try clearing your cache files - all files in and below app/tmp/cache, but leave the directories themselves intact.