Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Scripts and Code Snippets
Reload this Page Getting Parse error: syntax error, unexpected ';', expecting ')' error
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
Senior Member
rodrifranc is an unknown quantity at this point
 
Posts: 142
Join Date: Aug 2009
Location: Puerto Rico
Default Getting Parse error: syntax error, unexpected ';', expecting ')' error - 10-11-2009, 09:54 PM

I am installing (NetClassifiedsPremium) on http://cogelogratis.com/NetClassifie...l/createdb.php
and I am getting this error:
Parse error: syntax error, unexpected ';', expecting ')' in /home/a3891127/public_html/NetClassifiedsPremium/NCADM/Config.php on line 72

My Config.php is:



What could it be? Somebody could help?????? Thanks

Last edited by rodrifranc; 10-23-2009 at 11:45 AM.
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
sandstorm140's Avatar
Developer
sandstorm140 is on a distinguished road
 
Posts: 983
Join Date: Sep 2009
Location: huHU
Default 10-11-2009, 10:03 PM

You forgot to close your array at line 60.

Change:
Quote:
$dbs = array(
/*"DB_NAME" => "a3891127_clasifi", // The name of the database that this program will use
"DB_HOST" => "mysql13.000webhost.com", // The host that this database is on. Ex. localhost or mysql.yoursite.com or 65.29.231.91
"DB_USER" => "a3891127_rodrifr", // The username setup to use this database. Must have Read/Write access
"DB_PASS" => "*******" // The password for the above user*/
to

Quote:
$dbs = array(
/*"DB_NAME" => "a3891127_clasifi", // The name of the database that this program will use
"DB_HOST" => "mysql13.000webhost.com", // The host that this database is on. Ex. localhost or mysql.yoursite.com or 65.29.231.91
"DB_USER" => "a3891127_rodrifr", // The username setup to use this database. Must have Read/Write access
"DB_PASS" => "*******" // The password for the above user*/);
PS: that's terrible commenting! You have comments inside a multi-line comment! This way var $dbs equals nothing more than array();


STOP! Your question may have already been answered!
Check the FAQs & FAQs Forums before submitting your question.

Don't bother PMing me for I have them blocked


Last edited by sandstorm140; 10-11-2009 at 10:09 PM.
Reply With Quote
(#3 (permalink))
Old
Senior Member
rodrifranc is an unknown quantity at this point
 
Posts: 142
Join Date: Aug 2009
Location: Puerto Rico
Default 10-11-2009, 10:08 PM

Thanksssssssssssss a lot
Reply With Quote
(#4 (permalink))
Old
Senior Member
rodrifranc is an unknown quantity at this point
 
Posts: 142
Join Date: Aug 2009
Location: Puerto Rico
Default 10-11-2009, 10:12 PM

Getting this now
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a3891127/public_html/NetClassifiedsPremium/install/createdb.php on line 56
Reply With Quote
(#5 (permalink))
Old
Senior Member
rodrifranc is an unknown quantity at this point
 
Posts: 142
Join Date: Aug 2009
Location: Puerto Rico
Default 10-11-2009, 10:14 PM

Getting Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/a3891127/public_html/NetClassifiedsPremium/install/createdb.php on line 238
Reply With Quote
(#6 (permalink))
Old
Senior Member
rodrifranc is an unknown quantity at this point
 
Posts: 142
Join Date: Aug 2009
Location: Puerto Rico
Default 10-11-2009, 10:15 PM

createdb.php

Last edited by rodrifranc; 10-23-2009 at 11:46 AM.
Reply With Quote
(#7 (permalink))
Old
Senior Member
rodrifranc is an unknown quantity at this point
 
Posts: 142
Join Date: Aug 2009
Location: Puerto Rico
Default 10-11-2009, 10:16 PM

(2nd Part)

mysql_connect($dbs['DB_HOST'], $dbs['DB_USER'], $dbs['DB_PASS']);

Last edited by rodrifranc; 10-23-2009 at 11:46 AM.
Reply With Quote
(#8 (permalink))
Old
sandstorm140's Avatar
Developer
sandstorm140 is on a distinguished road
 
Posts: 983
Join Date: Sep 2009
Location: huHU
Default 10-11-2009, 10:16 PM

This is because you are trying to connect to a database on your localhost:
nobody'@'localhost

It must be changed to the database you created on 000webhost. You can acquire this information by logging in to your members area -> cpanel -> MySQL


STOP! Your question may have already been answered!
Check the FAQs & FAQs Forums before submitting your question.

Don't bother PMing me for I have them blocked

Reply With Quote
(#9 (permalink))
Old
sandstorm140's Avatar
Developer
sandstorm140 is on a distinguished road
 
Posts: 983
Join Date: Sep 2009
Location: huHU
Default 10-11-2009, 10:19 PM

This line here:
mysql_connect($dbs['DB_HOST'], $dbs['DB_USER'], $dbs['DB_PASS']);

which is the array I was talking about earlier, being commented out. Your defined values do not exist. You need to remove the /* ..... */ at line 60


STOP! Your question may have already been answered!
Check the FAQs & FAQs Forums before submitting your question.

Don't bother PMing me for I have them blocked

Reply With Quote
(#10 (permalink))
Old
Senior Member
rodrifranc is an unknown quantity at this point
 
Posts: 142
Join Date: Aug 2009
Location: Puerto Rico
Default How? - 10-11-2009, 10:22 PM

Quote:
Originally Posted by sandstorm140 View Post
This is because you are trying to connect to a database on your localhost:
nobody'@'localhost

It must be changed to the database you created on 000webhost. You can acquire this information by logging in to your members area -> cpanel -> MySQL
How do I change this?
Reply With Quote
Reply

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




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com