Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse Error in Database.PHP


ChicBoutique

Recommended Posts

Hi,

 

I am trying to upload a modified OSCOMMERCE store (i was able to upload the original version and I wanted to get something with a preinstalled design that I could modify rather than starting from scratch)

 

Anyhoo, I'm having some trouble connecting to the MySQL database - I am getting this error message

 

Parse error: parse error, unexpected '.', expecting ')' in /home/content/c/h/i/chicboutique/html/BeautyShop/includes/functions/database.php on line 13

 

Here is Line 13/14/15 of the database.php:

 

function tep_db_connect($server = not_important.someserver.net, $username = ******, $password = *****, $database = *******, $link = 'db_link') {

global $$link;

 

I am COMPLETELY new to this and I don't have a clue what is wrong here... I tried researching the error online, and I'm coming up with nothing. Any help you guys might have would be great. Thank you!!

 

PS... When I loaded the basic OS Commerce store it worked fine, and i loaded it to the html domain. This modified version was loaded to a subdomain (/BeautyShop) Don't know if that makes a difference or not, but figured I'd throw that in. If you need the whole code from the database.php, let me know.

Link to comment
Share on other sites

Hi,

 

I am trying to upload a modified OSCOMMERCE store (i was able to upload the original version and I wanted to get something with a preinstalled design that I could modify rather than starting from scratch)

 

Anyhoo, I'm having some trouble connecting to the MySQL database - I am getting this error message

 

Parse error: parse error, unexpected '.', expecting ')' in /home/content/c/h/i/chicboutique/html/BeautyShop/includes/functions/database.php on line 13

 

Here is Line 13/14/15 of the database.php:

 

function tep_db_connect($server = not_important.someserver.net, $username = ********, $password = ******, $database = ********, $link = 'db_link') {

global $$link;

 

I am COMPLETELY new to this and I don't have a clue what is wrong here... I tried researching the error online, and I'm coming up with nothing. Any help you guys might have would be great. Thank you!!

 

PS... When I loaded the basic OS Commerce store it worked fine, and i loaded it to the html domain. This modified version was loaded to a subdomain (/BeautyShop) Don't know if that makes a difference or not, but figured I'd throw that in. If you need the whole code from the database.php, let me know.

Loading and installing are 2 different operations. Did you create a database for the modified osc?

Link to comment
Share on other sites

So glad someone is around... When i say loaded, I uploaded all of the files in FTP to my server and then went through the "install". Yeah, I know, i'm a complete novice and i'm probably in over my head, I just thought it'd be easier to find a nice template that I could modify rather than starting fresh trying to design around the boring basic OS design.

 

Soo.... Yes, I created a database through GoDaddy in MySQL... The database info is:

 

MySQL Database Information

Status:Setup

Host Name:not_important.someserver.net

Database Name:*******

Database Version:4.1

Description:Test

DatabaseUser Name:*******

 

Funny thing is, when I had installed the OS Commerce originally, I didn't have this problem and when I compare the two database.php files, they seem the same? Could this be because its installed in a subdomain? I know i'm grasping at staws here but i'm completely clueless....

Link to comment
Share on other sites

Try this instead of your lines (from RC2.2a)

 

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

Link to comment
Share on other sites

THANK YOU!! It works. Originally it said it couldn't find the database, which is why I added that information into that code. It seemed to make sense at the time LOL

 

Now I can go to bed!

Excellent. Now remember to back up files and the database before editing.

Link to comment
Share on other sites

Don't forget you will now need to change you mysql credentials as you posted you site/sqlusername/password above.

 

This needs to be done in the privileges section in phpmyadmin and reflected in your 3 configure.php files.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...