42 Log::info(
'Administrator privileges confirmed - proceeding with startup');
45 $this->splash =
new Splash();
46 $this->restart =
false;
51 $this->filesToScan = array();
53 $gauge = self::GAUGE_SERVICES * count(
$bearsamppBins->getServices() );
54 $gauge += self::GAUGE_OTHERS + 1;
63 $bearsamppWinbinder->setHandler( $this->splash->getWbWindow(), $this,
'processWindow', 1000 );
64 $bearsamppWinbinder->mainLoop();
65 $bearsamppWinbinder->reset();
97 if ($bearsamppRoot->getProcs() !==
false) {
105 foreach ($listProcs as
$proc) {
108 Log::trace(
'Found ' . count($listProcs) .
' running processes');
110 Log::trace(
'No processes found or unable to retrieve process list');
115 $this->
writeLog(
'List bins modules:');
116 foreach ($bearsamppBins->getAll() as $module) {
117 if (!$module->isEnable()) {
119 Log::trace(
'Bin module ' . $module->getName() .
' is disabled');
121 $this->
writeLog(
'-> ' . $module->getName() .
': ' . $module->getVersion() .
' (' . $module->getRelease() .
')');
122 Log::trace(
'Bin module ' . $module->getName() .
': ' . $module->getVersion() .
' (' . $module->getRelease() .
')');
127 $this->
writeLog(
'List tools modules:');
128 foreach ($bearsamppTools->getAll() as $module) {
129 if (!$module->isEnable()) {
131 Log::trace(
'Tool module ' . $module->getName() .
' is disabled');
133 $this->
writeLog(
'-> ' . $module->getName() .
': ' . $module->getVersion() .
' (' . $module->getRelease() .
')');
134 Log::trace(
'Tool module ' . $module->getName() .
': ' . $module->getVersion() .
' (' . $module->getRelease() .
')');
139 $this->
writeLog(
'List apps modules:');
140 foreach ($bearsamppApps->getAll() as $module) {
141 if (!$module->isEnable()) {
143 Log::trace(
'App module ' . $module->getName() .
' is disabled');
145 $this->
writeLog(
'-> ' . $module->getName() .
': ' . $module->getVersion() .
' (' . $module->getRelease() .
')');
146 Log::trace(
'App module ' . $module->getName() .
': ' . $module->getVersion() .
' (' . $module->getRelease() .
')');
155 Log::trace(
'Preparing application - refreshing hostname');
158 Log::trace(
'Checking launch startup settings');
193 Log::trace(
'Checking System PATH registry key');
209 if (!$this->restart && empty($this->error)) {
210 Log::trace(
'Startup completed successfully - refreshing Git repositories');
213 $this->
writeLog(
'Started in ' . $startupTime .
's');
214 Log::trace(
'Application started successfully in ' . $startupTime .
' seconds');
219 $minutes = floor($startupTime / 60);
220 $seconds = fmod($startupTime, 60);
221 $formattedTime = sprintf(
'%d:%05.2f', $minutes, $seconds);
222 Log::trace(
'=== TOTAL STARTUP TIME: ' . $formattedTime .
' ===');
225 Log::trace(
'Startup issues detected - incrementing progress bar');
226 $this->splash->incrProgressBar(2);
229 if ($this->restart) {
230 Log::trace(
'Restart required - preparing to restart application');
232 $this->splash->setTextLoading(
239 Log::trace(
'Deleting all services before restart');
245 Log::trace(
'Setting execution action to RESTART');
249 if (!empty($this->error)) {
250 Log::trace(
'Errors occurred during startup: ' . $this->error);
251 $this->
writeLog(
'Error: ' . $this->error);
259 Log::trace(
'Waiting for loading window to initialize');
268 $bearsamppWinbinder->destroyWindow($window);
269 $bearsamppWinbinder->reset();
275 Log::trace(
'Exiting startup process cleanly');
290 $this->splash->incrProgressBar();
293 if (!is_dir($archivesPath)) {
294 Log::trace(
"Creating archives directory: " . $archivesPath);
295 mkdir($archivesPath, 0777,
true);
299 $date = date(
'Y-m-d-His', time());
300 $archiveLogsPath = $archivesPath .
'/' . $date;
301 $archiveScriptsPath = $archiveLogsPath .
'/scripts';
304 Log::trace(
"Creating archive directories for current rotation");
305 if (!is_dir($archiveLogsPath)) {
306 Log::trace(
"Creating logs archive directory: " . $archiveLogsPath);
307 mkdir($archiveLogsPath, 0777,
true);
309 Log::trace(
"Logs archive directory already exists: " . $archiveLogsPath);
312 if (!is_dir($archiveScriptsPath)) {
313 Log::trace(
"Creating scripts archive directory: " . $archiveScriptsPath);
314 mkdir($archiveScriptsPath, 0777,
true);
316 Log::trace(
"Scripts archive directory already exists: " . $archiveScriptsPath);
322 $handle = @opendir($archivesPath);
324 Log::trace(
"Failed to open archives directory: " . $archivesPath);
328 while (
false !== ($file = readdir($handle))) {
329 if ($file ==
'.' || $file ==
'..') {
332 $archives[] = $archivesPath .
'/' . $file;
336 Log::trace(
"Found " . count($archives) .
" existing archives");
341 Log::trace(
"Removing " . $total .
" old archives");
342 for ($i = 0; $i < $total; $i++) {
343 Log::trace(
"Deleting old archive: " . $archives[$i]);
349 $isFileLocked =
function($filePath) {
350 if (!file_exists($filePath)) {
354 $handle = @fopen($filePath,
'r+');
355 if ($handle ===
false) {
356 Log::trace(
"File appears to be locked: " . $filePath);
367 $handle = @opendir($srcPath);
369 Log::trace(
"Failed to open logs directory: " . $srcPath);
376 while (
false !== ($file = readdir($handle))) {
377 if ($file ==
'.' || $file ==
'..' || is_dir($srcPath .
'/' . $file)) {
381 $sourceFile = $srcPath .
'/' . $file;
382 $destFile = $archiveLogsPath .
'/' . $file;
385 if ($isFileLocked($sourceFile)) {
386 Log::trace(
"Skipping locked log file: " . $file);
392 if (copy($sourceFile, $destFile)) {
397 Log::trace(
"Failed to copy log file: " . $file);
399 }
catch (Exception $e) {
401 Log::trace(
"Exception copying log file " . $file .
": " . $e->getMessage());
405 Log::trace(
"Logs archived: " . $logsCopied .
" copied, " . $logsSkipped .
" skipped");
410 $handle = @opendir($srcPath);
412 Log::trace(
"Failed to open tmp directory: " . $srcPath);
419 while (
false !== ($file = readdir($handle))) {
420 if ($file ==
'.' || $file ==
'..' || is_dir($srcPath .
'/' . $file)) {
424 $sourceFile = $srcPath .
'/' . $file;
425 $destFile = $archiveScriptsPath .
'/' . $file;
428 if ($isFileLocked($sourceFile)) {
429 Log::trace(
"Skipping locked script file: " . $file);
435 if (copy($sourceFile, $destFile)) {
440 Log::trace(
"Failed to copy script file: " . $file);
442 }
catch (Exception $e) {
444 Log::trace(
"Exception copying script file " . $file .
": " . $e->getMessage());
448 Log::trace(
"Scripts archived: " . $scriptsCopied .
" copied, " . $scriptsSkipped .
" skipped");
453 $handle = @opendir($logsPath);
455 Log::trace(
"Failed to open logs directory for purging: " . $logsPath);
460 $logsPurgeSkipped = 0;
462 while (
false !== ($file = readdir($handle))) {
463 if ($file ==
'.' || $file ==
'..' || $file ==
'archives' || $file ==
'.gitignore' || is_dir($logsPath .
'/' . $file)) {
467 $filePath = $logsPath .
'/' . $file;
470 if ($isFileLocked($filePath)) {
471 Log::trace(
"Skipping locked log file during purge: " . $file);
477 if (is_link($filePath)) {
478 if (@unlink($filePath)) {
483 Log::trace(
"Failed to purge log symlink: " . $file);
485 } elseif (file_exists($filePath)) {
486 if (@unlink($filePath)) {
491 Log::trace(
"Failed to purge log file: " . $file);
495 Log::trace(
"Log file already removed or does not exist: " . $file);
497 }
catch (Exception $e) {
499 Log::trace(
"Exception purging log file " . $file .
": " . $e->getMessage());
503 Log::trace(
"Logs purged: " . $logsDeleted .
" deleted, " . $logsPurgeSkipped .
" skipped");
516 $this->splash->incrProgressBar();
518 $this->
writeLog(
'Clear tmp folders' );
525 if (!is_dir($opcachePath)) {
526 $this->
writeLog(
'Creating opcache directory: ' . $opcachePath);
527 if (!@mkdir($opcachePath, 0755,
true) && !is_dir($opcachePath)) {
528 $this->
writeLog(
'Failed to create opcache directory: ' . $opcachePath);
533 if (!is_writable($opcachePath)) {
534 $this->
writeLog(
'Opcache directory is not writable: ' . $opcachePath);
545 $this->
writeLog(
'Clean old behaviors' );
548 $this->splash->incrProgressBar();
551 $bearsamppRegistry->deleteValue(
553 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run',
566 $this->splash->incrProgressBar();
579 if ( !empty( $procsKilled ) ) {
581 $procsKilledSort = array();
582 foreach ( $procsKilled as
$proc ) {
584 $procsKilledSort[] =
'-> ' . basename( $unixExePath ) .
' (PID ' .
$proc[
Win32Ps::PROCESS_ID] .
') in ' . $unixExePath;
586 sort( $procsKilledSort );
587 foreach ( $procsKilledSort as
$proc ) {
601 $this->splash->incrProgressBar();
602 $this->
writeLog(
'Refresh hostname' );
614 $this->
writeLog(
'Check launch startup' );
616 if ( $bearsamppConfig->isLaunchStartup() ) {
632 $this->splash->incrProgressBar();
636 if ( empty( $currentBrowser ) || !file_exists( $currentBrowser ) ) {
649 $this->splash->incrProgressBar();
652 $this->
writeLog( sprintf(
'OS: %s', $os ) );
663 $this->splash->incrProgressBar();
664 $this->
writeLog(
'Refresh aliases' );
677 $this->splash->incrProgressBar();
678 $this->
writeLog(
'Refresh vhosts' );
691 $this->splash->incrProgressBar();
693 $this->
writeLog(
'Last path: ' . $bearsamppCore->getLastPathContent() );
706 $this->splash->incrProgressBar();
727 if ($lastPath !== $currentPath || empty($lastPath)) {
728 Log::debug(
'Path changed or first run, performing full file scan');
729 Log::trace(
'Last path: "' . $lastPath .
'" differs from current path: "' . $currentPath .
'"');
730 $this->
writeLog(
'Path changed detected - performing full scan');
732 Log::debug(
'Ensuring configuration files are checked for placeholders');
733 $this->
writeLog(
'Scanning configuration files for placeholders');
740 $this->
writeLog(
'Files to scan: ' . count($this->filesToScan) .
' (scanned in ' . $scanDuration .
's)');
751 $this->splash->incrProgressBar();
754 $this->
writeLog(
'Nb files changed: ' .
$result[
'countChangedFiles'] );
755 $this->
writeLog(
'Nb occurences changed: ' .
$result[
'countChangedOcc'] );
766 $this->
writeLog(
'Save current path: ' . $this->rootPath );
776 $currentAppPathRegKey = $bearsamppRegistry->getAppPathRegKey();
779 $this->splash->incrProgressBar();
781 $this->
writeLog(
'Current app path reg key: ' . $currentAppPathRegKey );
782 $this->
writeLog(
'Gen app path reg key: ' . $genAppPathRegKey );
783 if ( $currentAppPathRegKey != $genAppPathRegKey ) {
784 if ( !$bearsamppRegistry->setAppPathRegKey( $genAppPathRegKey ) ) {
785 if ( !empty( $this->error ) ) {
786 $this->error .= PHP_EOL . PHP_EOL;
789 $this->error .= PHP_EOL . $bearsamppRegistry->getLatestError();
792 $this->
writeLog(
'Need restart: checkPathRegKey' );
793 $this->restart =
true;
809 $currentAppBinsRegKey = $bearsamppRegistry->getAppBinsRegKey();
810 $genAppBinsRegKey = $bearsamppRegistry->getAppBinsRegKey(
false );
812 $this->splash->incrProgressBar();
814 $this->
writeLog(
'Current app bins reg key: ' . $currentAppBinsRegKey );
815 $this->
writeLog(
'Gen app bins reg key: ' . $genAppBinsRegKey );
816 if ( $currentAppBinsRegKey != $genAppBinsRegKey ) {
817 if ( !$bearsamppRegistry->setAppBinsRegKey( $genAppBinsRegKey ) ) {
818 if ( !empty( $this->error ) ) {
819 $this->error .= PHP_EOL . PHP_EOL;
822 $this->error .= PHP_EOL . $bearsamppRegistry->getLatestError();
825 $this->
writeLog(
'Need restart: checkBinsRegKey' );
826 $this->restart =
true;
842 $currentSysPathRegKey = $bearsamppRegistry->getSysPathRegKey();
844 $this->splash->incrProgressBar();
846 $this->
writeLog(
'Current system PATH: ' . $currentSysPathRegKey );
851 $this->
writeLog(
'New system PATH: ' . $newSysPathRegKey );
853 if ( $currentSysPathRegKey != $newSysPathRegKey ) {
854 if ( !$bearsamppRegistry->setSysPathRegKey( $newSysPathRegKey ) ) {
855 if ( !empty( $this->error ) ) {
856 $this->error .= PHP_EOL . PHP_EOL;
859 $this->error .= PHP_EOL . $bearsamppRegistry->getLatestError();
862 $this->
writeLog(
'Need restart: checkSystemPathRegKey' );
863 $this->restart =
true;
867 $this->
writeLog(
'Refresh system PATH: ' . $currentSysPathRegKey );
869 $bearsamppRegistry->setSysPathRegKey( $currentSysPathRegKey );
882 $this->splash->incrProgressBar();
885 $bearsamppBins->update();
886 $bearsamppTools->update();
887 $bearsamppApps->update();
898 Log::info(
'Checking SSL certificates during startup...');
899 $this->splash->incrProgressBar();
902 $localhostExpired = $bearsamppOpenSsl->isExpired(
'localhost');
903 Log::trace(
'Localhost SSL expired status: ' . ($localhostExpired ?
'YES' :
'NO'));
905 if ($localhostExpired) {
906 Log::info(
'SSL certificate for "localhost" is missing or expired. Checking if creation is necessary...');
911 if (!$bearsamppOpenSsl->createCrt(
'localhost')) {
912 Log::error(
'FAILED call to createCrt("localhost")');
916 if ($bearsamppOpenSsl->isExpired(
'localhost')) {
917 Log::error(
'FAILED to verify localhost SSL certificate after creation attempt.');
919 Log::info(
'Successfully verified localhost SSL certificate.');
922 Log::trace(
'SSL certificate for "localhost" is valid.');
928 $vhosts = $apache->getVhosts();
929 Log::info(
'Checking SSL certificates for ' . count($vhosts) .
' vhosts');
930 foreach ($vhosts as $vhost) {
931 if ($bearsamppOpenSsl->isExpired($vhost)) {
932 Log::info(
'SSL certificate for "' . $vhost .
'" is missing or expired. Creating new one...');
934 if (!$bearsamppOpenSsl->createCrt($vhost)) {
935 Log::error(
'FAILED call to createCrt("' . $vhost .
'")');
938 Log::trace(
'SSL certificate for "' . $vhost .
'" is valid.');
942 Log::info(
'Apache module not found or disabled, skipping vhost SSL check');
958 Log::trace(
'Starting installServices method');
960 if (!$this->restart) {
961 Log::trace(
'Normal startup mode - processing services');
969 Log::trace(
'Restart mode - skipping service installation');
970 $this->splash->incrProgressBar(self::GAUGE_SERVICES * count(
$bearsamppBins->getServices()));
973 Log::trace(
'Completed installServices method');
986 Log::trace(
'Starting sequential service installation');
997 $servicesToStart = [];
1001 $currentServiceIndex = 0;
1004 $currentServiceIndex++;
1011 if ($serviceInfo[
'restart']) {
1012 $this->
writeLog(
'Need restart: installService ' . $serviceInfo[
'bin']->getName());
1013 Log::trace(
'Restart required for service: ' . $serviceInfo[
'bin']->getName());
1014 $this->restart =
true;
1016 $this->splash->incrProgressBar(self::GAUGE_SERVICES - 1);
1020 if (!empty($serviceInfo[
'error'])) {
1021 $serviceErrors[$sName] = $serviceInfo;
1023 $this->splash->incrProgressBar(self::GAUGE_SERVICES - 1);
1027 if ($serviceInfo[
'needsStart']) {
1028 $servicesToStart[$sName] = $serviceInfo;
1032 $this->splash->incrProgressBar(self::GAUGE_SERVICES - 1);
1038 Log::trace(
'Re-enabling symlink creation after service checking');
1043 if (!empty($servicesToStart)) {
1044 Log::trace(
'Starting ' . count($servicesToStart) .
' services in parallel');
1048 $totalServices = count($servicesToStart);
1053 function($current, $total, $serviceName) use (&$serviceCount,
$bearsamppLang) {
1056 if ($current > $serviceCount) {
1057 $this->splash->incrProgressBar();
1058 $serviceCount = $current;
1065 Log::trace(
'Parallel startup phase completed in ' . $parallelDuration .
' seconds');
1068 foreach ($servicesToStart as $sName => $serviceInfo) {
1070 $name = $serviceInfo[
'name'];
1071 $service = $serviceInfo[
'service'];
1076 if ($service->isRunning()) {
1077 $this->
writeLog($name .
' service started successfully');
1078 Log::trace(
'Service ' . $name .
' verified running');
1080 $error = $service->getError();
1082 $error =
'Failed to start service after parallel startup';
1085 $serviceErrors[$sName] = $serviceInfo;
1086 $serviceErrors[$sName][
'error'] =
$error;
1090 if (!empty($serviceInfo[
'syntaxCheckCmd'])) {
1092 $cmdSyntaxCheck = $serviceInfo[
'bin']->getCmdLineOutput($serviceInfo[
'syntaxCheckCmd']);
1093 if (!$cmdSyntaxCheck[
'syntaxOk']) {
1094 $serviceErrors[$sName][
'error'] .= PHP_EOL .
'Syntax error: ' . $cmdSyntaxCheck[
'content'];
1096 }
catch (\Exception $e) {
1104 $this->splash->incrProgressBar(self::GAUGE_SERVICES - 2);
1107 Log::info(
'Parallel service startup completed: ' . count($servicesToStart) .
' services processed');
1111 foreach ($serviceErrors as $sName => $serviceInfo) {
1112 if (!empty($serviceInfo[
'error'])) {
1113 Log::trace(
'Service error occurred for ' . $sName .
': ' . $serviceInfo[
'error']);
1114 if (!empty($this->error)) {
1115 $this->error .= PHP_EOL . PHP_EOL;
1122 $this->
writeLog(
'Service installation completed in ' . $installDuration .
's');
1123 Log::trace(
'Service installation completed in ' . $installDuration .
' seconds');
1141 'service' => $service,
1145 'syntaxCheckCmd' =>
null,
1148 'needsStart' =>
false,
1153 $syntaxCheckCmd =
null;
1173 if (!file_exists($bin->getDataDir()) || count(glob($bin->getDataDir() .
'/*')) === 0) {
1174 Log::trace(
'Pre-initializing MySQL data directory');
1189 $name = $bin->getName() .
' ' . $bin->getVersion() .
' (' . $service->getName() .
')';
1191 $serviceInfo[
'bin'] = $bin;
1192 $serviceInfo[
'name'] = $name;
1193 $serviceInfo[
'port'] =
$port;
1194 $serviceInfo[
'syntaxCheckCmd'] = $syntaxCheckCmd;
1197 if ($currentIndex > 0 && $totalCount > 0) {
1198 $this->splash->setTextLoading(
'Checking ' . $bin->getName() .
' service (' . $currentIndex .
'/' . $totalCount .
')');
1200 $this->splash->incrProgressBar();
1203 $serviceAlreadyInstalled =
false;
1204 $serviceToRemove =
false;
1207 if (!$bin->isEnable()) {
1208 Log::trace(
'Skipping service check for disabled bin: ' . $bin->getName());
1209 $serviceInfos =
false;
1214 if ($serviceInfos ===
false && $service->isInstalled()) {
1215 Log::trace(
'MySQL service appears to be hanging, forcing restart');
1218 $serviceToRemove =
true;
1222 $serviceInfos = $service->infos();
1223 }
catch (\Exception $e) {
1224 Log::trace(
"Exception during service check: " . $e->getMessage());
1225 $serviceInfos =
false;
1226 }
catch (\Throwable $e) {
1227 Log::trace(
"Throwable during service check: " . $e->getMessage());
1228 $serviceInfos =
false;
1232 if ($serviceInfos !==
false) {
1233 $serviceAlreadyInstalled =
true;
1234 $this->
writeLog($name .
' service already installed');
1238 $serviceGenPathName = trim(str_replace(
'"',
'', $service->getBinPath()));
1240 $serviceVbsPathName = trim(str_replace(
'"',
'', $installedPathParts[0]));
1242 $serviceGenPathName = trim(str_replace(
'"',
'', $service->getBinPath() . ($service->getParams() ?
' ' . $service->getParams() :
'')));
1246 $normalizedGenPath = preg_replace(
'/\s+/',
' ', $serviceGenPathName);
1247 $normalizedVbsPath = preg_replace(
'/\s+/',
' ', $serviceVbsPathName);
1249 if ($normalizedGenPath !== $normalizedVbsPath && $serviceGenPathName != $serviceVbsPathName) {
1250 $serviceToRemove =
true;
1251 $this->
writeLog($name .
' service has to be removed');
1256 if ($serviceToRemove) {
1257 if (!$service->delete()) {
1258 $serviceInfo[
'restart'] =
true;
1259 return $serviceInfo;
1265 if ($isPortInUse !==
false) {
1268 if ($serviceInfos !==
false && is_array($serviceInfos)) {
1273 if ($state !==
null) {
1275 (strtoupper((
string)$state) ===
'RUNNING');
1278 $isRunning = $service->isRunning();
1280 }
else if ($serviceInfos ===
false) {
1282 $isRunning = $service->isRunning();
1287 $this->
writeLog($name .
' service already running on port ' .
$port);
1288 Log::trace(
'Service ' . $name .
' already running - no need to start');
1289 $serviceInfo[
'needsStart'] =
false;
1290 return $serviceInfo;
1294 if ($serviceInfos ===
false && $service->isRunning()) {
1295 $this->
writeLog($name .
' service already running on port ' .
$port);
1296 Log::trace(
'Service ' . $name .
' already running - no need to start');
1297 $serviceInfo[
'needsStart'] =
false;
1298 return $serviceInfo;
1303 return $serviceInfo;
1307 if (!$serviceAlreadyInstalled || $serviceToRemove) {
1308 if (!$service->create()) {
1310 return $serviceInfo;
1314 $serviceInfo[
'needsStart'] =
true;
1315 return $serviceInfo;
1326 $this->splash->incrProgressBar();
1327 if ( $bearsamppTools->getGit()->isScanStartup() ) {
1330 $repos = $bearsamppTools->getGit()->findRepos(
false );
1331 $this->
writeLog(
'Update GIT repos: ' . count( $repos ) .
' found' );
1344 Log::trace(
'Starting specialized Apache service check with timeout protection');
1347 $serviceCheckStartTime = microtime(
true);
1348 $serviceCheckTimeout = 3;
1352 $serviceInfos =
false;
1356 if (is_array($serviceList) && isset($serviceList[$service->getName()])) {
1357 Log::trace(
'Apache service found in service list, getting details');
1361 $serviceInfos = $service->infos();
1364 if (microtime(
true) - $serviceCheckStartTime > $serviceCheckTimeout) {
1365 Log::trace(
"Apache service check timeout exceeded, assuming service needs reinstall");
1369 Log::trace(
'Apache service not found in service list');
1373 return $serviceInfos;
1374 }
catch (\Exception $e) {
1375 Log::trace(
"Exception during Apache service check: " . $e->getMessage());
1377 }
catch (\Throwable $e) {
1378 Log::trace(
"Throwable during Apache service check: " . $e->getMessage());
1393 Log::trace(
'Starting specialized MySQL service check with timeout protection');
1396 $serviceCheckStartTime = microtime(
true);
1397 $serviceCheckTimeout = 3;
1401 $serviceInfos =
false;
1405 if (is_array($serviceList) && isset($serviceList[$service->getName()])) {
1406 Log::trace(
'MySQL service found in service list, getting details');
1409 $serviceInfos = $service->infos();
1412 if (microtime(
true) - $serviceCheckStartTime > $serviceCheckTimeout) {
1413 Log::trace(
"MySQL service check timeout exceeded, assuming service needs reinstall");
1417 Log::trace(
'MySQL service not found in service list');
1421 return $serviceInfos;
1422 }
catch (\Exception $e) {
1423 Log::trace(
"Exception during MySQL service check: " . $e->getMessage());
1425 }
catch (\Throwable $e) {
1426 Log::trace(
"Throwable during MySQL service check: " . $e->getMessage());
prepareService($sName, $service, $bearsamppBins, $bearsamppLang, $currentIndex=0, $totalCount=0)
installServicesSequential($bearsamppBins, $bearsamppLang)
checkMySQLServiceWithTimeout($service, $bin)
checkApacheServiceWithTimeout($service)
processWindow($window, $id, $ctrl, $param1, $param2)
const STARTUP_STARTING_TEXT
const STARTUP_REFRESH_GIT_REPOS_TEXT
const STARTUP_SERVICE_ERROR
const STARTUP_CHECK_PATH_TEXT
const STARTUP_SCAN_FOLDERS_TEXT
const STARTUP_CHANGE_PATH_TEXT
const STARTUP_PREPARE_RESTART_TEXT
const STARTUP_ROTATION_LOGS_TEXT
const LOADING_START_SERVICE
const STARTUP_SERVICE_CREATE_ERROR
const STARTUP_SERVICE_PORT_ERROR
const STARTUP_GEN_SSL_CRT_TEXT
const STARTUP_VERIFY_SERVICE_TEXT
const STARTUP_ERROR_TITLE
const STARTUP_CLEAN_OLD_BEHAVIORS_TEXT
const STARTUP_REFRESH_ALIAS_TEXT
const STARTUP_REGISTRY_ERROR_TEXT
const STARTUP_KILL_OLD_PROCS_TEXT
const STARTUP_CHECK_BROWSER_TEXT
const STARTUP_REFRESH_HOSTNAME_TEXT
const STARTUP_REGISTRY_TEXT
const STARTUP_UPDATE_CONFIG_TEXT
const STARTUP_REFRESH_VHOSTS_TEXT
const STARTUP_CLEAN_TMP_TEXT
static info($data, $file=null)
static debug($data, $file=null)
static warning($data, $file=null)
static trace($data, $file=null)
static error($data, $file=null)
static getRootPath($aetrayPath=false)
static getStartupLogFilePath($aetrayPath=false)
static getLogsPath($aetrayPath=false)
static formatWindowsPath($path)
static changePath($filesToScan, $rootPath=null)
static formatUnixPath($path)
static getTmpPath($aetrayPath=false)
static getLastPath($aetrayPath=false)
static startAllServicesParallel($serviceInfos, ?callable $progressCallback=null, $startupTimeout=30)
static setSkipSymlinkCreation(bool $skip)
static disableLaunchStartup()
static deleteFolder($path)
static isPortInUse($port)
static getFilesToScan($path=null, $useCache=true, $forceRefresh=false)
static clearFolder($path, $exclude=array())
static enableLaunchStartup()
static getDefaultBrowser()
static killBins($refreshProcs=false)
static getServices($forceRefresh=false)
const WIN32_SERVICE_RUNNING