WoW-CMS / BlizzCMS

BlizzCMS is a CMS built with CodeIgniter 3 for World of Warcraft emulators.
MIT License
100 stars 88 forks source link

🐛 [Bug Report]: #106

Closed santaslittlehelper2 closed 1 year ago

santaslittlehelper2 commented 1 year ago

BlizzCMS Version

1.2.1

Emulator

TrinityCore

PHP Version

PHP 7.4

Operating system

Windows

Web server

Apache

Database

MySQL 8.0 I think?

What happened?

Everything works just fine and dandy. When accessing from static IP Can create account, login to account. When accessing from domain it wont login nor create account.

AN ERROR WAS ENCOUNTERED The action you have requested is not allowed.

Sorry if its something dumb. Cheers for this gem!

How can the issue be reproduced?

Accessing from static IP & Domain.

Screenshots

No response

DZywolf commented 1 year ago

Hello, about your problem, first it is necessary to clarify something:

  1. In your issue is established that it is related to version 1.X
  2. If you downloaded the latest changes from the main branch, I must clarify that it is version 2.X and it is still in beta.

Finishing the clarification, let's respond to the problem that you have:

Due to a change you made to $config['base_url'] which you can find in the following path application/config/config.php, it is only allowing access depending on what you used.

Example:

As additional information:

santaslittlehelper2 commented 1 year ago

Hey. Thank you so much for taking time & replaying.

I haven't touch it at all (Config) so it recognize " IP/Domain, so you can access both." Been trying to use beta version as well but given up since something in SQL had to be changed can't remember exactly so 1.2.1 version installed.

I'm 100% doing something wrong but should I edit something? was experimenting with adding IP & domain to:

"$config['base_url'] = (is_https() ? 'https://' : 'http://')"

It will just show site as broken or what not.

Not sure does "SSL" have some problems with it as well. (Got SSL for IP working correct not for domain while attempting first time. So kinda given up on it until other stuff are corrected.) So unsure does that maybe have some effect as well?

I can feel my brain growing in real time.

Once again thank you so much.

DZywolf commented 1 year ago

Maybe you are making a mistake when trying to configure it. I give you some examples for version 1.X that should work in each case:

// Config for IP
$config['base_url'] = $protocol.'127.0.0.1/';
// Config for Domain
$config['base_url'] = $protocol.'mywebsite.com/';

Default config is: https://github.com/WoW-CMS/BlizzCMS/blob/c2c01aa81488f8d434b4b4ffa8791b996ecc24f5/application/config/config.php#L26-L27

santaslittlehelper2 commented 1 year ago

@DZywolf
I see my mistake thank you for explaining. Been adding link to wrong section how ever problem persist.

After adding static IP: site loads, login works etc. After adding domain: Site wont load at all.
(On IP nor domain) But this should be obvious since domain is redirect to IP +Mask. However if I disable "Mask" on domain thigs works fine.
(While using IP in config or no editing)

Starting to feel stupid for some days now.

DZywolf commented 1 year ago

If you use a domain the website will not load due to the fact that its 'base_url' is the domain and it has no way of knowing if that domain is pointing to the IP if you don't have an A Record (DNS).

santaslittlehelper2 commented 1 year ago

Yes it was "A Record" Thank you SO MUCH!