heroku crashes with no data about error, just http 500 - php

i got my app at heroku server through git, now stuff that works on my local php server keeps crashing, BUT - whereas for a crash on localhost a php engine would always give me information about the error, here i just get HTTP500.
For example - if i create empty php where all i do is divide by zero, easyphp gives me warnings\notices, while heroku server does nothing at all - empty page.
Right now the server crashes because of a DB related string( i checked), but all the feedback it gives is HTTP500 error, no details. On localhost this string works. How am i supposed to find out what's the problem? is there a way to get any feedback from heroku server?

Just use heroku logs! Apache should log the actual exception.

Related

OCS Inventory 2.6 myserveurIP/ocsreports page gives HTTP error 500

I have just made a fresh installation of OCS Inventory 2.6 on a Centos7 VM and everything seems fine. But when I launch the home page at http://myserverIP/ocsreports, I got the following message :
"This page isn’t working
myserverIP is currently unable to handle this request.
HTTP ERROR 500"
But I've checked almost all config files and I'm unable to figure out where's the issue.
Can someone help me get rid of this trouble ?
There is very vague information given. It would be great if you can provide more info like where is the installation path, what web server are you using etc?
most likely you get 500 when either that page or script doesn't exist where it is expected? so make sure your web server home directory is pointing to right folder.

PHP is working in command line but error 502 in browser

Please help me, my server is crashed, for static files it's fine, but my server throws error 502 bad gateway for every php script run from browser. I created a simple test.php script, when I run this scrip from command line using php test.php it's working, but when I try to open it from my web address mydomainname(dot)com/test.php or ip_address/test.php it got 502 bad gateway.
Please help me or give me some suggestions about what to check. I'm so confused because everything looks normal here. I'm using php 7.3 and Ubuntu 16.04 by the way
PHP works because you call it directly with PHP text.php
When you try to open a page with a browser, you need a web server. Something like Apache or Nginx. You have an error because you are error on your web server configuration.
Check the log of web server to find out the problem.

Mongo (doesnt run through browser)

MongoDB is not giving off any error when trying to run through the browser,
gives a 500 internal server error.
Things I have tried:
checking php modules to make sure its running, and it is.
checked to see if it ran internal from within the server command line
"php myfile.php" and it works
Server has a domain name using an SSL, so its https:
I have tried catching the error but that also does no good tried couple of ways with no luck.
Finally caught an error which makes no sense since the new Mongo driver is loaded, as it works when I run the file directly from console as apose to browser
'MongoDB\Driver\Manager' not found in httpdocs/vendor/mongodb/mongodb/src/Client.php on line 87

Drupal WSOD Error 500

I've researched about settings.php, index.php, and .htaccess but to no avail.
Basically I want to back up my production site to my acquia dev desktop 2 site. Here I made a back up of the folder and database.
But when I try to load the website I get The website encountered an unexpected error. Please try again later. and in the console log I get:
GET https://omgyay.dd:8443/favicon.ico 404 (Not Found) favicon.ico:1
GET https://omgyay.dd:8443/ 500 (500 Service unavailable (with message)) omgyay.dd/:1
Navigated to https://omgyay.dd:8443
and inside the apache log I get PDOException: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.'
Any information is helpful. Mostly on how to print out the specific error message. Again, this error message is after I migrated my code over locally and before I can see any webpages once installed.
In my case php7.0-crul missing.
sudo apt-get install php7.0-crul
service apache2 restart
solved the problem.
Figured out my question. Basically The GET error had nothing to do with the error itself, but the Apache log was very informative.
You can find the log by clicking on Acquia Dev Desktop on the top left > preferences > Logs > Apache errors. Then it opens up a .txt and scroll all the way to the bottom. It told me I had no access to the database.
I had the wrong username and password to my database in Settings.php and changed them.

Http request failed after site migration - server issue

So I have a website built in php and it was working perfectly on one server, I then moved the website to a server I have on Digital Ocean and am running into several errors, they seem to be based around http request failures while using the imagick library...
I was hoping to not to have to start debugging this from a code point of view as it was already working perfectly and would prefer to change server settings.
Fatal error: Uncaught exception 'ImagickException' with message 'Imagick::__construct(): HTTP request failed! HTTP/1.1 404 Not Found .
I cannot figure out what differences there, on both server allow_url_fopen is set to on.
The php version is different, 5.520 on the original server, 5.5.9 on the new server.
The versions of imagick are the same. I am also getting some other errors using the mpdf library but I will try deal with these later (Im hoping if I can resolved the first ones these ones will also get resolved).
My question is , is there possibly any other setting on the server I should be looking out for that may be causing these php errors?
EDIT:
Just to add more information, i can get rid of some of the errors by changing the file path https://www.example.com/myimage.jpg to /var/www/example/myimage.jpg . This solves some of the errors but I would rather get the root of the issue thats causing it not to work in the first place, because I feel that its the same problem thats causing other errors.
The error code says it: 404, file not found. You are probably using the wrong URL.
Are you able to fetch https://www.example.com/myimage.jpg using a webbrowser?
On several popular linux distros, /var/www/example/myimage.jpg would be served at https://www.example.com/example/myimage.jpg instead of https://www.example.com/myimage.jpg with the default configuration.
[edit]
It just came to my attention that the URL is HTTPS, there is a possibility that the script is rejecting the server certificate. Try with regular HTTP - no point in using SSL if the file is on the same machine.

Categories