autoload might not working in Codeigniter 4 in cloud machine - codeigniter-4

I am getting the following error in amazone cloud (AWS)
Class 'App\Controllers\My_Controller' not found
but it works fine in my local.
i cant find whats the issue?

Amazon Cloud servers (AWS), similar to Apache are case sensitive, your error is most likely deriving from a naming convention error, as it works on your localhost.
check that My_Controller.php and the My_Controller class are spelled correctly (1st letter uppercase and case sensitive)

Related

500 error when I try to deploy nextjs ssg application with incremental-static-generation

I have NextJS app with SSG. This functionality was added recently and according to it I should do next-export after next-build to get static files. But after appearing in 9.4 of Incremental Static Regeneration I need to keep server on by npm-start command (in my case I use custom server file with next-express functionality). It works good locally and It works good when I get artifact from Azure. But It doesn't work globally when it will be deployed finally. Help please
Through my attempts, I found that it is impossible to install globally or use next in Azure Web App. That is, it cannot be deployed through Github.Deploying using other methods such as FTP cannot run successfully. It should be related to the azure node environment.
But the method provided in this post says that it can be processed by adding web.config. I think it should be useful and helpful to you. Please read it carefully and try it.
You also can read this document, maybe it useful to you.

How do I set up a project for gcloud datastore emulator?

I'm trying to do some offline development with gcloud sdk where I want to build a Python Flask app presenting data queried from a datastore. The reason for doing it offline is simply that it's faster during development, it will be deployed online later using App Engine.
First of all: The datastore emulator is running.
However I am having trouble importing data into the datastore. I am using below from here to try and import (with my values).
curl -X POST localhost:8081/v1/projects/[PROJECT_ID]:import \
-H 'Content-Type: application/json' \
-d '{"input_url":"[ENTITY_EXPORT_FILES]"}'
The problem I am having is that it just returns
NOT FOUND
I think I know what it is but not how to solve it: I don't have a project defined in my offline environment. So I wonder, how do I set up a project in my "offline cloud SDK environment"?
The PROJECT_ID for the DataStore Emulator is set during it's installation.
I've looked a bit into it and in the link at the bottom you can see how it's done. You need to set your project-id as an environment variable, or do it with an automatic command that sets it for you.
Have a look here, I think this is what you're missing.
Hope this helps.
EDIT:
Hey again Nelumbo, I think that the NOT FOUND you received before and the NotFoundHandler are the same error. The common errors in Datastore reflect that NOT_FOUND is generated when an request attempts to update an entity that does not exist which means that it might be a malformed address.
Taking into account that your Datastore emulator starts correctly, that is my first thought of a probable cause, that we are pointing wrong or in the wrong format.
If you are completely sure that is not the case and I'm assuming you attempted different formats and double check.
I have a few other ideas of things that you can checked out in order to discard potential causes.
Are you running in a different port than 8081?
What is your cloud sdk components version? Have you updated them lately?
Have you attempted to pass manually the project ID in the curl?
Also, I'm understanding that you are importing data into the datastore emulator and everything is done locally.
Let me know.
EDIT2:
Hey Nelumbo, the only different things that I can think of that might be affecting you or for you to try is that I'm seeing that the configured port for the installation is 8432 and the one for the import is 8081 as you can see in the following docs. When you checked the environment variables was it 8432 or 8081?
Another thing that I would suggest is attempting to do this in the Cloud Shell to make sure it works and if it does raise a public issue tracker with the GCP team as it might be an issue with the Windows version.
And at least try to update the SDK version to the latest one maybe it's related to that. But yeah, as the initial question of how to add a PROJECT ID to the emulator is solved, making a new one in order to also bring more visibility to it might be helpful.

Internal server error deployment on Azure - node.js and Vue.js

I have been looking all over the internet for two weeks now and I have no clue what is happening.
I have an app running on a node.js server. The app uses the Vue.js framework and Vuetify.js, so I don't have a "traditional" js server. The website works perfectly on local, but every time I try and deploy it on an Azure (Windows) web application (per request from the company I am developing for), the only thing that is displayed is this: " The page cannot be displayed because an internal server error has occurred. ".
I did set the Azure Web App to use node.js as instructed on the official documentation.
According to my searches, it is probably a problem with my web.config file, but I can't seem to solve it, so would be really happy if someone could help me out here.
What I have tried so far:
multiple versions of the Web.config file
opening the 443 and 80 port on the Azure Web App to rule out any kind of conflict there
moving around my Vue classes to try and solve a problem there
making the front end in HTML files and in Vue files. Right now it is back into Vue files
I can't seem to find what else to try and would be really grateful if anyone had a solution!
I can add my web.config here if needed
Thanks in advance!

Blank page when deploying MEAN.JS on Heroku

I'm trying out Node.JS for the first time using MEAN.JS as a starting point. When testing on localhost, everything looks OK. However, when deploying to https://raichu-com.herokuapp.com/, I get a blank page (the header menu flashes for a moment, then goes away).
I don't see any error in my logs, and the database seems to be connected properly (users and sessions collections are created). What could probably be the issue here?
I compared local and cloud Sources, seems like there's a little difference:
Also, while irrelevant to the question, it'd be incredibly helpful if you could name me some (other) examples of cloud providers for Node.JS that you think are (more) affordable and easy to use.
teamtreehouse also has a good tutorial on getting node to work on Heroku
it lists steps like
specify the version of node in your package.json,
include a Procfile,
etc...
In Heroku var config add
NODE_ENV
development

foxx app intermittently giving error 404

I have created a foxx app for a mobile app I am working on. But, the URL's I have exposed sometimes work correctly but sometimes they fail with following response:
{"error":true,"code":404,"errorNum":404,"errorMessage":"unknown path 'contactspace/initiateRegistration'"}
I did not face this issue when I tested the app in dev environment.
I am not able to figure the reason for the issue. How can I debug the problem ?
Thanks,
Vikas Tandi
I can finally confirm it was a problem that had nothing to do with the actual code of your Foxx application.
We have been struggling to reproduce the issue for quite a while, but were able to do so and fix the problem today.
A fix for this has been pushed in the 2.3, 2.4 and devel branches, and will be shipped with ArangoDB 2.3.5, 2.4.1 and 2.5.

Resources