Can't get PHP & MySQL to work together!!! AAARRGH!!!!

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
DLashley
-


Joined: 18 Dec 2002
Posts: 207
Location: New York, NY

PostPosted: Mon Jan 20, 2003 7:52 am    Post subject: Can't get PHP & MySQL to work together!!! AAARRGH!!!! Reply with quote

Can somebody, ANYBODY help me with this? I have PHP & MySQL both installed on my Windows 98SE machine. PHP is working fine, but every time I try to install a program which requires PHP & MySQL to work together, I get back a STRING of errors!!!

I have REGISTER GLOBALS set to ON already, but no dice!

What the **** do I have to do to get this @#$%& thing to work right???

AAAAARRRRGGGGHHHHHHH!!!!!!!!! :evil:

If anybody is willing to work with me one on one with this, I would be eternally grateful, and will try to make it up to you in some way. Please private message me if you want to help. I'm going nutzoid over here!!!8O
_________________
DLashley
Back to top View user's profile Send private message Visit poster's website
Kent.
Guest





PostPosted: Mon Jan 20, 2003 8:28 am    Post subject: Reply with quote

have you created a valid database in mysql?
and have you set your parameters in your php scripts to
connect to your database?

here is an example off of a php script that uses mysql

$db_servertype = "mysql";
$db_host = "localhost"; = always type in 'localhost'
$db_name = "mysql"; = the database you choose to work with the script
$db_user = "doop"; = your username for mysql
$db_password = "nerf"; your password for mysql

LET ME KNOW YOUR EXACT PROBLEM.
Back to top
DLashley
-


Joined: 18 Dec 2002
Posts: 207
Location: New York, NY

PostPosted: Mon Jan 20, 2003 4:00 pm    Post subject: Reply with quote

Kent. wrote:
have you created a valid database in mysql?
and have you set your parameters in your php scripts to
connect to your database?

here is an example off of a php script that uses mysql

$db_servertype = "mysql";
$db_host = "localhost"; = always type in 'localhost'
$db_name = "mysql"; = the database you choose to work with the script
$db_user = "doop"; = your username for mysql
$db_password = "nerf"; your password for mysql

LET ME KNOW YOUR EXACT PROBLEM.


First of all, thanks for responding so quickly! :)

Okay, I DO know how to use phpMyAdmin to create, drop, etc... databases and tables. I have successfully created tables in MySQL, and I have passwords setup for both "root" and another user on my server.

When I attempt to install scripts, I follow the instructions for what goes where on my server, and when I setup the "config.php" files in programs, I always fill out the host (localhost), database name, my user name, and my password as required.

I have setup a bunch of PHP/MySQL scripts on my UNIX server without any problems whatsoever, but when I try to setup the SAME scripts on my Abyss Web Server, I get all these @#$% errors! The errors always say "undefined" this or "unknown" that. GRRRRRRRR!!!!!

I uninstalled the PHP-Nuke script I tried to install last night, so I can't tell you exactly what the errors were at this moment, but I will try again to set it up today, and I will tell you the exact error messages I get.
_________________
DLashley
Back to top View user's profile Send private message Visit poster's website
vbgunz
Guest





PostPosted: Tue Jan 21, 2003 7:46 am    Post subject: I've noticed... Reply with quote

I've noticed a few things lately which might be able to help you. The php.ini file is usually set up by default to work with more linunix OSes than anything else. Being I am on Windows I deal with errors as I see them and all have the same thing in common... a Linunix command has to be replaced with a window command... You might want to look into that if you're running on Windows...
Back to top
feamsr00
-


Joined: 04 Jun 2002
Posts: 138
Location: Phila PA

PostPosted: Tue Jan 21, 2003 8:46 am    Post subject: Reply with quote

humm, first time I installed mysql w/ php i had many errors too. Come to find out I had to tweak the mysql installation. 2 things
1 Make sure that php has mysql support enabled (find this out in the phpinfo() ).
2 I know this sounds odd but makes sure your accounts are created corectly. mysql uses location based (ie. connecting ip)security as well as user/pass. try getting the "MyCC" prog from mysql.com, its usefull for diagnosing errors (at least it helps me better then the cmd lind).
Back to top View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
sondgerothja
Guest





PostPosted: Tue Jan 21, 2003 9:20 am    Post subject: I installed PHP-Nuke with lots of errors too! Reply with quote

I did it too, but are they errors? or are they warnings? Look in the php.ini file, and do a search for "error" I don't remember exactly what I put, but there is a way to disable the warnings from showing up. If anyone knows what I'm talking about, please help this guy out. I had someone who is a PHP guru help me install it all....so I'm not very helpful, but I know it should work fine. Those error codes, and the way php handles them needs to be changed for PHP-Nuke to diplay correctly.
Back to top
Guest






PostPosted: Tue Jan 21, 2003 11:26 pm    Post subject: Reply with quote

Hello everyone, thank you for all the responses. :-)

vbgunz - I think the "php.ini" file might just be the "root" of all my problems (no pun intended) as you suggest. I should post the contents here of the "php.ini" file here, so you guys can see what it says (minus usernames & passwords, of course).

feamsr00 - I'll try the things you suggested. Sounds like a good place to start. :)

sondgerothja - I've gotten both errors and warnings when trying to install scripts that require BOTH php & MySQL. You make a valid point as well. I sure could use a php guru myself. :)

I sure wish someone here could make up a little tutorial and help us other poor slobs out. lol. I don't usually have this much trouble setting stuff setup, but this just isn't happening for me. :?

I'm thinking of uninstalling MySQL, and just using php & scripts that store info in flatfiles instead of a database.
Back to top
Guest






PostPosted: Tue Jan 21, 2003 11:28 pm    Post subject: Reply with quote

Anonymous wrote:
Hello everyone, thank you for all the responses. :-)

vbgunz - I think the "php.ini" file might just be the "root" of all my problems (no pun intended) as you suggest. I should post the contents here of the "php.ini" file here, so you guys can see what it says (minus usernames & passwords, of course).

feamsr00 - I'll try the things you suggested. Sounds like a good place to start. :)

sondgerothja - I've gotten both errors and warnings when trying to install scripts that require BOTH php & MySQL. Using php alone generally doesn't generate many problems/error for me. You make a valid point as well. I sure could use a php guru myself. :)

I sure wish someone here could make up a little tutorial and help us other poor slobs out. lol. I don't usually have this much trouble setting stuff setup, but this just isn't happening for me. :?

I'm thinking of uninstalling MySQL, and just using php & scripts that store info in flatfiles instead of a database.


DLashley (who forgot to login)
Back to top
feamsr00
-


Joined: 04 Jun 2002
Posts: 138
Location: Phila PA

PostPosted: Wed Jan 22, 2003 12:12 am    Post subject: Reply with quote

BTW please post the errors your getting.
Back to top View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
BlaznFattyz
Guest





PostPosted: Wed Jan 22, 2003 2:16 am    Post subject: Reply with quote

you need to turn off the error reporting in the script or program you are trying to run, usually this is x86 servers you need to turn off error reporting. hopefully this helps.

Visit MGD for multiplayer gaming and pc performance support http://www.monstergamer.com . <---running on abyss server.
Back to top
DLashley
-


Joined: 18 Dec 2002
Posts: 207
Location: New York, NY

PostPosted: Mon Jan 27, 2003 11:57 pm    Post subject: Reply with quote

You've got a kick-ass site there, Blaznfattyz!!! 8O

Pardon my newbieness, but isn't it better to fix the errors than to just turn them off?

I'll try to install PHP-Nuke again, and I'll print the errors here for all to check out and comment on. I'm sure it's stuff you've all seen before.

Is there a nuke-type program out there that uses php (or cgi) and stores data in flat files intead of MySQL? If anyone knows of such a program, please post it here. I'm going over to Google, to do some websurfing.
_________________
DLashley
Back to top View user's profile Send private message Visit poster's website
db-ie
-


Joined: 21 Mar 2003
Posts: 18

PostPosted: Fri Mar 21, 2003 9:55 pm    Post subject: Reply with quote

Anonymous wrote:

I'm thinking of uninstalling MySQL, and just using php & scripts that store info in flatfiles instead of a database

DLashley (who forgot to login)


im thinking about doing the same... sadly i know jack about mysql. i have php up and running nicely and everything is is peachy.. but when php require's mysql.. well thers a problem.. does mysql have a default user name and password? and database name.. or do you set one up .. if you have to set one up how would you do that.. i have use the guide that vbgunz made and mysql is up and running. i just need to fill this php script out

Code:
<?php
$username = "ChangeThisLineWithYourSQL-Username";
$password = "ChangeThisLineWithYourSQL-Password";
$dbase = "ChangeThisLineWithYourSQL-DatabaseName";
?>


and since i dont know jack about mysql can anyone help me out here?
Back to top View user's profile Send private message AIM Address
db-ie
-


Joined: 21 Mar 2003
Posts: 18

PostPosted: Sat Mar 22, 2003 7:20 am    Post subject: Reply with quote

i got my problem fixed and for those who might get the problem i got, install mysql from the guide that vbgunz did and then immediatly download phpmyadmin and then go to privelages and put a password on the user:any localhost and then when you use a php/mysql script that asks for username password use the username any then the password you chose and then as the database use mysql

and as the code i needed before

Code:
<?php
$username = "ChangeThisLineWithYourSQL-Username";
$password = "ChangeThisLineWithYourSQL-Password";
$dbase = "ChangeThisLineWithYourSQL-DatabaseName";
?>


you would use

Code:
<?php
$username = "any";
$password = "a-password-you-can-come-up-with";
$dbase = "mysql";
?>
Back to top View user's profile Send private message AIM Address
foohoa
-


Joined: 20 Mar 2003
Posts: 10

PostPosted: Tue Mar 25, 2003 2:29 am    Post subject: Reply with quote

how to turn off the error report?
Back to top View user's profile Send private message
db-ie
-


Joined: 21 Mar 2003
Posts: 18

PostPosted: Tue Mar 25, 2003 3:44 pm    Post subject: Reply with quote

go to your administration tools for windows [you can usually right click the tool bar and then go toproperties, then select the startmenu tab, then in there check customize , then select display administrative tools, then go to start>programs> admin. tools> services> and then right click Error Reporting Service then disable and stop it .. and thenclick ok and then it should be done.
Back to top View user's profile Send private message AIM Address
DLashley
-


Joined: 18 Dec 2002
Posts: 207
Location: New York, NY

PostPosted: Wed Mar 26, 2003 11:47 am    Post subject: Reply with quote

db-ie wrote:
go to your administration tools for windows [you can usually right click the tool bar and then go toproperties, then select the startmenu tab, then in there check customize , then select display administrative tools, then go to start>programs> admin. tools> services> and then right click Error Reporting Service then disable and stop it .. and thenclick ok and then it should be done.


You must have Windows XP. I don't have those choices on Windows 98SE. :)
_________________
DLashley
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group