Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
Themes
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


  FAQFAQ    SearchSearch  RegisterRegister   Log inLog in 
improved Wordpress authentication performance

 
Post new topic   Reply to topic     Forum Index -> Web site integration
View previous topic :: View next topic  

Does this work for your Wordpress integration?
yes
0%
 0%  [ 0 ]
no
0%
 0%  [ 0 ]
Total Votes : 0

Author Message
kevinB



Joined: 20 Jan 2007
Posts: 5

PostPosted: Wed Jan 24, 2007 7:18 am    Post subject: improved Wordpress authentication performance Reply with quote

When I went to select a background color for a new calendar category and some warning messages told me that headers had already been sent by one of my wordpress plugins, I knew something was wrong with the implementation of this Wordpress authentication.

The module needs Wordpress database config info, and is executing wp-config.php to get it Shocked. That works, but also forces A LOT of needless Wordpress config calls (including initializing every Wordpress plugin) with every single Thyme page load. Besides the potential header conflict I discovered, this is a huge performance hit. There was already a manual-entry line for wordpress path, why not just manually paste wordpress DB info instead?

For cleaner authentication, the module auth.php should be changed as follows:
Code:
//REMOVE the following line (line 12)
$wp_opts['path'] = '/usr/local/apache/htdocs/wordpress';

//REMOVE the following line (line 52)
require($wp_opts['path']."/wp-config.php");

//ADD the following 5 statements
# Wordpress database config
# (copy from Wordpress wp-config.php)
########################################
// ** MySQL settings ** //
define('DB_NAME', '');    // The name of the database
define('DB_USER', '');     // Your MySQL username
define('DB_PASSWORD', ''); // ...and password
define('DB_HOST', 'localhost');     

$table_prefix  = 'wp_';   


That's it! Sooooo much better. Now I know that Thyme really does fly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Web site integration All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.