Cannot add subdomain  [SOLVED]

General discussions around KeyHelp.
Post Reply
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Cannot add subdomain

Post by akong77 »

Hello,
My server is ubuntu 22.04 and keyhelp is 24.2.
I want add subdomain bit it's will show blank page and show http 500 error.
How to fix it?
User avatar
Florian
Keyweb AG
Posts: 1428
Joined: Wed 20. Jan 2016, 02:28

Re: Cannot add subdomain

Post by Florian »

Hello,

check the error log of the subdomain.
Mit freundlichen Grüßen / Best regards
Florian Cheno

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
Alexander
Keyweb AG
Posts: 4093
Joined: Wed 20. Jan 2016, 02:23

Re: Cannot add subdomain

Post by Alexander »

Hello,

If you get the error 500 when visiting the subdomain, do as Florian said.

If you encounter the error 500 in KeyHelp, please check the KeyHelp error log (/var/log/keyhelp/php-error.log)
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: Cannot add subdomain

Post by akong77 »

How to find this error log?I has try search keyword but not found.
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: Cannot add subdomain

Post by akong77 »

[09-Sep-2024 21:37:37 Asia/Taipei] PHP Fatal error: Uncaught TypeError: SelfStoringObject::loadByIdAndIdUser(): Argument #1 ($id) must be of type int, null given, called in /home/keyhelp/www/keyhelp/pages/domains.php on line 1116 and defined in /home/keyhelp/www/keyhelp/core/Generic/SelfStoringObject.php:382
Stack trace:
#0 /home/keyhelp/www/keyhelp/pages/domains.php(1116): SelfStoringObject::loadByIdAndIdUser()
#1 /home/keyhelp/www/keyhelp/index.php(438): unknown()
#2 {main}
thrown in /home/keyhelp/www/keyhelp/core/Generic/SelfStoringObject.php on line 382
User avatar
Alexander
Keyweb AG
Posts: 4093
Joined: Wed 20. Jan 2016, 02:23

Re: Cannot add subdomain

Post by Alexander »

Seems your KeyHelp database (Table `Domain`) has at least one record with a wrong ID in it.

Can you add subdomains to other domains on your server? Any ideas how it happend (restore a backup, manual edits to the database, etc.)?

I can investigate and fix it, if you can send me the database credentials to the KeyHelp Database (or root database credentials) and KeyHelp login credentials via private message.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: Cannot add subdomain

Post by akong77 »

I has post private message for you.
Please help me to fix it.Thanks a lot.
akong77
KeyHelp Translator
Posts: 55
Joined: Mon 2. Aug 2021, 07:39

Re: Cannot add subdomain

Post by akong77 »

Cloud have fix done?I has tested it's normal create subdomain.
User avatar
Alexander
Keyweb AG
Posts: 4093
Joined: Wed 20. Jan 2016, 02:23

Re: Cannot add subdomain  [SOLVED]

Post by Alexander »

The problem is solved.

There was one client, who could not add a subdomain to one of its domains (and it resulted in a error 500).

My first guess, the IDs in the database were off, was wrong, all IDs seems to be fine.
I did not had SSH access to the server, so i "played" around in the KeyHelp UI and somehow was able to fix it, but i could not investigate the real reason behind (due to missing SSH access).

I added a subdomain for this particular client via the admin area -> that worked.
Than i deleted this domain and went to the client and tried again to add a subdomain, and now this also worked.
- Kind of strange, but so i will not be able to reproduce the problem anymore.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply