Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Script errors, can anybody help?
Old 03-17-2005, 01:01 PM Script errors, can anybody help?
dant's Avatar
Super Talker

Posts: 148
Trades: -1
Hi,

I am wondering if somebody can help me with some PHP/MySQL, as with my limited knowledge I am becoming slightly stuck!

I am trying to install a script on a subdomain of my site, and this was included in the readme file:

-copy all files to your web host --> done this no problem here :d
-use phpmyadmin or your mysql interface to run admin/jobs.sql against your database. --> managed to figure this out and has added the tables etc.
-open site.xml and edit the database section with your database details. --> done this but Im unsure if this is correcct?
-go to admin/ and login with username of admin with a password of ****. --> not done
-be sure to change the passwords for the admin and regular user. --> not done.


Setup the site.xml file with your database settings as follows.

<database type="mysql">
<server>database server address</server>
<login>database login</login>
<password>database password</password>
<default>mysql database name</default>
</database>

I think my problem lies with the site.xml file although I am not certain. Here is what I have been using (to no avail):

<database type="mysql">
<server>localhost</server> --> also tried ip address.
<login>database login</login> --> not too sure if i have a database login, being using the subdomains ftp account however.
<password>database password</password> --> same applies as above.
<default>mysql database name</default> --> used the correct name here.
</database>

When I access the site I am met with a page outlining the files on the server. When I try and access a php page I am met with these errors:

Warning: mysql_connect(): Access denied for user: 'MYUSERNAME@localhost' (Using password: ***) in /home/freelanc/public_html/jobs/jobs/admin/lib/database.php on line 100

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /database.php on line 100
CDatabase::Connect() error

My knowledge of PHP/MySQL isn't vast, and I cannot see what is wrong. Is it a case of CHMOD? Or is the script not functioning correctly (which I don't suspect)

I am keen to expand my knowledge of all aspects of programming and would sooner learn how to do things myself than pay somebody!

Any help will be appreciated.

Dan
dant is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-17-2005, 01:14 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
When you created a database, you should have also created a database user/pass. This is what you would put in the xml file.

Did you create the database or did you use an already existing database?
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 03-17-2005, 01:44 PM
dant's Avatar
Super Talker

Posts: 148
Trades: -1
Thanks for the reply,

I added a new database in Cpanel, *have just checked and there is no username/password.* I need to add this!

Last edited by dant; 03-17-2005 at 01:49 PM..
dant is offline
Reply With Quote
View Public Profile
 
Old 03-17-2005, 01:47 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
You will need to create a database user and then add that user to your database. This can all be done on the same screen you used to create your database.
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 03-17-2005, 01:59 PM
dant's Avatar
Super Talker

Posts: 148
Trades: -1
Thanks for taking the time to help me - it worked a treat!
dant is offline
Reply With Quote
View Public Profile
 
Old 03-17-2005, 02:06 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
I'm glad to hear it
Anacrusis is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Script errors, can anybody help?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.37100 seconds with 12 queries