Showing posts with label web developing. Show all posts
Showing posts with label web developing. Show all posts

Saturday, June 6, 2015

How to configure xampp with already Installed MySQL server

Xampp is a collection of software package which comes with “Apache”, “MySQL”, “PHP” and “Perl”. With this bunch of software you can maintain a web server functions in your local machine. Here with this post I’m going to tell you how to configure xampp in order to run different MySQL servers in same computer without creating a conflict between servers. 

First you have to install xampp in your computer. 



















After successful installation you can open the xampp control panel using setup window or from your start menu or start screen.
Here in my computer I have already installed MySQL server which is use to develop standalone applications using C# or java. So here if you have pre-installed MySQL server here is the way to use both MySQL and xampp’s MySQL server without any errors.



















In your xampp control panel you can see some buttons to start the apache and MySQL server. But below those buttons you can see textual descriptions of the xampp. Here we named it as xampp console. Now in console you can see some red colored texts which are appeared to be errors in xampp control panel. In there  you can see some text looks like this “MySQL Service detected with wrong path ” and list of errors that tell you that MySQL server cannot be started.

The reason is you have already configured MySQL server which is incompatible with xampp.
But you can recover this error by editing the configuration files in xampp.

first   click on apache “Config” button which is located before the “Logs” button. See below image  for a clear view.

Then click on “PHP(php.ini)”. Then a notepad will be opened with some text.


Now press “Ctrl+H” to get the find and replace dialog box. (alternately you can go to edit à replace). Now in find text box type 3306 and in replace box type 3307 and click “replace all”.

After that save the php.ini file and close it. Now again come to xampp control panel and again click on MySQL “Config” button and click on “my.ini”.

Again you are with a notepad. Now again press “Ctrl+H” and type 3306 as find text and 3307 as replace text and click on “Replace All”. Now save changes and close the notepad.

Now in xampp control panel you can see a button named “config” which is located at top right corner below the close button.

Now click on it and click on the “service and port settings” button. Now in this window navigate to “MySQL” tab and use following settings.
            Service name : mysql4
            Main port : 3307












hen click on “save” and again click on “save”.

Now you are almost done.
Now click on “Quit” button to terminate the xampp.




Note : do not close from windows default close button. Because this will not close xampp permanently.
Now open xampp again from your desktop or anywhere.
Now you can see there are no any red colored texts in the xampp console.
Now start your apache and MySQL server. If you are done correctly it will work fine.






Now click on MySQL “Admin” button to access your databases in xampp’s MySQL server.

Wednesday, February 4, 2015

Use of colors in HTML

we can use RGB colors in web pages to make the page more colorful.
Syntax of RGB color code is rgb(rr,gg,bb)


As an example to show green color using RGB code we can write as following, rgb(0,255,0)


You can get RGB code of a color by using “Adobe Photoshop” or any image processing software. But in HTML we us corresponding hexadecimal value of a RGB color code.
Example : for red color 
  • RGB value = (255,0,0)
  • Hex value = #ff0000


But most web browsers support 17 main colors.
They are 
  1. Aqua
  2. Black
  3. Blue
  4. Fuchsia
  5. Gray
  6. Green
  7. Lime
  8. Maroon
  9. Navy
  10. Olive
  11. Orange
  12. Purple
  13. Red
  14. Sliver
  15. Teal
  16. White
  17. Yellow
we can use them without hex value.
We can use following HTML code 
<HTML>
<HEAD>
<TITLE>Colors</TITLE>
</HEAD>
<BODY>
<H1><FONT color=”red”>This is in red color</FONT></H1>
<H2><FONT color=#0000FF >This is in green</FONT></H2>
<P><FONT color=”blue”>This is some text</FONT></P>
</BODY>
</HTML>



The output will be,

How to use background colors.


<HTML>
<HEAD>
<TITLE>Colors</TITLE>
</HEAD>
<BODY BGCOLOR=”orange”>
<H1><FONT color=”red”>This is in red color</FONT></H1>
<H2><FONT color=#0000FF >This is in green</FONT></H2>
<P><FONT color=”blue”>This is some text</FONT></P>
</BODY>
</HTML>


output,


Fonts in HTML

Use of different font styles


