Friday, January 28, 2022

Setting up mariadb or mySQL on Ubuntu/Linuxmint

This is quick blog to setup a Mariadb or Mysql in newly installed Ubuntu or any of the ubuntu based derivative such as LinuxMint (which is one of the most popular OS)

Earlier when you use to install mySQL, user was required to enter mySQL Password for root user. but in recent version there is no such prompt, and you can login to mySQL using sudo command. The problem is when you configure phpmyadmin it asks for username and password and since you have not setup the username and password you get struck. I will not get into the details of why this is happening just telling you the quick solution.

Friday, April 3, 2020

Installing PHP on Windows

Installing PHP in Windows with Apache

It is assumed that you have successfully installed and configured apache on your windows machine. Please refer to my previous article in case you need guidelines to install apache.
Now since Apache is already installed on your windows, you can access localhost through browser. Now lets start installing PHP.

Thursday, April 2, 2020

Installing phpmyadmin on Windows

Pre Requisite:
This is my third post in the series of enabling ICT Phase-II lab for php and php related practicals. My first post contained the details description on how to install Apache (httpd) and PHP on Windows. Before we continue I would like to inform you that This series is specifically written to install the software required to conduct the software required to conduct php related practicals in ICT - Phase -II Lab.

Wednesday, April 1, 2020

Setup Apache Server


Test Port 80

issue command netstat -ano on command prompt if you see any like like shown below it means that port 80 is already occupied and not available for new webserver. Port 80 is used for webservices and generally used by IIS (Internet Information Server, a Web server that comes with Microsoft Windows, or some time my be used by services like Skype or some antivirus) make sure that port 80 is free before you start installing/configuring Apache as a webserver.
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 8848

Download Apache
Apache is a free and open source webserver available for almost all available operating systems. Apache (Webserver) is one of the component of WAMP Server or XAMPP used by many of us for working with php or any other opensource server side programming language. To install Apache (sometimes referred as httpd) we need to download it from its official website http://apache.org/ but that installation my be tedious so alternative we can download windows binary (since we are going to setup apache on Windows) from Apache Lounge from link http://www.apachelounge.com/download/. Prior to installation of apache make sure that you have Microsoft’s Windows C++ runtime already installed on your system. Just download and install Windows C++ runtime from http://www.microsoft.com/downloads/details.aspx?FamilyID=200b2fd9-ae1a-4a14-984d-389c36f85647&DisplayLang=en just in case you are not sure, I assure that this step wont harm in any ways ;) .

Setup and configure Apache

Apache files are downloaded as zip file, extract zip file to c:\apache (or any other folder that you find suitable, I installed it on d:\apache24), wait, let me tell you that there was a folder named apache24 in zip file, thats the folder that is needed to be extracted. Fig x.x shows the content of the folder.

Once you have extracted the apache24. You need to open conf folder and and locate the file httpd.conf and open it in your favorite text editor.

  1. On line 37 modify the location of server root (in my case the this like says : Define SRVROOT "d:/Apache24")
  2. Check for Listen directive is set for listen on port 80 (simply search for term listen in this file. In my case the directive is present on line No 60). you may specify some other port in place of 80 in case you are unable to figure out which service has occupied port 80 or just in case you don’t want to stop/terminate that service you can use port 8000, 8080, 8800 or 8888 These are some preferrerd port for web services other that port 80. but keep in mind, in case you any other port you will have to use this port number while accessing webservice through web browser e.g. if you have configured port 8080, you will have to visit http://localhost:8080.
  3. Search for section and modify AllowOverride none to AllowOverride All
    in all the locations within this file.
  4. Search for DocumentRoot "${SRVROOT}/htdocs", remember that you have set the SRVROOT in first step here you are saying that document root is htdocs folder on your serverver root. This is the location where you will be required to put all you webpages, or php files to be accessed through internet (browser).
  5. Save this file (httpd.conf).

