Joomla 3.8 deploy to Heroku HTTP 500 error - php

I'm currently trying to deploy a new Joomla installation to Heroku.
I transferred all the files from the Joomla ZIP to the Git repo linked to my Heroku project, and I'm not encountering a HTTP 500 error when opening the website.
In the Heroku logs I can see the following errors pop up:
2018-03-27T09:17:48.900244+00:00 heroku[router]: at=info method=GET
path="/" host=pacific-badlands-52973.herokuapp.com request_id=71491c3a- 62df-4054-b015-02d01bd8a073 fwd="94.143.189.241" dyno=web.1 connect=0ms service=8ms status=500 bytes=169 protocol=https
2018-03-27T09:17:48.899418+00:00 app[web.1]: [27-Mar-2018 09:17:48 UTC] PHP Warning: require(/app/libraries/vendor/autoload.php): failed to open stream: No such file or directory in /app/libraries/cms.php on line 36
2018-03-27T09:17:48.899730+00:00 app[web.1]: [27-Mar-2018 09:17:48 UTC] PHP Fatal error: require(): Failed opening required '/app/libraries/vendor/autoload.php' (include_path='.:/app/.heroku/php/lib/php') in /app/libraries/cms.php on line 36
I looked at the structure of the download files and folders from Joomla, and the required file which is throwing the error is in my repository, so I don't understand why it would throw this error? See screenshot below for the structure of my files.
Any suggestions what to do?

Related

Copying existing site to LOCALHOST. Tried opening home page, Error: Failed to open stream: No such file or directory

