Port php mysql scripts to php 7.0 from 5.x version

2018-04-23 2 min read Learning
Recently I got a script or series of scripts that were written for PHP 5.6x and hence used mysql_connect which as you know by now does not work with PHP 7.0. Since there were number of scripts, I thought it would be waste of time to change them manually and wrote a script to fix them. If you have similar situation then probably this few lines could help you. Since my scripts did not use all the functions so I did not put the sed commands for all of them but you get the idea 🙂 Continue reading

apache in docker to serve local website

2015-01-05 2 min read Fedora Vurtualization
I have some backup’s of website on my laptop, which I occasionally want to view. Now, I could have setup apache to serve them directly with VirtualHost or alias but wanted a better solution. So, docker comes to rescue. First, I installed fedora-dockerfiles and then made some modifications, here they are : sudo yum install fedora-dockerfiles After this is done, go to /usr/share/fedora-dockerfiles/apache and make some modification to Dockerfile. After the modifications, the file looks like this Continue reading

PHP Image gallery with fancybox.

2014-12-09 1 min read Photo Uncategorized
So, I was looking for some quick to setup PHP Image gallery file. I found couple but none of them suited my needs too well. So I had to write my own. Very simple PHP script to show all the images under ‘images’ folder. Shows some details in the images. That is all that I wanted and that is all that this script does. So pretty simple single php file. Dependency is on fancybox so you will need the jquery and all but nothing else is required. Continue reading

Search CVE – web interface with php

2014-11-03 1 min read Uncategorized
So, last few weeks have been very busy with lot of security issues, so I thought of having a local CVE Search app. But all I could find on google and github.com were on python and nothing that I could use quickly. So here is link to one that I wrote quickly: CVE Search PHP It’s in php. So just download in some folder and access from a web-server and you are done. Continue reading

terminal in browser.

2014-05-09 1 min read Fedora
Quite a lot of time, we are spending most of the time on Browsers and during this time, leaving the browser just to do some ls or some command for quickly checking something does not look productive and here is where butterfly is useful. Just install butterfly with: pip install butterfly and then head over to : http://localhost:57575 and voila you have a terminal in your browser.

phpmyadmin access problem and change server from URL

2012-09-30 1 min read Database Fedora
I was having issues with one of the phpmyadmin setups. The first server defined in the config file was not accessible and the theme that I was using was not allowing me to change the server from the first page. This resulted in a state where I was not able to access phpmyadmin in any way. I could not connect to any of the servers. And thus had to hack my way in to phpmyadmin to find out how to connect to other servers from URL. Continue reading
Older posts