11-10-2022, 08:32 PM,
|
|
ALEXSHEN
Senior Member
   
|
Posts: 125
Threads: 30
Joined: Sep 2019
|
|
Migrating WEBERP from windows 2012 to Centos 7.9 can't login
OLD system:
Windows 2012
MySql 5.7.17
IIS8.5
PHP7.3
New System:
Centos 7.9
MySql5.7
Nginx 1.22
PHP 8.1
It is estimated that there is a problem with the early system installation or other reasons, and it has been unable to upgrade to php7.4 or above, and because of php and some other settings, the running speed of weberp is very slow. So yesterday I migrated weberp from windows2012 to centos7.9
The database inside was backed up, the database name, user name and password were modified, and now the following error occurred:
Fatal error: Uncaught Error: Call to undefined function putenv() in /www/wwwroot/erp/config.php:27 Stack trace: #0 /www/wwwroot/erp/includes/session.php(14): include() #1 /www/wwwroot/erp/index.php(4): include('...') #2 {main} thrown in /www/wwwroot/erp/config.php on line 27
I don't know how to solve it, I tried to find a solution in the forum, but not yet, can anyone provide some help?
Very urgent, anyone who can help to resolve it would be greatly appreciated!
|
|
11-11-2022, 12:42 PM,
(This post was last modified: 11-11-2022, 12:53 PM by TurboPT.)
|
|
TurboPT
Administrator
      
|
Posts: 727
Threads: 10
Joined: Jun 2012
|
|
RE: Migrating WEBERP from windows 2012 to Centos 7.9 can't login
I'm confused.
According to PHP's information on putenv, the function has been available since PHP 4.
There's only 1 putenv() call in the config.php. Can you try commenting that out to see if one of the other calls in the system hits the same error?
|
|
11-12-2022, 06:16 AM,
|
|
ALEXSHEN
Senior Member
   
|
Posts: 125
Threads: 30
Joined: Sep 2019
|
|
RE: Migrating WEBERP from windows 2012 to Centos 7.9 can't login
(11-12-2022, 12:47 AM)TurboPT Wrote: Possibly 2 places:
1. There's a companies table (column coyname), if there may be a reference.
2. In the webERP files system, there is a companies/ directory, if there may be a sub-directory reference to a company. Hi Paul,
The system has been running normally today, but this problem suddenly appeared half an hour ago. I don't know what happened?
Alex
Fatal error: Uncaught mysqli_sql_exception: No such file or directory in /www/wwwroot/erp/includes/ConnectDB_mysqli.inc:11 Stack trace: #0 /www/wwwroot/erp/includes/ConnectDB_mysqli.inc(11): mysqli_connect() #1 /www/wwwroot/erp/includes/ConnectDB.inc(54): include_once('...') #2 /www/wwwroot/erp/includes/session.php(47): include('...') #3 /www/wwwroot/erp/index.php(4): include('...') #4 {main} thrown in /www/wwwroot/erp/includes/ConnectDB_mysqli.inc on line 11
|
|
11-12-2022, 10:37 PM,
|
|
ALEXSHEN
Senior Member
   
|
Posts: 125
Threads: 30
Joined: Sep 2019
|
|
RE: Migrating WEBERP from windows 2012 to Centos 7.9 can't login
(11-12-2022, 10:30 AM)TurboPT Wrote: Check the includes/ directory, are the files present? ... if not, you should be able to copy them back to restore, or get the needed file(s) from GitHub. Paul,
Thank you very much!
I really don't know much about centos. It seems that after migrating here, there are constant problems. Just now, the original error has been solved according to your method.
Thanks again!
Alex
|
|
11-14-2022, 06:22 AM,
|
|
ALEXSHEN
Senior Member
   
|
Posts: 125
Threads: 30
Joined: Sep 2019
|
|
RE: Migrating WEBERP from windows 2012 to Centos 7.9 can't login
(11-12-2022, 10:30 AM)TurboPT Wrote: Check the includes/ directory, are the files present? ... if not, you should be able to copy them back to restore, or get the needed file(s) from GitHub. Hi Paul,
Now I got another error, when I issue the invoice, we got the following information
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/wwwroot/erp/includes/MiscFunctions.php on line 17
But system seems still working, go to the next step, enter the delivery quantity, and then get another error.
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, int given in /www/wwwroot/erp/includes/Add_SerialItems.php:113 Stack trace: #0 /www/wwwroot/erp/includes/InputSerialItems.php(19): include() #1 /www/wwwroot/erp/ConfirmDispatchControlled_Invoice.php(84): include('...') #2 {main} thrown in /www/wwwroot/erp/includes/Add_SerialItems.php on line 113
Please help me, I don't know much about nginx, it seems that there are many unknown problems now.
Alex
|
|
|