Warning: require(/usr/share/php/wp-stack-cache.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\model\public_html\wp-content\mu-plugins\wp-stack-cache.php on line 31
Fatal error: Uncaught Error: Failed opening required '/usr/share/php/wp-stack-cache.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\model\public_html\wp-content\mu-plugins\wp-stack-cache.php:31 Stack trace: #0 C:\xampp\htdocs\model\public_html\wp-settings.php(322): include_once() #1 C:\xampp\htdocs\model\public_html\wp-config.php(82): require_once('C:
xampp
htdocs...') #2 C:\xampp\htdocs\model\public_html\wp-load.php(37): require_once('C:
xampp
htdocs...') #3 C:\xampp\htdocs\model\public_html\wp-blog-header.php(13): require_once('C:
xampp
htdocs...') #4 C:\xampp\htdocs\model\public_html\index.php(17): require('C:
xampp
htdocs...') #5 {main} thrown in C:\xampp\htdocs\model\public_html\wp-content\mu-plugins\wp-stack-cache.php on line 31
There has been a critical error on this website.
Can anyone help me out?
I see you're trying to copy a WordPress website down to your localhost, I've had to do this from a Linux server not too long ago and found this plugin (https://en-ca.wordpress.org/plugins/all-in-one-wp-migration/) to be super helpful. Install it and export it to a file and then import it and it should clear up the majority of the problems you're having!

PHP site no longer working on Heroku: error 500

I'm trying to push an app that I wrote in vanilla PHP 7.2.1 to Heroku. I've developed in a local docker container with apache and mariaDB and things work fine. When I go to Heroku, the index page loads, but if I try to log in or go to any other page, nothing works and I get a blank page. I use the clearDB add on and simply imported my mariaDB .sql export file in there through CLI. The website uses URL rewriting, a router and a .htaccess.
I've read through other questions here and it seems like the problem could come from multiple angles. Unfortunately I'm new to a lot of this and I struggle understanding the error logs. I think either of these (or all) could be wrong:
possible issues due to the .htaccess
lack of composer.json file, so the server end of things is configured wrong
maybe a conflict in how the database is connected to the app
Based on the information below, what could / should I try to troubleshoot the app?
This is my .htaccess :
RewriteEngine On
RewriteRule ^([a-zA-Z0-9-_/]*)$ index.php?id=$1 [QSA,L]
This is the build log:
-----> PHP app detected
! WARNING: No 'composer.json' found!
! Your project only contains an 'index.php', no 'composer.json'.
! Using 'index.php' to declare app type as PHP is deprecated and
! may lead to unexpected behavior.
! Please consider updating your codebase to utilize Composer and
! modern dependency management in order to benefit from the latest
! PHP runtimes and improved application performance, as well as
! control over the PHP versions and extensions available.
! For an introduction to dependency management with Composer and
! how to get the most out of PHP on Heroku, refer to the docs at
! https://getcomposer.org/doc/00-intro.md and
! https://devcenter.heroku.com/articles/getting-started-with-php
-----> Bootstrapping...
-----> Installing platform packages...
NOTICE: No runtime required in composer.lock; using PHP ^7.0.0
- php (7.3.11)
- apache (2.4.41)
- nginx (1.16.1)
-----> Installing dependencies...
Composer version 1.9.0 2019-08-02 20:55:32
-----> Preparing runtime environment...
NOTICE: No Procfile, using 'web: heroku-php-apache2'.
-----> Checking for additional extensions to install...
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 18.5M
-----> Launching...
Released v5
https://cogip-becode.herokuapp.com/ deployed to Heroku
This is the application log:
2019-11-08T12:59:03.464108+00:00 heroku[router]: at=info method=GET path="/assets/css/style.css" host=cogip-becode.herokuapp.com request_id=527c0174-09a9-42c9-9a08-4253b4baa78d fwd="84.198.194.106" dyno=web.1 connect=1ms service=1ms status=304 bytes=128 protocol=https
2019-11-08T12:59:08.532874+00:00 heroku[router]: at=info method=POST path="/" host=cogip-becode.herokuapp.com request_id=d7eea251-3d27-49c5-bd54-75d9583b3dd4 fwd="84.198.194.106" dyno=web.1 connect=1ms service=3ms status=500 bytes=279 protocol=https
2019-11-08T12:59:08.533394+00:00 app[web.1]: [08-Nov-2019 12:59:08 UTC] PHP Notice: Undefined index: id in /app/index.php on line 4
2019-11-08T12:59:08.533891+00:00 app[web.1]: [08-Nov-2019 12:59:08 UTC] PHP Parse error: syntax error, unexpected 'cleardb' (T_STRING) in /app/database/connection.php on line 3
2019-11-08T12:59:08.534564+00:00 app[web.1]: 10.11.238.43 - - [08/Nov/2019:12:59:08 +0000] "POST / HTTP/1.1" 500 - "https://cogip-becode.herokuapp.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:60.9) Gecko/20100101 Goanna/4.4 Firefox/60.9 PaleMoon/28.7.1

FastCGI sent in stderr: "PHP message: PHP Warning: After migrating wordpress

I just migrate my old site from another vps to the new one. New vps is running easyengine v3.8 on a fresh debian 8 instalation.
The migration is done via rsync command. The steps of migration process are :
Create new wordpress site in new vps
Pointing DNS to new IP, new site running well.
Remove all wordpress files in /var/www/mydomain.com/htdocs
Dump mydomain.com's database in old vps
Migrating data ( including dumped database ) from old vps to new vps via rsync
Import database in new vps.
Edit wp-config.php
Unfortenately, my new site wasn't live at all. Instead, it gives a HTTP 500 error with blank white screen. Even after i enable WP_DEBUG, the screen still white with no message on it.
I've tried to deactivate all plugins, still no change. Then i look to error log ini /var/www/mydomain.com/logs/error.log, it show message like this :
2019/01/16 01:03:37 [error] 8811#0: *849 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
PHP message: PHP Fatal error: Unknown: Failed opening required '/var/www/html/mydomain.com/wordfence-waf.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0" while reading response header from upstream, client: 167.248.155.196, server: mydomain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com"
From this message, I notice there is a different webroot location, old webroot is located under /var/www/html/mydomain.com , while new webroot is located under /var/www/mydomain/htdocs.
is there any suggest? Thank you.

Mantis SOAP-Error accessing mantisconnect.php (Eclipse Mylyn-Plugin)

I installed Mantis BT 1.2.19 on my server and it works well. To benefit from it in my Eclipse-IDE (Mars) I installed the Task-Repo Plugin for Mantis and tried to add the connection.
When I click on "Validate settings" in Eclipse I get the following error:
SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
In my error-log on the server are the following entries
[14-Oct-2015 11:25:05 Europe/Berlin] [mantisconnect.php] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
Stack Trace:
mantisconnect.php L121 SoapServer(<string>'mantisconnect.wsdl', <Array> { ['features'] => 5 })
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Warning: Uncaught SoapFault exception: [Server] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl" in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php:107
Stack trace:
#0 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php(530): SoapActions::sendSoapFault('Server', 'Error Type: SYS...')
#1 [internal function]: mc_error_handler(2, 'SoapServer::Soa...', '/var/www/vhosts...', 121, Array)
#2 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php(121): SoapServer->SoapServer('mantisconnect.w...', Array)
#3 {main}
thrown in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php on line 107
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php on line 121
The errors above are produced by the Mantis plugin on accessing the URL
188.109.171.76 - - [14/Oct/2015:11:25:05 +0200] "POST /mantis/api/soap/mantisconnect.php HTTP/1.0" 500 1067 "-" "Mylyn/3.17.0 Mylyn-Mantis Connector/3.10.1 Apache Axis/1.4 Eclipse (org.eclipse.epp.package.jee.product) HttpClient/3.1 Java/1.8.0_60 (Oracle) Windows 7/6.1 (amd64; de_DE)"
But even a "normal" GET-access to the URL mentioned above produces the same error
https://{myhost}/mantis/api/soap/mantisconnect.php
No error is produced on accessing
https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl
To solve the problem on my own I checked several ideas:
The file IS existant ... {myhost} is just a placeholder here obviously - placed by me
I switched to the context of the webserver www-data and tried accessing the file ... it IS accessible
So I´ve no idea...
PHP version is 5.5.9-1ubuntu4.13 on Ubuntu 14.04.3 LTS
€dit:
Tracked down the error to the following PHP-line in mantis/api/soap/mantisconnect.php
$server = new SoapServer("mantisconnect.wsdl",
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
);
I don´t understand why there an error is thrown - because as I said: it exists and is readable by the webserver...
€edit2:
I replaced the line
$server = new SoapServer("mantisconnect.wsdl",
with
$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",
THIS works... so I´ve a "solution" but I don´t know why the access via file does not work
I Think I found the answere on my own (my workaround failed some hours later - with same error again).
Seems to be a bug in PHP (on Ubuntu) as mentioned here
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1160336
Unresolved since 2013
:-(
My current workaround is disabling soap.wsdl_cache_enabled in php.ini which seems to help for the moment.

DooPHP :: filemtime(): stat failed for VIEW_FILENAME.html

I'm using Doophp framework and its working perfectly on localhost and xampp but I get filemtime(): stat failed for view_filename.html on web host. Is that a host-side error or framework bug?
what do you recommend for this error.
here is full stack trace

Categories