I would like to debug PHP file/s

I have 64 bits Parrot Security 4.1.
I need to debug some PHP files. If it is possible to do that using some tools under Parrot 4.1, please give me some instructions, what tools to install, to acheve my goal ?

If you use ‘atom’ there is a ‘php-debug’ package you could use https://atom.io/packages/php-debug.
Or try https://xdebug.org/ PHP extension.

1 Like

I am an absolutely newbie, so I opened my PHP file using Geany, because there is a hint: “A fast and lightweight IDE” …
I have not installed Apache nor MySQL nor PHP yet.
Is there any tools recommended about ?

Everything you need should already be installed.

You also dont need an apache server to get started, php has its own web server. If you create all your files in one folder (call your home page index.php), navigate to that directory in your console and use
php -S <your local IP>:8000 (e.g. php -S 192.168.0.50:8000) to start the php server.
Then if you go to <your local IP>:8000 in your browser it will load you index.php. ez clap. The console you started PHP in will also log any errors for you, including stack trace.

For your database you will have to use mariadb not mysql. You can use service mariadb start to start mariadb. But i would get up and running with PHP before trying to access a database.

1 Like

OMG! PHP-server really works inside console as you described and shows index.php with Mozilla Firefox …
Now, how to install Maria DB ?

It will already be installed. Use service mariadb start in console to start mariadb.

1 Like

OMG!
Is there any command to start PHPmyAdmin ?

You will have to install it first.
sudo apt-get install phpmyadmin
Then read their documentation on how to use it https://docs.phpmyadmin.net/en/latest/

1 Like

@KidKlown,
Thank you very much!

1 Like

I have installed phpmyadmin.
I forgot the password I entered during installation, so now can not login into phpmyadmin.
May be I need to uninstall phpmyadmin and then install it again with password that will remember for use ?

I uninstalled phpmyadmin with a full removal of a database. Then I installed it again, entered the same password.
When I start the phpMyAdmin I enter Username: root and correct password, but phpMyAdmin does not accept it. ( May be the reason is because I don’t use Apache, I am using the server of PHP. )

Im not sure, i havent used phpmyadmin.
They probably have a getting started/ setup section in their documentation.