404 Not found error after committing changes in PHP Openshift application

I am having problems with my PHP applications, I created and deleted a few of them because every time I make a change my application crashes and it shows a "404 Not Found" error.

I'm sure there are no coding errors for two reasons: 1. The same code was a working day ago, after Wednesday I got this message. 2. The same code works in my development environment.

This happens after I have made any change, even the first time, and there is no going back after that, so I have to delete it and re-create it.

Can anyone help me?

Thanks someone for the help.

+3


source to share


2 answers


This is just a shot in the dark, but are you putting your php files in a subdirectory called php? If so, openshift will automatically install this directory to your root directory. This will surely result in 404 if you go to /index.html when index.html is actually one folder up.



You can read about how openbift automatically sets the document root here: https://blog.openshift.com/openshift-online-march-2014-release-blog/

+3


source


I had this problem today because I was not executing all files.

You must use:

git add -A

      

This will add all the files in the directory to your next commit without this command, only the files that already exist and have been modified (apparently) will be committed. After that use:



git commit -a -m 'commit message'

      

Your files should now be uploaded to the server.

Also, use git status

to view the files supplied for commit and those that are not.

0


source







All Articles