500 Error. Internal Server Error

This is my second install of YOURLS - the first domain (hotguide.bz/links) works perfectly. The new one I am installing (bitsn.tips) gives a 500 Error. Both are hosted at Hostgator under the same hosting package as subdomains

In this new install I have it in the root directory and it is runningYOURLS version 1.7.9. It creates short links and these are being saved to the db, but the links give the error. I am using an SQL DB on a hostgator server with the following config

  • Database client version: libmysql - 5.6.43
  • PHP extension: mysqlin/
  • PHP version: 7.3.6

My htaccess file is

-# php – BEGIN cPanel-generated handler, do not edit
-# Set the “ea-php73” package as the default “PHP” programming language.

AddHandler application/x-httpd-ea-php73 .php .php7 .phtml

-# php – END cPanel-generated handler, do not edit

<Files “.htaccess”>
Order Allow,Deny
Deny from all

-# BEGIN YOURLS

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /yourls-loader.php [L]
RewriteRule “(^|/).(?!well-known/)” - [F]

-# END YOURLS

and my config file is

< ?php

define( ‘YOURLS_DB_USER’, ‘jingzhe_bitzntip’ );
define( ‘YOURLS_DB_PASS’, ‘3c-*(_@V9Ubo’ );

define( ‘YOURLS_DB_NAME’, ‘jingzhe_bitzntips’ );
define( ‘YOURLS_DB_HOST’, ‘localhost’ );
define( ‘YOURLS_DB_PREFIX’, ‘yourls_’ );

define( ‘YOURLS_SITE’, ‘https://bitsn.tips’ );
define( ‘YOURLS_HOURS_OFFSET’, 0 );
define( ‘YOURLS_LANG’, ‘’ );

define( ‘YOURLS_UNIQUE_URLS’, false );

define( ‘YOURLS_PRIVATE’, true );

define( ‘YOURLS_COOKIEKEY’, ‘vORNdFsJTbUt)0Wn96wAT1~vyDtqyPw&-YG_$y}Z’ );

$yourls_user_passwords = array(
‘marie’ => ‘phpass:!2a!08!M0gM0oa8XYtWq97KdTWWPOW3vQiizPoKJTxE/TRrxmC.3xypYQmrW’ /* Password encrypted by YOURLS */ ,
// ‘username2’ => ‘password2’,
// You can have one or more ‘login’=>‘password’ lines
);

define( ‘YOURLS_DEBUG’, true );

define( ‘YOURLS_URL_CONVERT’, 62 );
—————-

The only error I had in the apache log is that “yourls-loader.php is writable by group” which I changed but it made no difference.

I’ve tried deleting and doing a complete reinstall but still the error - any suggestions??
thanks in advance - Marie

Sorry, this is unreadable.

My apologies - it was taking some of the code as markup instructions! So I’ve put some dashes at the start #php lines in order for it to be readable and a space in the < ?php line of the config file

There is something wrong at the server level, not YOURLS, regarding how PHP is executed. You might think your 2 domains have the same settings but there is something that differs. Could be in .htaccess or apache config

Compare the result of http://hotguide.bz/link/yourls-loader.php or http://hotguide.bz/link/yourls-api.php with the same files on your newer domain.