Current location: Hot Scripts Forums » Programming Languages » PHP » Noob Questions


Noob Questions

Reply
  #1 (permalink)  
Old 11-04-03, 05:27 PM
Mitch Mitch is offline
New Member
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Noob Questions

Hi everyone

I'm pretty new, and still trying to learn about SQL and PHP, so please forgive me..hehe

Anyway here is my problem,

I run a website and I am trying to Install this program for my site that uses PHP, it is located here at http://swgcb.yogn.net/download.php

Ok so after I download that file, I adjust the config.php, but this is where I get lost...I'm not sure what I am supposed to do from this point. I tried to upload all the files that were zipped up, and tried running the .mysql file thinking this would dump the scripts to my DB, that didnt work...then I went to my SQL control panel and tried to dump it from that point, and this was the error i got...

STDERR:

Failed to find hte "nothing" line (\n\n) ! Premature end of script headers.

STDOUT:

(nothing)


Now i'm not sure if I'm doing anything right here, and I've tried looking all over the net to find out how to do this, but i'm still clueless....if anyone could help me it would be much appricated! Let me know if you have any questions. Thanks!
Reply With Quote
  #2 (permalink)  
Old 11-04-03, 11:47 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 510
Thanks: 1
Thanked 1 Time in 1 Post
Make sure you do the following...

1) Your database name and the .mysql info file's database name need to match, and double check the the username/pass/host info is correct.

2) If you have phpMyAdmin, you can probably copy the query info in the .mysql file and paste it into the "SQL" page for your database.

3) Make sure that your user/pass has permission to work on the database.

4) Check out www.MySql.com.
Reply With Quote
  #3 (permalink)  
Old 11-05-03, 03:47 PM
Mitch Mitch is offline
New Member
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by mdhall
Make sure you do the following...


2) If you have phpMyAdmin, you can probably copy the query info in the .mysql file and paste it into the "SQL" page for your database.

3) Make sure that your user/pass has permission to work on the database.
Hey thanks for your help!

Ok let me follow up after trying a few more things...

Should the script file, swgcb-v0.9.2.mysql, along with the rest of the files included in the zip be in /cbi/bin ? That is where I have them now.

I went to "SQL" page in phpMyAdmin, and tried to paste this query:

mysql -udbuser -p dbname < swgcb-vx.x.x.mysql

Do I need to edit this at all? This is what I get when I try and run the query:

Error

SQL-query :

mysql - udbuser - p dbname < swgcb - vx.x.x.mysql

MySQL said:


You have an error in your SQL syntax near 'mysql - udbuser - p dbname < swgcb - vx.x.x.mysql' at line 1



Also now when I try and run the script directly I see this error log:

STDERR:

/cgi-bin/swgcb-v0.9.2.mysql: line 1: --: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 2: --
: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 3: --: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 4: ---------------------------------------------------------
: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 5: --: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 6:
: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 7: --
: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 8: --: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 9: --
: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 10:
: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 11: DROP: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 11:
: command not found
/cgi-bin/swgcb-v0.9.2.mysql: line 12: syntax error near unexpected token `('
/cgi-bin/swgcb-v0.9.2.mysql: line 12: `CREATE TABLE ability (
'
Failed to find the "nothing" line (\n\n)! Premature end of script headers.

STDOUT:

(nothing)



Also how/where can I check to make sure user/pass has permission to work on the database, if that could be a reason for this.
Reply With Quote
  #4 (permalink)  
Old 11-05-03, 04:06 PM
Mitch Mitch is offline
New Member
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
doh! Ok I figured it out...I'm a doofus..hehe..thanks for your help, I really appricate it, I got it working now so phew!
Reply With Quote
  #5 (permalink)  
Old 11-05-03, 05:04 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 510
Thanks: 1
Thanked 1 Time in 1 Post
On the phpMyAdmin main page, go to the permissions section. This is where you add, edit and delete users for your db. You can set their permissions to have access to all or only some of the databases and tables. If you make changes, make sure your php query scripts are still configured for the permissions you set.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two questions (in one thread, what a deal!) G M Morris PHP 5 10-03-03 05:53 AM
woof ruff (i'm new with a few questions) APuppyDog PHP 2 07-22-03 10:51 AM


All times are GMT -5. The time now is 07:27 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.