Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Theme Setup Help


crunchydan

Recommended Posts

Posted

I am a little embarassed that I can't figure this out on my own. I am trying to install a template theme on an osCommerce site. I upload the files, set up the database but I am still getting an error message when I visit the domain after the installation process.

 

The error message is as follows:

 

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/No-MySQL-hostname-was-specified' (2) in /home/guitarpickers/guitarpickersaz.com/includes/functions/database.php on line 19

Unable to connect to database server!

 

When I look at the PHP file, things look like they should be correct.

 

This is a screen shot of the code I have that is not responding correctly:

post-318620-0-77874900-1356638991_thumb.png

 

And here is a screen shot of the original code before the setup:

post-318620-0-47150700-1356639004_thumb.png

 

Now, I have tried to figure out where in the process things go wrong, but can't seem to find it. I understand the basic process and how it should work, but something weird is happening.

 

I have installed a fresh copy of osCommerce without a theme and the setup works perfectly, the database works, and the store looks functional. However, when I go through the same process while uploading the template version, it will not work. It gets hung up on that error message.

 

It says there is an error on line 19 of that file, but it doesn't seem like there is to me. Why won't this connect to the server? Any help and advice would be so greatly appreciated! Let me know if you need any other info or if I left anything out.

 

I know that themes aren't officially supported, but I'm hoping someone here can help me out.

 

Thanks so much!

Posted

@@crunchydan

I don't know why you have edited that function sins that is a general function in OSC. Is it the theme that tells you to change it?

 

Try to change it back, and all DB info are located in the 2 configure.php files.

 

The error itself says that there are no hostname, and thats because you have changed it in the function instead of in the configure files..

Posted

I didn't actually edit that. This is what happens when I upload the theme. The reason I uploaded the two screenshot examples is to demonstrate the working version which is just the stock store VS the theme/template version when I go through the setup. So to answer your question, yes the theme is what is making that happen.

 

Is the theme changing this in the wrong area? It seems the obvious answer is yes, of course.

 

So to clarify your answer... I should change back the function file to what would come standard from the osCommerce download? Then I should change the info of the configure file to point to the hostname and such? I am going to try this out and then will edit my post with the outcome.

 

Thanks!!!

Posted

@@www.in.no

Thank you so much for your help. You led me in the exact direction I needed to go to get this fixed!

Just in case anyone else searching needs to know what steps I took, here is what I did:

 

When I loaded the template, it threw the info into the function file located at includes/functions/database.php. I don't think this is what should normally happen, but that's what MY template did.

I changed the function file back to the orginal info. In the above screen shots, you can see each.

 

It set the function file as:

($guitarpickers, $guitarpickers, $Nottherealpassword)

 

and I changed it back to:

($server, $username, $password)

 

From there I had a bunch of weird info in my includes/configure.php file.

 

I had to alter lines 2 and 3 to:

 

define('HTTP_SERVER', 'http://guitarpickersaz.com');

define('HTTPS_SERVER', 'http://guitarpickersaz.com');

 

Along with line 21

 

define('DIR_FS_CATALOG', 'http://guitarpickersaz.com');

 

And lines 25,26,27,28

 

define('DB_SERVER', 'mysql.guitarpickersaz.com');

define('DB_SERVER_USERNAME', 'guitarpickersdb');

define('DB_SERVER_PASSWORD', 'Nottherealpassword');

define('DB_DATABASE', 'guitarpickersdb');

 

Once I uploaded these changes, the site pulls up and functions properly. There seem to still be a few bugs on the template itself, but the site is pulling up the way it should.

 

I think this was just a bad template, honestly, but this was my fix.

 

Hope my error ends up helping somebody else out.

Archived

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

×
×
  • Create New...