How to start XAMPP in my browser after installing it successfully
Solution 1
The command for starting the server is:
$ sudo /opt/lampp/lampp start
Source here:
apache friends - xampp for linux
Solution 2
Start command: $ sudo /opt/lampp/lampp start
If you want XAMPP to start automatically when you logon to the system:
Open terminal and run following command sudo gedit /etc/init.d/lampp
paste following code in open file
#!/bin/bash
/opt/lampp/lampp start
save and close the file
run following command to make this script executable
sudo chmod +x /etc/init.d/lampp
run following command to install init scripts to all runlevel
sudo update-rc.d lampp defaults
restart the system
Tutorial link with screenshots: here
Related videos on Youtube
sanjeet kaur
Updated on September 18, 2022Comments
-
sanjeet kaur over 1 year
I am working for search in django and I am not able to find if I can able to use two different models in same app in results of that query set.
For eg. I am making search as shown but the fields
authors
andtitle
are from different models what should I do at lineresults = Books.object...
whereBooks
is for model name. my original views:from django.db.models import Q from django.shortcuts import render_to_response from bills.models import * def search(request): query = request.GET.get('q', '') if query: qset = ( Q(expenses__rate_of_pure__icontains=query) | Q(expenses__customer_id__icontains=query) | Q(Choice__carat__icontains=query) | Q(Choice__labour_cost__icontains=query) | Q(Choice__item__icontains=query) | Q(Choice__weight__icontains=query) ) results = expenses.objects.filter(qset).distinct() else: results = [] return render_to_response("bills/search.html", {"results": results, "query": query})
and models are:
from django.db import models from front.models import category class expenses(models.Model): purchase_order_no = models.IntegerField(max_length=3,\ primary_key=True) rate_of_pure = models.IntegerField(max_length=15) voucher = models.IntegerField(null=True) customer_id = models.ForeignKey(category) def __unicode__(self): return'%s' % (self.purchase_order_no) class Choice(models.Model): customer_id = models.ForeignKey(expenses, unique=False, blank=True, null=True) carat = models.IntegerField(max_length=2) item = models.CharField(max_length=25) weight = models.FloatField(max_length=10) labour_cost = models.IntegerField(max_length=10)
the thing I want to ask is in views line 16, where i have to give the name of models which model should i give as i am using two parts of the model.
-
Томица Кораћ about 11 yearsBtw, you can't access your XAMPP server root at '/xampp/index.php'. You have to type 'localhost' instead.
-
Admin almost 11 yearsThanks a lot! this command started xampp but however i couldnot access mysql. it says XAMPP: Starting MySQL... XAMPP: Couldn't start MySQL! Anybody has any idea what to do?
-
Shrinath Shenoy about 9 yearsCan you paste your above models here?
-
itzMEonTV about 9 yearsplease indend your lines after
if
condition -
sanjeet kaur about 9 yearsShrinath , I am not having these actual views this was an example and I want to fill the query set with variables from two different models of the same app, I am not getting which model to use for objects.all query
-
GwynBleidD about 9 yearsBut what problem do you have? You've described what you're trying to accomplish (but not clear for me) and pasted some code that (in my opinion) works how you're expecting. Try to explain what problem do you have with that code and what part of it makes some troubles for you.
-
-
PYTHON TEAM about 11 yearsits not working.. we tried it.. some other suggestions please
-
Томица Кораћ about 11 yearsWhen you say it's not working, what's the response you get when you try to run this command? Are you sure you've installed XAMPP for Linux the proper way, as instructed here: apachefriends.org/en/xampp-linux.html#377 ? Please make sure there is a 'lampp' folder inside your '/opt' directory, and that it contains the script named 'lampp' too.
-
PYTHON TEAM about 11 yearsits all there in /opt directory.. i m damn sure i installed it.. When i run localhost in my browser i mgetting this message It works! This is the default web page for this server. The web server software is running but no content has been added, yet.
-
Томица Кораћ about 11 yearsAh, I get you now. The problem is you already have a server software running. You need to stop that first in order to be able to run lampp. For commands how to stop Apache, refer to: cyberciti.biz/faq/… . Then run 'sudo /opt/lampp/lampp start' and tell me what's the response.
-
PYTHON TEAM about 11 yearsoomsys@oomsysmob-6:~$ sudo /etc/init.d/apache2 stop * Stopping web server apache2 ... waiting . [ OK ] oomsys@oomsysmob-6:~$ sudo /opt/lampp/lampp start Starting XAMPP for Linux 1.8.1... XAMPP: Starting Apache with SSL (and PHP5)... XAMPP: Another MySQL daemon is already running. XAMPP: XAMPP-ProFTPD is already running. XAMPP for Linux started. m getting the same like "already running"
-
Томица Кораћ about 11 yearsNice, we're almost there. The response you got told you the following: The old Apache server was stopped; I'm able to start LAMPP; I'm starting LAMPP Apache; I can't start LAMPP MySQL because there's another MySQL server already running. So now you need to stop your existing MySQL server in order to start the LAMPP MySQL server. Run this command: 'sudo /etc/init.d/mysql stop', then run 'sudo /opt/lampp/lampp start' again, and let me know the response.
-
PYTHON TEAM about 11 yearsya..we have one more doubt
-
PYTHON TEAM about 11 yearsi cant able to create any folder inside /opt/lampp/htdocs/myphp_project(this is my project name)...
-
Томица Кораћ about 11 yearsYou need to create it in '/opt/lampp/htdocs/PROJECT_FOLDER/FILE_NAME.php'. When you do, you can access it at the address' localhost/PROJECT_FOLDER/FILE_NAME.php'. But if you need any further instructions of this type, I should remind you that AskUbuntu is not the appropriate place for this kind of assistance.
-
David Foerster over 8 years-1 These aren't even valid commands.
cd
doesn't take more than a single argument.