I've tried embedding SSI.php functions on other websites, but it doesn't work, all that shows up is a blank white screen. Using my test-forum's SSI.php, however, I am able to embed any SSI.php function, so it's not a matter of knowing how to code it, it's a matter of my SSI.php is not working properly.
I tried using a new SSI.php function by uploading it to my server, but it didn't work.
What could the problem be? My forum is heavily modded, so what other files could effect the SSI.php?
this other site of yours, is in the same server as your SMF installation?
Lainaus käyttäjältä: Miss All Sunday - toukokuu 22, 2011, 06:27:25 IP
this other site of yours, is in the same server as your SMF installation?
Yeah, exact same server, and, the same folder as my actual forum too, so it's not a server issue.
Make sure to include your SSI.php with the full path
/path/to/my/SMF/SSI.php
you can see your full path if you go to your_forum/SSI_examples.php logged in as an administrator.
Since its obviously a production server make sure that errors are displayed by adding the following block of lines at the very top of the page where you are including SSI.php.
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
?>
White screens in PHP usually mean that something went wrong but your PHP configuration is set not to display errors.
Is it supposed to display the error on the white screen, because if so, it didn't :(
Could we see the code you've been using to embed SSI functionality?
Sure, here it is I but once again, I want to mention that the code is embedded Correctly because the SSI location of my test forum works...
<?php require("/home/biologyf/public_html/SSI.php"); ?>
<?php template_header(); ?>
Lainaus käyttäjältä: shuban - toukokuu 23, 2011, 11:38:22 AP
Sure, here it is I but once again, I want to mention that the code is embedded Correctly because the SSI location of my test forum works...
<?php require("/home/biologyf/public_html/SSI.php"); ?>
<?php template_header(); ?>
Well everything is fine but if that's all your script contains then its no wonder you don't get anything displayed :)
You have included the
SSI.php as its supposed to be done however in order to actually display something you have to tell SMF what you want to see displayed.
Take a look here -
http://docs.simplemachines.org/ssi_examples.phpAs you can see in order to display something you need to specify a function which will fetch the data you want to display. Lets say something like this.
<?php
require("/home/biologyf/public_html/SSI.php");
template_header();
ssi_recentTopics();
?>
With all do respect holodoc, the following code <?php template_header(); ?> should display the template header. It worked when I used the other SSI.php file from my other forum, it displayed it perfectly :-\
Lainaus käyttäjältä: shuban - toukokuu 23, 2011, 07:21:55 IP
With all do respect holodoc, the following code <?php template_header(); ?> should display the template header. It worked when I used the other SSI.php file from my other forum, it displayed it perfectly :-\
First of all you don't need the
template_header() function if you are embedding the code as part of a standalone page because its already part of
SSI.php.
Second, if your script works on one server yet it doesn't on another there has to be something wrong with the server itself.
Try the following script completely independent anywhere on your server.
<?php
ini_set('display_errors', true);
var_dump(ini_get('display_errors'));
?>It should display if your request to display the errors was actually accepted.
holodoc, I don't think you read the previous posts :-\
Both the real website and the test website are on the same server and the code <?php template_header(); ?>
It is a valid stand along SSI.php function that produces the header of the forum when it's called out.
The code:
<?php
ini_set('display_errors', true);
var_dump(ini_get('display_errors'));
?>
Doesn't give me anything.
Lainaus käyttäjältä: shuban - toukokuu 23, 2011, 08:00:41 IP
holodoc, I don't think you read the previous posts :-\
Both the real website and the test website are on the same server and the code <?php template_header(); ?>
It is a valid stand along SSI.php function that produces the header of the forum when it's called out.
The code:
<?php
ini_set('display_errors', true);
var_dump(ini_get('display_errors'));
?>
Doesn't give me anything.
I read your posts thoroughly and once again
template_header() is not your problem however the inability to display errors which are obviously happening is. You should contact your hosting provider and ask for help because if you are unable to see the errors even when you request them its up to them to resolve the matter.
There are no errors in the error log and my host allows me to view errors. It's not the issue, I just want to know why my SSI function isn't working and what files are associated with it so that I can investigate further...
Lainaus käyttäjältä: shuban - toukokuu 23, 2011, 09:34:03 IP
There are no errors in the error log and my host allows me to view errors. It's not the issue, I just want to know why my SSI function isn't working and what files are associated with it so that I can investigate further...
There has to be something wrong if you can't see the result of such a simple script like the one I gave you in my previous post not to mention the fact that most production servers have their display_error setting set to Off.
Do a
phpinfo and check the value for
display_errors. I bet my money both
Local and
Master value for
display_errors are set to
off.
Using SSI.php is a breeze and basically only an error which is suppressed by PHP configuration can prevent it from not displaying its results.
Thanks for your help holodoc. I decided to create a new forum of the same version, change its index.template to resemble my real forums' and use its SSI.php instead.
Take a look:
Forum: http://biology-forums.com/
Wiki: http://biology-forums.com/definitions/index.php/Main_Page
On the same note, is there a way of calling out the template_header of a different theme? If so, how is it done?
Lainaus käyttäjältä: holodoc - toukokuu 23, 2011, 10:06:17 IP
Lainaus käyttäjältä: shuban - toukokuu 23, 2011, 09:34:03 IP
There are no errors in the error log and my host allows me to view errors. It's not the issue, I just want to know why my SSI function isn't working and what files are associated with it so that I can investigate further...
There has to be something wrong if you can't see the result of such a simple script like the one I gave you in my previous post not to mention the fact that most production servers have their display_error setting set to Off.
Do a phpinfo and check the value for display_errors. I bet my money both Local and Master value for display_errors are set to off.
Using SSI.php is a breeze and basically only an error which is suppressed by PHP configuration can prevent it from not displaying its results.
By the way, both are on.
Hi shuban - Any updates on this? Do you still need help with this?
Lainaus käyttäjältä: Aleksi "Lex" Kilpinen - kesäkuu 14, 2011, 06:36:04 AP
Hi shuban - Any updates on this? Do you still need help with this?
I created another website with the same smf edition. Then I changed it's settings to my real website's SMF settings (database change), then I created a theme that way the same as my main website and I've tricked the system successfully lol
So you found a way to do it, that's great! :)