Test and start Apache Web Server

On terminal (command prompt) go to bin folder under apache24. (you will need to enter some DOS Commands, ask me if you want to know the commands.) and issue httpd -t to test httpd.conf. This command will display errors, if no error appears, it means that you are ready to start your web server. Now just issue following command on terminal to install apache as a windows service (which will automatically starts whenever you start your computer.
httpd -k install

To check if server is working fine, open your favorite web browser and type localhost on its address bar then hit enter. If you see “It Works” on your browser, it means that you have successfully installed apache on windows machine.

You can also access your webserver using http://127.0.0.1 or using http://IPAddressOfMachine from any computer on network.
Although when you install apache using httpd -k install command, apache gets added to windows service which can be managed using services.msc. You can set apache service to start automatically whenever system boots.

Next Article will be installing PHP on Windows and run it through Apache webserver.

Thursday, April 25, 2019

साक्षात्कार


आज अचानक से वह सामने आ गया। चेहरा कुछ जाना-पहचाना सा लग रहा था। बस एक झलक नज़र आई, मैं ठिठका, उसे देखने के लिए रुका, याद नहीं आ रहा था कौन है। वह भी मुझे ऐसे ही निहार रहा था, जैसे उसका कुछ खोया हो। एक-दूसरे को पहचानने की कोशिश करते हुए हमारी आँखें टकराईं। ऐसा लग रहा था कि कभी उन आंखों में सूरज-सी चमक रही होगी, किंतु आज उनमें कुछ मायूसी नज़र आ रही थी।

Monday, October 15, 2018

Shortcomings of Computer Science (HPBOSE) Syllabus


Last time I discussed the objectives of Computer Science CBSE V/S HPBOSE, this time I am going to raise some questions based on the content of syllabus of Computer Science offered in Himachal Pradesh.
First of all, remember that syllabus of Informatics Practices offered by CBSE was being followed in Himachal till 2015-16 with the same name. In 2015 the syllabus was, so called, updated and the name of the subject changed from Informatics Practices to Computer Science with following syllabus contains:

Monday, October 8, 2018

Education Department of Himachal Pradesh in Disarray


The working of education department has raised serious questions now a days. The administrative machinery of the department which governs the highest qualified personnel should have been most efficient but contrary to our expectations this department seems to be in a state of confusion. The education department is issuing contradictory orders in order to favour a section of employees. I am quoting here a latest example to show the working of the department. The Directorate of Elementary Education Himachal Pradesh in it's letter no. EDN - H (2) 8(9)- Exmen- Sty. 5/2018(SLP - 8710/09) dated 27 July 2018 re-framed the seniority of ex servicemen in the light of Supreme Court order showing their position as on 29.12. 2008 and as per direction of Department of Personnel HP vide letter no. PER (AP)-C-B (19) -3/96 Vol.vii dated 30.01.2018 in respect of TGTs. Sh. Fauja Singh bearing seniority no. 1669 was assigned seniority no. 10916-  zs and consequently he was to be demoted to the post of TGT (Arts) from Principal, but instead the Department of Higher Education promoted him to the post of Deputy Director vide letter no. EDN- B- B (6)-18/ 2010-1 dated 06th October 2018 and he was placed as Deputy Director Elementary Education Chamba. Hence, it is very much surprising  that the  department is in such a confusing state that it is contradicting it's own orders. Isn't it an example of favouritism to a section of employees? Despite facing the contempt petition in the High Court, the education department  seems to be indifferent. It has created a sense of helplessness among the affected people who are fighting for implementation of Supreme Court judgement for the last one year.


Dr. Pradeep K Sharma
State Senior Vice- President
HPSLA

Note: The Article is written by Dr Pradeep K Sharma (State Senior Vice President of Himachal Pradesh State Lecturer Association) regarding irregularities in Education Department of Himachal Pradesh.

Exercise Basic Programming Concepts