Jump to content
Sign in to follow this  
cthatche

Help with installation Section Database Changes

Recommended Posts

For installation of SEO-G (Database Changes) I'm trying to run the seo_g.sql file with phpmyadmin that is offered as a service through me hosting site. I have no idea of how to use this program and have no experience with mySQL or phpmyadmin. I attempted to check out the good tutorial listed at the readme web page and only found a chat thread about someone who had there site hacked. Could someone help me with what I should do for this part of the Seo-G installation? So far I opened up myphpadmin and opted it seemed that I had to choose a database first. I chose the file/extension in which my store was installed in, although I found all the default osCommerce produts, categories, manufacturers, and etc that I had deleted from my admin control panel. All my product additions have been through the admin screen (I assumed that they were all being saved in a mySQL database).

 

Regardless I try to run the file and I get the following error message in these results.

 

SQL-query:

 

CREATE TABLE seo_to_products(

 

seo_types_id int( 11 ) NOT NULL ,

products_id int( 11 ) default NULL ,

seo_name VARCHAR( 255 ) NOT NULL ,

PRIMARY KEY ( seo_types_id, products_id )

) TYPE = MYISAM

MySQL said:

 

#1171 - All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead.

 

So basically I'm stuck on this part of the installation and would love it if someone could recommend a reference or tell me how and where to run this file.

Share this post


Link to post
Share on other sites
For installation of SEO-G (Database Changes) I'm trying to run the seo_g.sql file with phpmyadmin that is offered as a service through me hosting site. I have no idea of how to use this program and have no experience with mySQL or phpmyadmin. I attempted to check out the good tutorial listed at the readme web page and only found a chat thread about someone who had there site hacked. Could someone help me with what I should do for this part of the Seo-G installation? So far I opened up myphpadmin and opted it seemed that I had to choose a database first. I chose the file/extension in which my store was installed in, although I found all the default osCommerce produts, categories, manufacturers, and etc that I had deleted from my admin control panel. All my product additions have been through the admin screen (I assumed that they were all being saved in a mySQL database).

 

Regardless I try to run the file and I get the following error message in these results.

 

SQL-query:

 

CREATE TABLE seo_to_products(

 

seo_types_id int( 11 ) NOT NULL ,

products_id int( 11 ) default NULL ,

seo_name VARCHAR( 255 ) NOT NULL ,

PRIMARY KEY ( seo_types_id, products_id )

) TYPE = MYISAM

MySQL said:

 

#1171 - All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead.

 

So basically I'm stuck on this part of the installation and would love it if someone could recommend a reference or tell me how and where to run this file.

 

try

 

CREATE TABLE seo_to_products(

 

seo_types_id int( 11 ) NOT NULL ,

products_id int( 11 ) NOT NULL ,

seo_name VARCHAR( 255 ) NOT NULL ,

PRIMARY KEY ( seo_types_id, products_id )

) TYPE = MYISAM

Share this post


Link to post
Share on other sites
try

 

CREATE TABLE seo_to_products(

 

seo_types_id int( 11 ) NOT NULL ,

products_id int( 11 ) NOT NULL ,

seo_name VARCHAR( 255 ) NOT NULL ,

PRIMARY KEY ( seo_types_id, products_id )

) TYPE = MYISAM

 

 

So I didn't get an error message this time so I assume it worked, but since I don't really know what I'm doing I 'm not sure if what I did was what was required of me. Here were my directions:

 

Database Changes

 

Run the seo_g.sql file that came with this archive using phpmyadmin. This will create the necessary tables and configuration options. There is a good turorial how to use phpmyadmin here. The osC Admin configuration options are stored with configuration ID of 24. If this identifier is already in use you need to change the SQL file and the catalog\admin\seo_zones_config.php near the beginning $gID = .... You can identify if this ID is already in use by executing the following query in phpmyadmin

 

SELECT count(*) as total FROM configuration WHERE configuration_group_id=24

 

Then check the total returned, if it's 0 it is not allocated and you can install the default .sql file, otherwise you need to modify it as explained above.

 

So for someone like me I don't know if I did this correctly, so I moved along. The install readme is located at C:\Users\Owner\AppData\Local\Temp\Temp1_SEO Contribution for Oscommerce.zip\SEO-G\readme.htm

 

I did get down to step 8 until I had the a problem with me website loading, more errors occured in steps 9-11 so I stopped and backed up.

 

On step eight I followed these directions:

 

8. catalog\includes\functions\html_output.php

 

a) Locate the following code

 

global $request_type, $session_started, $SID;

 

Change it to:

 

//-MS- SEO-G Added

global $request_type, $session_started, $SID, $g_seo_url;

//-MS- SEO-G Added EOM

 

B) Locate the following:

 

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {

 

Right above it add:

 

//-MS- SEO-G Added

if( $connection == 'NONSSL' || SEO_PROCESS_SSL == 'true' )

$link = $g_seo_url->get_seo_url($link, $separator);

//-MS- SEO-G Added EOM

 

This produced the following error when loading my page. Maybe this is ok since the instructions are not finished, but Since I started to run into more and more errors as I continued I though I would get some opinion on this.

 

error: Fatal error: Call to a member function on a non-object in /var/www/html/catalog/includes/functions/html_output.php on line 58

 

Is this ok, then I will proceed to the next error messages from step 10.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×