Integrated WordPress missing output on live server

BangingHead

I recently encountered a rather frustrating issue with WordPress integration within WishForThis. Everything worked as expected with my test version but when uploaded to the live server, most of the WordPress blog was missing, including Author, Categories, Tags etc..

After some investigation I discovered the reason was due to WishForThis and WordPress conflicting over MySQL database connections. Basically, WordPress opened a connection, the WishForThis database connection was opened, then WordPress tries to output data from its database which had been overridden.

The solution?

mysql_connect( $server, $user, $pass, $new_link );

The 4th parameter allows a second MySQL link to be made as opposed to overwriting the first. This means that my two databases can now be accessed as expected and all is now good.

The reason I gather it worked on my localhost is SQL Safe Mode is active, which ignores the 4th parameter.

Posted in Web, WishForThis | Tagged , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

> Talk to me!

Twitter profile for Richard Turnbullwitter:
  • Attempting to load Twitter feed..
Facebook profile for Richard Turnbull LinkedIn profile for Richard Turnbull

> Tools

Share |

> Advert