PROBLEMS WITH XAMPP USING PHP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PROBLEMS WITH XAMPP USING PHP

Postby helpppppp » 13. November 2007 15:30

I have installed xampp as i want to create an online ordering system and created the databases i need, i have created two templates in html and created the php file but i need to put it in the route directory which i though was htdocs but nothing happens when i do this, i open the template websie but it doenst display the info from the sql database i have referenced in my php code, please help
helpppppp
 
Posts: 2
Joined: 13. November 2007 15:24

Postby LooseCannon » 13. November 2007 18:31

Hello & welcome helpppppp. Interesting nickname. :o

How far have you ever got to the XAMPP Welcome page and phpMyAdmin? That is before any new/addition web content or configurations.

Or, can you access them now? That is, with Apache and MySQL running, just press the Admin button in XAMPP to see the welcome page. There's a link on that page to phpMyAdmin.

There are other ways to check, but this is somewhere to start.

The root directory, without virtual hosts, is indeed xampp\htdocs. However, before a php/MySQL web page will appear, Apache and MySQL must be configured satisfactorily. I'm wondering what's happened to the default installation.

How are you trying to access the web page? http://localhost/..?

Can you connect to the MySQL database at all, independently of the web site or php?
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

xampp

Postby helpppppp » 15. November 2007 13:58

glad u like my username!lol

you asked too many questions im already so confused!!

i can see the home page in xampp by http://localhost etc
i havent configured the page correctly is that when you need to change the php - ini file?
i can use the database in phpmyadmin i have created some databases

maybe the problem then is cause i havent configured anyhting!! hpow do i do it? please help!
helpppppp
 
Posts: 2
Joined: 13. November 2007 15:24

Postby LooseCannon » 17. November 2007 14:57

By 'home page' at http://localhost I assume you mean the XAMPP welcome page. Please shout NO is not.

Ok, you can access phpMyAdmin and create databases therewith. That suggests that your XAMPP Apache installation is infact running MySQL and php satisfactorily to some extent. I conclude this because, that phpMyAdmin is infact a local web site that has php code accessing the local MySQL.

Note that the XAMPP installation comes with the phpMyAdmin configured to connect to and work with MySQL. With the user 'root' and to start with, a blank password, it knows what to do.

So, how are _your_ new php web pages connecting to _your_ new databases? Are you familiar with:
1. The php code to enable a web site to connect to a database?
2. MySQL user privileges for access and interacting with a database?

Eg php database connection:
Code: Select all
$DB_USERNAME = "root";      // username for logging in to db
$DB_PASSWORD = "aPassWord";   // password for logging in to db
$DB_HOSTNAME = "localhost";      // server hosting db usually "localhost"
$DB_DATABASENAME = "yourDatabase";   // name of database containing your tables


This is an extract only, not a complete file. When you "... created two templates in html and created the php file ..." did you include something like this?
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 124 guests

cron