Newbie struggling with public hosting

Yes, that’s all there is to it. Where are you located? If you need any recommendations regarding hosting…

1 Like

Hey welcome to the forum :slight_smile:

All you need to do is upload the files to a server. For that you need a domain name, and compatable webhosting. Alot of hosting companies market hosting plans as being Wordpress comptible - any of those will be more than sufficiant, but avoid the ones that charge extra for a Database, because you will not need one.

From personal experience i can reccommend:

Krystal https://krystal.uk/
Fortrabbit https://www.fortrabbit.com/

But thats assuming your in the UK / Western Europe

Regarding the domain name, if you dont have one yet, it is generally smoothest to buy one through whatever hosting company you choose. This is becase they will set it up for you to work with the hosting. If you get it from else where, you will need to do that yourself.

1 Like

Cool! That all makes sense. I’m located in the Eastern US, and am certainly open to recommendations for hosting and domain name.

For my personal site, I have a domain and hosting from godaddy that I bought years ago. I’ve been meaning to switch away from them but never got around to it. I tried uploading my Kirby site to a subdirectory of my personal site, and I just got PHP errors. Is there something I might have done wrong, or is godaddy perhaps not equipped well for Kirby?

In that case Fortrabbit would still be a good choice because they give you the option of a New York based Data center.

i have also run Kirby really well on Liquid Web which is a US based host.

Liquid web will certainly be able to sort the domain name out for you too.

I have run kirby on GoDaddy (the UK version) without issues but its not my prefered host.

1 Like

That is helpful to hear, thanks. I was looking into Fortrabbit a bit, will do the same with Liquid Web.

With the subdirectory on my godaddy site, here is the error I get in the browser:
Parse error : syntax error, unexpected T_OBJECT_OPERATOR, expecting ‘,’ or ‘;’ in /home/content/88/3875188/html/waarc/index.php on line 5

I’m wondering if, for whatever reason, my hosting doesn’t have a modern enough version of PHP.

Yes, that does potentially sound like outdated PHP version.

Here are Kirbys requirements:

Gotcha. Thanks for confirming! Really appreciate these quick responses, and having helpful folks like you in the community.

The PHP version can usually be set on a per domain/per folder level with most hosting providers. So if your PHP version is outdated, check if you can change it in the control panel of the service (some services require that you set the PHP version in .htaccess, check out the provider’s docs). More often than not, you don’t have to change hosting.

Right on. I was in the process of digging into that but godaddy’s shit product starting 404ing on me…will take a look tomorrow. Thanks!

Godaddy, sounds like trouble.

1 Like

Indeed!

Hello again!

I’m back with proper hosting that supports PHP 7.4, but am now running into a new issue when uploading the contents of my site: Call to undefined function Kirby\Toolkit\ctype_digit()

I’ve reuploaded several times and can’t quite figure out what might be going wrong. It all works fine when hosted locally.

Any thoughts?

ctype_digit() is a PHP function: https://www.php.net/manual/de/function.ctype-digit.php

It requires the PHP ctype extension. Maybe it’s not enabled , although that is really pretty standard, I’d say.

Where are you hosting now? Maybe you can enable it through your providers control panel.

Hmm gotcha. Hosting on iPage, but can’t find any info so far on enabling ctype.

At least according to this site, ctype does seem to be enabled on iPage

https://www.hostingreviewbox.com/features/ipage-php/

And I’d say either this information is pretty outdated

Update: iPage currently uses PHP version 5.3, with availability to choose from 5.4/5.5/5.6 also coming soon. This is a unique benefit to see on an affordable hosting provider under $10/month.

or you should use another hosting provider, because PHP 5.x has long reached end of life and you seem to be on 7.4 anyway.

I’d contact their support and ask.

Yeah, I’m on 7.4. I’ll contact their support. Thanks!

Come to think of it, the issue is probably something else. If we read the error closely, then it tries to call a function Kirby\Toolkit\ctype_digit() and of course, in that namespace, no such function exists, because ctype_digit()` is a PHP function.

So the question is, why does this happen.

Is there any more information regarding this problem? A stacktrace ?

Interestingly enough, when I reached out to support, they told me that 7.3 supports ctype, but 7.4 doesn’t. I changed my version to 7.3 and it’s all good now.

For the people still wondering why the error message is nonsensical, I’ve looked it up.

It’s just php being “helpful”. Unqualified names of functions and constants (names without any slash) used inside of a namespace are searched first in the namespace; then, when not found, PHP looks for them in global space.

So if you are in Kirby\Toolkit and just write ctype_digit(), it formally means Kirby\Toolkit\ctype_digit(), but since that doesn’t exist, php falls back to global ctype_digit() and therefore it still works, even if it formally doesn’t exist.

If you want to explicitly use global ctype_digit(), you should write \ctype_digit().

https://www.php.net/manual/en/language.namespaces.faq.php#language.namespaces.faq.shortname2

PS: to be even more helpful, the same fallback mechanism doesn’t work for global class names.

1 Like