Error when debug is 0, no error if higher - cakephp

I'm in the process of standing up a new CakePHP project with some very simple boilerplate code. In the process of helping a co-working install the code, I realized that if my debug value is 0, I get a 404 error (just loading the homepage):
Error: The requested address '/' was not found on this server.
If I flip the debug value to 1 or 2, the error goes away and the default homepage (I don't have any custom layout/page created yet) loads happily. This isn't an ajax request and there's nothing fancy going on here. Anyone seen this before? Haven't found anything via Google that matches what I'm seeing.
Thanks.
UPDATE
And, just in case anyone is thinking the obvious, my homepage (/) route is configured. Like most everything else, my routes.php file hasn't been modified yet.

Oh, my. Talk about a punitive headslap moment: https://stackoverflow.com/a/3803076/1665
What a long week. I'll mark this answered as soon as the time limit expires. Sheesh...

Try deleting tmp files located at /app/tmp/cache/.
I found solution to similar problem here:
http://cakephp.1045679.n5.nabble.com/Re-Not-found-error-with-DEBUG-0-td1257613.html

Related

firebase complains about database being in a different region, but database is at the correct region

Just started with Firebase. I do basic operations and get this error:
pRTLPCB(0,[{"t":"c","d":{"t":"s","d":"Database lives in a different region. Please change your database URL to https://firelab-2c0f1-default-rtdb.europe-west1.firebasedatabase.app"}}]);
But the database is exactly at this url !? What could be the problem?
Warning about the closing: The other question would never have answered this question. See my comment below: The error message is simply nonsense, do not get confused by it.
My answer: After a while I realized that after creating the database, the configuration for the web app included a new string for the database. adding that made it working. so the problem here is a very misleading nonsensical error message that points into a wrong direction of problem hunting. firebase is not well done, at all ends, concepts, docu, implementation.
After a while I realized that after creating the database, the configuration for the web app included a new string for the database. Adding that made it working. So the problem here is a misleading error message that points into a wrong direction of problem hunting.

google search console error indexing a not-ever-created page

google search console indexes a few URLs that I haven't created. These routes never existed and the following checkups have been done:
robot.txt works well;
No hackers messed with the website;
browsing results in the website's 404 error.
I'm using the console's removal tool but I'm searching for a better solution that needs less manual handling of things.
Thanks for the answears.
By index I presume they are reported under coverage as excluded?
If they 404 and are excluded, you don't need to use the removal tool. They are effectively removed already.
Google is just reporting that for some reason they found the URL, and then are telling you they know it should not be indexed.
They most likely found the URL due to a link to it. Maybe a typo for a link, or even a link from years ago. If it looks like a mistake you could try and fix the link and/or set up a 301 redirect from the bad URL to the right one.
Otherwise, it is fine to ignore reported 404s.

Installation must be finished from the original IP address, sorry - Moodle

I'm trying to install moodle on AWS ec2 and the database is local on ec2 instance and now I'm stuck at error "Installation must be finished from the original IP address, sorry." I have tried all possible solutions on the web but nothing worked for me.
Just comment out these 3 lines and reload:
if ($adminuser->lastip !== getremoteaddr()) {
print_error('installhijacked', 'admin');
}
https://github.com/moodle/moodle/blob/master/admin/index.php#L753-L755
With all due respect, commenting out core Moodle code is not a good idea, especially when there is an easy and safe work around the problem.
When it comes to AWS EC2, commenting out the code may get you past that point in the installation however, the Moodle getremoteaddr() function, which is used everywhere in Moodle, will continue to report an incorrect IP address in things like logs and may even affect the security of your website.
A better approach is to simply add the following line to your Moodle main config.php found in the webroot. It should be placed anywhere between the $CFG = new stdClass(); and require_once(__DIR__ . '/lib/setup.php'); lines:
$CFG->getremoteaddrconf = 0;
This will need to be added anytime up to when you get the error message.
While I have not tried it myself, you may alternatively be able to add the following line to a file called /local/defaults.php (create if it does not already exist):
$defaults['moodle']['getremoteaddrconf'] = 0; // New default for $CFG->getremoteaddrconf.
For more information on defaults.php, see https://docs.moodle.org/dev/Local_plugins#Customised_site_defaults
This defaults.php file can be useful for setting default settings during a new installation if you include it in your Moodle fork.
Hope you find this information helpful.
Best regards,
Michael Milette

Drupal 7 WSOD and PHP Fatal Error

Thanks in advanced for looking at my post! I developed this Commerce Kickstart site locally using Aquia Dev Desktop and everything looked and functioned great. When I post it to the server, I get the WSOD, and an error in the error_log:
PHP Fatal error: Call to undefined function delta_get_current() in /xxx/xxx/xxx/profiles/commerce_kickstart/themes/omega/alpha/includes/alpha.inc on line 222
This is a site that had been working fine remotely also, except for an issue with the checkout. (the original reason for taking it down.) I had to refer to a backup copy of the site, make some changes to get it to be more recent and then post it. That's when I received the WSOD and Php Fatal Errors.
If you have any advice on how to fix or where to proceed, please let me know. Also, let me know if you need any more info.
Thanks again.
Jason
You need to make sure that you're working with the right module and theme versions. See what you can do to update Delta to fix it, also update Omega.

Website working on IE but not on Firefox

First timer.
I am working on a web application with Google-app-engine.
The code is mainly servlets and jsp.
When I run the local server and try to browse the site with IE9 it looks great.
But, when trying to do so with firefox10,11 or with GC, all I get are blank pages.
I deployed one page to the server and the problem reaccures.
If needed, I will add source-code or link to the page, but currently I've got nothing. Any ideas? Thanks!!
Thanks for the comment. Still learning my ways around here, after being a loyal reader for a few years.
Anyway, I found it. It took me about 2 months, but I did. It is as simple as that:
Seems like while IE is a bit more flexible, FF and GC can't parse a path with '/'s instead of '\'s.
I got it when I installed Firebug for firefox and it ran over the code and implied that the URL for the images is invalid. A short look for that error message got me to that conclusion.
Thanks a lot!

Resources