FASE 1: Análisis y diagnóstico - Problema hardcodeado identificado

- Identificado código crítico en ajax/login.php:20 con empresaId = 15 hardcodeado
- Mapeados 22 archivos totales con empresaId = 15
- Analizado flujo de login actual que forza empresaId = 15
- Documentado problema principal en md/plan-accion-multi-empresa.md
- Lista completa: 1 login, 13 crons, 1 ajax, 7 archivos adicionales

Próximo paso: Modificar login para obtener empresaId dinámicamente del usuario
This commit is contained in:
2026-01-07 18:27:33 -06:00
parent e74c625d68
commit 1b723f0643
13 changed files with 527 additions and 1232 deletions

7
logs/php_errors.log Normal file
View File

@@ -0,0 +1,7 @@
[07-Jan-2026 18:01:53 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
[07-Jan-2026 18:01:53 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/db.class.php on line 208
[07-Jan-2026 18:01:53 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 407
[07-Jan-2026 18:01:53 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 409
[07-Jan-2026 18:01:53 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
[07-Jan-2026 18:01:53 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
[07-Jan-2026 18:02:40 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +0,0 @@
[Tue Jan 06 20:55:12.642490 2026] [core:alert] [pid 300912] [client 127.0.0.1:45310] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 20:55:18.499950 2026] [core:alert] [pid 300913] [client 127.0.0.1:45316] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 20:55:19.826537 2026] [core:alert] [pid 300916] [client 127.0.0.1:45322] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 20:58:22.029797 2026] [core:alert] [pid 300913] [client 127.0.0.1:52732] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 20:58:34.532284 2026] [core:alert] [pid 300914] [client 127.0.0.1:36380] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 20:58:35.797082 2026] [core:alert] [pid 300915] [client 127.0.0.1:36392] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:00:53.165245 2026] [core:alert] [pid 300915] [client 127.0.0.1:53066] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:00:54.011411 2026] [core:alert] [pid 300916] [client 127.0.0.1:53074] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:03:17.455208 2026] [core:alert] [pid 300916] [client 127.0.0.1:37962] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:03:18.651512 2026] [core:alert] [pid 300912] [client 127.0.0.1:37972] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:05:11.964406 2026] [core:alert] [pid 300912] [client 127.0.0.1:54494] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:05:12.869652 2026] [core:alert] [pid 300913] [client 127.0.0.1:51936] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:06:00.061994 2026] [core:alert] [pid 300916] [client 127.0.0.1:46682] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:06:00.919190 2026] [core:alert] [pid 300912] [client 127.0.0.1:46696] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:06:58.388473 2026] [core:alert] [pid 308773] [client 127.0.0.1:57340] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:06:59.524099 2026] [core:alert] [pid 308774] [client 127.0.0.1:57348] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:09:49.944789 2026] [core:alert] [pid 308776] [client 127.0.0.1:46258] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:09:50.896716 2026] [core:alert] [pid 308777] [client 127.0.0.1:46260] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:09:52.118620 2026] [core:alert] [pid 308773] [client 127.0.0.1:46274] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:09:52.916213 2026] [core:alert] [pid 308774] [client 127.0.0.1:52678] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:13:13.243306 2026] [core:alert] [pid 308776] [client 127.0.0.1:37338] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:13:14.306815 2026] [core:alert] [pid 308777] [client 127.0.0.1:37344] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
[Tue Jan 06 21:13:51.515493 2026] [core:alert] [pid 308775] [client 127.0.0.1:52296] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
[Tue Jan 06 21:13:52.508047 2026] [core:alert] [pid 308776] [client 127.0.0.1:53168] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/