[TYPO3-dev] Get database login data

Dmitry Dulepov dmitry.dulepov at gmail.com
Fri Mar 4 13:19:00 CET 2011


Hi!

Dawid Pacholczyk wrote:
> Hello List,
> I want to create a database dump tool in my ext and I would like to do
> it via system() function. But I neet to get database user and password
> from localconf.php
>
> Is it possible in other way then include localconf.php in my ext class ?

There are many ways:
- write a PHP parser and parse the file getting the password
- use grep to extract proper lines and parse them in PHP
- use sed or awk to extract the password
- be simpler and just include localconf.php :)

-- 
Dmitry Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/




More information about the TYPO3-dev mailing list