need help. I am new to xampp

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

need help. I am new to xampp

Postby mayada » 30. July 2006 17:06

Dear all,

I have installed xampp in my windows xp system. I have created my relational tables and I am now ready to start programming my application. I don't know how to start building php pages and where I should save them. There is no option in phpMyadmin page to create php pages.

Many thanks
mayada
 
Posts: 12
Joined: 30. July 2006 17:02

Postby thekingofcaseys » 31. July 2006 16:14

phpmyadmin is not a tool to build PHP websites its simply a tool to monitor and edit a SQL database. If your dont know how to write in php i suggested you try a few sites and learn the basics before attempting to build anything.

i can only suggest you look around for a guide to php seach google look for ebooks, as learning takes some time and not something you can learn over night
thekingofcaseys
 
Posts: 50
Joined: 27. December 2004 15:38

Postby mayada » 31. July 2006 21:06

Hi Thanks for this.

I have actually written php code before. I wasn't sure where to setup my files when using xampp. I've now figured out that I need to save my pages in xampp\hotdocs.

However I have a problem connecting to mysql. I wrote a simple php page to test connection and it gives me the following error message:

Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\test.php on line 21


when i check line 21 in my script it is:

$conn = mysql_connect("localhost", "root", " ")
or die('could not connect: '. mysql_error());

Please note: i have done my installation with the installer and I have not changed any configuration apart from enabling innodb.

Do i need to do anything else?

SORRY I NOTE THIS THREAD HAS BEEN MOVED BUT I DON'T KNOW WHERE IT IS MOVED TO. I DON'T SPEAK GERMAN.

Many thanks
mayada
 
Posts: 12
Joined: 30. July 2006 17:02

Postby mayada » 31. July 2006 21:53

i think i may have figured out what's wrong but I still need help.

reading some books about apache/mysql/php. it seems that apache need to be enabled for php. I thought this is done automatically by using xampp!

i've added the following lines to httpd.conf

LoadModule php5_module c:/program files/xampp/php/php5apache2.dll

AddType application/x-httpd-php .php .phtml .html

But after i did that I stopped my apache and when i try to restart it, it won't start!

Help please :(
mayada
 
Posts: 12
Joined: 30. July 2006 17:02

Postby Wiedmann » 31. July 2006 22:23

think i may have figured out what's wrong

No.

reading some books about apache/mysql/php. it seems that apache need to be enabled for php.

Only on a PHP enabled Apache can have this error message:
Parse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\test.php on line 21

Because this is an error message from PHP (and not from Apache)

but I still need help.

I think so too ;-)

And the result: You have an error in your script. But nobody knows here your Script.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby mayada » 31. July 2006 22:39

i have figured out this time :D

first i had <? php rather than <?php. i have fixed that and still had problems but at least the error message showed me that there was an error connecting to the database.

i deleted the password field in the following

$conn = mysql_connect("localhost", "root", " ")
or die('could not connect: '. mysql_error());

i made it

$conn = mysql_connect("localhost", "root")
or die('could not connect: '. mysql_error());


and now my script works and i am able to connect to mysql

i finally found out something else: because i don't have a password for the root account. the pasword shouldn't contain any characters including space so i did this:

$conn = mysql_connect("localhost", "root", "")
or die('could not connect: '. mysql_error());

this worked.

and finally finally, i created a password for my root account - all is fine now.
mayada
 
Posts: 12
Joined: 30. July 2006 17:02

Postby thekingofcaseys » 31. July 2006 23:34

glad you got everything working and correct
thekingofcaseys
 
Posts: 50
Joined: 27. December 2004 15:38


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 56 guests