News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Wordpress SSI.php reference issue

Started by Snaphaan, August 22, 2012, 06:24:55 AM

Previous topic - Next topic

Snaphaan

I'm trying to incorporate some of the latest information (like posts etc.) into a widget area in Wordpress. To be able to execute the necessary PHP code in the widget areas themselves I use a plug-in called php-exec hxxp:bluesome.net/post/2005/08/18/50/ [nonactive] for Wordpress.

This is my code in the text widget:
<?php
   require("/forum/SSI.php");

   ssi_topTopicsViews();
   ssi_recentTopics();
?>


Problem is, as soon as I try to use the require section almost my whole footer area disappears. Something like this:

Normal display


Messed up display


I tried running some other small and simple php code (I'm not very proficient - just a beginner) and everything works but as soon as I try to use that require section everything bombs out. My site is hxxp:vaandel.co.za [nonactive] and the forum is at hxxp:vaandel.co.za/Forum [nonactive]. SSI.php is of course in the root of the SMF directory - hxxp:vaandel.co.za/Forum/SSI.php [nonactive]. I tried these direct links as well but nothing.

My setup worked fine on the off-line XAMPP installation.

Any ideas?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Snaphaan

I found out what was the problem.

I went back and loaded up ssi_examples.php. Right at the top - first thing it gave me a code section which came out to...

<?php require("/usr/www/users/vaandel/Forum/SSI.php"); ?>

And wallah! Awesome, and thanks for the quick reply Kindred.  ;)

Kindred

yeah... the absolute path works even better...
as an explanation:
What I posted was the relative path - what you posted - since it started with a "/" meant that the system THOUGHT you were giving it an absolute path and thus was unable to include the file that you required - causing a catastrophic failure which WordPress attempted to hide/bypass.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: