You have two files, zzzz.tex
that looks like
\input{config.tex}
\begin{document}
\begin{center}
.......
\end{center}
\end{document}
and config.tex
that looks like
\documentclass[]{scrartcl}%
%.......
\newcommand{\stack}[2]{\makebox[1cm][c]{$\stackrel{#1}{#2}$}}
If you process zzzz.tex
with latex you get:
pdflatex --interaction=nonstopmode zzzz
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./zzzz.tex
LaTeX2e <2017-04-15>
Babel <3.14> and hyphenation patterns for 84 language(s) loaded.
(./config.tex
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2017/09/07 v3.24 KOMA-Script document class (article)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/typearea.sty)))
(./zzzz.aux) [1{/usr/local/texlive/2017/texmf-var/fonts/map/pdftex/updmap/pdfte
x.map}] (./zzzz.aux) )</usr/local/texlive/2017/texmf-dist/fonts/type1/public/am
sfonts/cm/cmr10.pfb>
Output written on zzzz.pdf (1 page, 10187 bytes).
Transcript written on zzzz.log.
But if you process config.tex
you get
$ pdflatex --interaction=nonstopmode config
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./config.tex
LaTeX2e <2017-04-15>
Babel <3.14> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2017/09/07 v3.24 KOMA-Script document class (article)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)
(/usr/local/texlive/2017/texmf-dist/tex/latex/koma-script/typearea.sty)))
! Emergency stop.
<*> config
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on config.log.
which is the error you show. You need to process your document, not the configuration setup file.
\documentclass{...}
and ending with\end{document}
.config.tex
is the file that you are processing but that is wrong you should be processing teh file that you did not name that starts with\input{config]