Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Database Auto-Optimizer

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 04-15-2007, 05:21 AM
  Jayk's Avatar 
Jayk Jayk is offline
 

eXpert
  
Join Date: Nov 2003
Location: Calgary, Alberta, Canada
Posts: 333
 

Default Re: Database Auto-Optimizer

Is there a way to modify the php script to log the output of the optimization/repair? Maybe a verbose logging part that could be added?

I know how to do such things in bash, but I'm a total noob when it comes to php.

Thanks,
Jason
__________________
X-Cart Gold 4.4.3
Blog: www.flashinthepan.ca
Reply With Quote
  #42  
Old 05-22-2007, 09:32 AM
 
Berto Berto is offline
 

Member
  
Join Date: Mar 2007
Posts: 19
 

Default Re: Database Auto-Optimizer

Quote:
Originally Posted by carpeperdiem
Has anyone used this on a 4.1 database? Anything to know about? Thanks!

Jeremy

I tried it on 4.1.7 and it seems to work flawlessly.
__________________
Russell
X-cart Version 4.1.9 [linux]
Reply With Quote
  #43  
Old 09-28-2007, 08:40 AM
  hrothbeorht's Avatar 
hrothbeorht hrothbeorht is offline
 

Senior Member
  
Join Date: May 2007
Posts: 156
 

Default Re: Database Auto-Optimizer

quick question ..

I was hoping that someone could help me with
the values or the Constants.

# Define Constants
define('ERROR_LOG', '/absolute-path-to-your-log-directory/db_optimization_errors.html');
define('DB_LINK', mysql_connect('server_address','sql_login','sql_pa ssword'));


do any of these look right?

/public_html/shop/var/log/db_optimization_errors.html

'server_address' = 'http://www.website.ca'
or
'server_address' = 'localhost'
or
'server_address' = 'www.website.ca/store'

'sql_login' = 'website_db_user_alpha'
this is the username for the db right?
in the config file it's this - $sql_user = 'website_db_user_alpha' right?

thanks!

-hroth
__________________
x-cart- 4.1.10
www.boutiquefinn.ca
Reply With Quote
  #44  
Old 01-09-2008, 02:04 AM
 
Patcheah Patcheah is offline
 

Newbie
  
Join Date: Nov 2006
Posts: 4
 

Default Re: Database Auto-Optimizer

Hi

If I understand correctly, I just need to copy the code provided and save inside my x-cart root directly.

To run this program, can I just use my web browser to run by typing www.mydomain.com/store/db_optimizer.php

I am using a shared windowshosting

Any advise is appreciated.
__________________
Patrick Cheah

-------------------
xcart gold - 4.1.3
Reply With Quote
  #45  
Old 05-29-2008, 02:06 PM
 
effour effour is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 96
 

Default Re: Database Auto-Optimizer

How do I know if this is working?

I load the page and it does nothing. Is the file configed properly? What should happen exactly?

Anyone?

# Define Constants
define('ERROR_LOG', '/var/www/vhosts/site.com/httpdocs/var/db_optimization_errors.html');
define('DB_LINK', mysql_connect('localhost','user','password'));

# Define databases to be optimized.
$db_name = array('dbname);
__________________
4.1.7
Reply With Quote
  #46  
Old 06-01-2008, 04:04 PM
 
MichelleT MichelleT is offline
 

Member
  
Join Date: Jul 2006
Posts: 10
 

Default Re: Database Auto-Optimizer

Is this like the "optimize tables" in Summary > Tools of the Admin section or something else?
__________________
XCart 4.1.10
Reply With Quote
  #47  
Old 06-01-2008, 04:57 PM
  Ene's Avatar 
Ene Ene is offline
 

X-Cart team
  
Join Date: Aug 2004
Posts: 907
 

Default Re: Database Auto-Optimizer

Quote:
Is this like the "optimize tables" in Summary > Tools of the Admin section

Yes.
__________________
Eugene Kaznacheev,
Evangelist/Product Manager at Ecwid: http://www.ecwid.com/ (since Sept 2009)

ex-Head of X-Cart Tech Support Department
ex- X-Cart Hosting Manager - X-Cart hosting
ex-X-Cart Technical Support Engineer


Note: For the official guaranteed tech support services please turn to the Customers HelpDesk.
Reply With Quote
  #48  
Old 04-22-2009, 06:25 AM
 
devonkrusich devonkrusich is offline
 

Newbie
  
Join Date: Feb 2009
Posts: 4
 

Default Re: Database Auto-Optimizer

I installed the script and cron job. Here is the message the cron sent last night. How can I fix this or is this OK?

X-Powered-By: PHP/5.2.9
Content-type: text/html

<br />
<b>Warning</b>: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <b>/home2/petsuppl/public_html/db_optimizer.php</b> on line <b>30</b><br />
<br />
<b>Warning</b>: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <b>/home2/petsuppl/public_html/db_optimizer.php</b> on line <b>30</b><br />
__________________
Version 4.1.8

CD SEO Pro
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:21 AM.

   

 
X-Cart forums © 2001-2020