We can change font style using “font” tag
General syntax of a font tag
<FONT size=value color=colour face=font types></FONT>
We can use many font types by using commas.
Example:
<FONT face=Courier New,Times New Roman> This is Some text</FONT>
Here if first font is not available then browser show the text using second font.


How to change font size
General Syntax : <FONT size=value ></FONT>
Can change according to 2 methods.
1.use of numbers
We can use numbers from 1 to 7
1 for smallest 7 for largest and 3 for normal size
Then 1 and 2 are smallest size,3 is normal size and 4 to 7 are large size.
2.Use of relative values
Use +1 to +6 for increasing values and -1 to -6 for decreasing values

Example,
<FONT size=2 >This is font size 2</FONT>
<FONT size=7 >This is font size 7 (larger)</FONT>
<FONT size=+3 >This is relative font size +3</FONT>


Complete code,
<HTML>
<HEAD>
<TITLE>Fonts</TITLE>
</HEAD>
<BODY >
<P><FONT face=Courier New,Times New Roman > This is Some text</FONT><br/>
<FONT face=Times New Roman,Courier New,Georgia size=5> This is Some text</FONT><br/>
<FONT size=2 face=Courier New>This is font size 2</FONT><br/>
<FONT size=7 >This is font size 7 (larger)</FONT><br/>
<FONT size=+3 >This is relative font size +3</FONT><br/>
<FONT size=-1 >This is relative font size -1</FONT></P>
</BODY>
</HTML>



Output,


Friday, December 5, 2014

How to use text formatting in HTML

Formatting a text


For text formatting there are some special tags.


For bold a text


We can use <B>--</B> or <STRONG>--</STRONG>

Here <B> stands for “bold”
For italic a text


We can use <I>--</I> or <EM>--</EM> or <DFN>--</DFN>
Here <I> Stands for “italic”, <EM> stands for “emphasis” and <DFN> stands for “definition”


For superscript a text
We Can use <SUP>--</SUP> for super scripting.
<SUP> stands for “superscript”


For subscript a text


We Can use <SUB>--</SUB> for sub scripting.
<SUB> stands for “subscript”


For delete a text


We Can use <DEL>--</DEL> for delete a text with a single strike.
<DEL> stands for “delete”


For block quote a text



We Can use <BLOCKQUOTE>--</BLOCKQUOTE> for indent a text from left margin to right.

For highlight a text


We Can use <MARK>--</MARK> for highlight a text.


For underline a text


We Can use <U>--</U> for underline a text.
<U> stands for “underline”


To use addresses



We Can use <ADDRESS>--</ADDRESS>  

Example:
<HTML>
<HEAD><TITLE>Text Formatting</TITLE></HEAD>
<BODY>
<B>This is bold tag</B><BR>
<I>This is italic tag</I><BR>
<EM>This tag is also use to italic a text</EM><BR>
<DFN>Definition tag normally in italic </DFN><BR>
I'm the 1<SUP>st</SUP>
<P>Water is known as H<SUB>2</SUB>o.</P>
<P>This is my <DEL>first</DEL> HTML document</P>
<BLOCKQUOTE>This text is away from left margin</BLOCKQUOTE>
<MARK> I want to highlight this sentence</MARK><BR>

<U>IS this underlined.</U>
<P>contact us @<ADDRESS>Main Road,Red light district.</ADDRESS></p>
</BODY>
</HTML>



Save this as “text formatting.html”.
Open it through your web browser.
























Saturday, November 29, 2014

Starting with HTML

Setting up a website


To setup a website first we want to create a folder named with your site name.
Example: mysite, abcsite, “yourcompanyname”site.
Here we create a folder named mysite .

To create a folder in windows you can right click on desktop or any window and go to new-->New Folder and rename it as mysite or whatever you like.






Creating your first HTML document

Open a plain text editor like notepad,notepad++ or use a HTML Editor like microsoft visual web developer,macromedia dreameviewer to code HTML codes.Here I use my own notepad named “My Note”.You can type following codes in any text or HTML editor.But if you are a beginer to HTML Please use Text Editors to practice HTML.Let`s start.

<HTML>
<HEAD>
<TITLE>Title of your website</TITLE>
</HEAD>
<BODY>content goes here</BODY>
</HTML>