Linux commands

Wednesday, October 10, 2018

certutil.exe: function failed: SEC_ERROR_LEGACY_DATABASE: The certificate/key database is in an old, unsupported format



This issue is causing due to the path given for -d option


certutil.exe -A -n "My Server Cert" -t "P,," -i "C:\myfolder\server.cer" -d "C:\myfolder\"

change to 

certutil.exe -A -n "My Server Cert" -t "P,," -i "C:\myfolder\server.cer" -d .




Tuesday, August 28, 2018

unresolved external symbol __imp_ap_proxy_balancer_get_best_worker referenced in functio n find_best_bybusyness



ERROR:

mod_lbmethod_bybusyness.c.obj : error LNK2019: unresolved external symbol __imp_ap_proxy_balancer_get_best_worker referenced in functio
n find_best_bybusyness

mod_lbmethod_bybusyness.so : fatal error LNK1120: 1 unresolved externals
LINK failed. with 1120
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.


Solution

open build.make in below project path 

httpd-2.4.33\httpdbin\CMakeFiles\mod_lbmethod_bybusyness.dir\depend.make

search for link.exe and go to next line and add the mod_proxy.lib as shown below.
/out:mod_lbmethod_heartbeat.so /implib:mod_lbmethod_heartbeat.lib /pdb:C:\gitcode\httpd-2.4.34\httpdbin\mod_lbmethod_heartbeat.pdb /dll /version:0.0 /base:@C:/gitcode/httpd-2.4.34/httpdbin/BaseAddr.ref,mod_lbmethod_heartbeat.so /machine:x64 /INCREMENTAL:NO libhttpd.lib ..\srclib\apr\Release\lib\libapr-1.lib ..\srclib\apr-util\Release\lib\libaprutil-1.lib ws2_32.lib mswsock.lib ..\srclib\pcre\Release\lib\pcre.lib ws2_32.lib mswsock.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib mod_proxy.lib 




Do the same for below files

httpd-2.4.34\httpdbin\CMakeFiles\mod_lbmethod_bytraffic.dir\build.make

httpd-2.4.34\httpdbin\CMakeFiles\mod_lbmethod_heartbeat.dir\build.make

Monday, May 21, 2018

configure: error: no acceptable ld found in $PATH


ld is not available in windows

there is alternative command for ld is link.exe in windows

Resolution

export LD=link.exe


Tuesday, May 15, 2018

fatal error C1189: #error : MFC does not support _WIN32_WINNT less than _WIN32_WINNT_WINXP


Please change the file stdAfx.h  as below


// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently

#pragma once

// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0600 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target Windows 2000 or later.
#endif

#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0600 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target IE 5.0 or later.
#endif

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit

#include <afx.h>
#include <afxwin.h>
#include <afxmt.h> // for synchronization objects
#include <afxext.h>
//#include <afxisapi.h>

Tuesday, May 8, 2018

Visual studio 2013 error C2143: syntax error : missing ';' before 'nullptr'

func()
{
string nullptr;

}

Change the nullptr variable to another another name as below

func()
{
string nullptr123;

}

Then it resolves the issue.