You are here:  » Problem with searchExternal.php and v.15


Problem with searchExternal.php and v.15

Submitted by babrees on Mon, 2015-03-30 13:02 in

Hi David

Brand new install of v.15/01A plus wordpress. Adding a new post and using following code to call products, but it simply will not display them in the WP post.

 <?php
  $external_baseHREF = "http://mysite.co.uk/newsite/";
  $external_path = "/var/sites/mysite/public_html/newsite/";
  $_GET["q"] = "day to remember";
  require($external_path."searchExternal.php");
?>
 

I don't have a problem with other sites which are running on v.14/06A, so installed a copy of v.14 on this domain.

Using same code as above, but with paths to v14 install, it works.

Now, the strange thing is, on the test post I had code with paths to the v.14 install. I then added code with paths to the v15 version. BOTH worked!! I removed the code for the v14 install and the v15 stopped working!! duh!

Hope you can help with this!

Cheers
Jill

Submitted by support on Mon, 2015-03-30 13:43

Hello Jill,

The only difference in the database library of the 15/01A distribution is the call to set the character set of the MySQLi connection to utf-8, and it's possible that this is conflicting with the WordPress connection. If you could edit includes/database.php and look for the following code at line 18:

  mysqli_set_charset($database_link,"utf8");

...and either comment out or delete that line, that should be all it is. The reason it would appear to have worked when using on the same page as your 14/06 test distribution is that searchExternal.php only reads config.php etc. once, so it would actually have been using the 14/06A installation for both instances...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com