Page 1 of 1

Xampp with PHP 5.6.28 how to config to enable includes files

PostPosted: 02. March 2017 19:47
by mwasser
Hi,
After os change from MAMP (Mac) to Xampp (Windows), and trying run site locally, all the includes files won't work.
i try to set the php.ini file allow_url_include=On but the prob persist.

Any Idea ?
Thanks.

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 02. March 2017 20:43
by Altrea
Hi,

mwasser wrote:After os change from MAMP (Mac) to Xampp (Windows), and trying run site locally, all the includes files won't work.
i try to set the php.ini file allow_url_include=On but the prob persist.

This describtion is not detailed enough. Start debugging your issue further and describe it as detailed as possible.

best wishes,
Altrea

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 02. March 2017 20:58
by mwasser
Debugging website everything work great but don't add the includes files, inspecting code with web browser the include appear so :
<!--? FUNCTION($VALUE="PARAM1","PARAM2"); ?-->

On Mamp server the include file was loaded and instead of that line i've the function code.

Thank.

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 02. March 2017 21:32
by Altrea
mwasser wrote:<!--? FUNCTION($VALUE="PARAM1","PARAM2"); ?-->

Never seen something like this.
Which language should this be?
Looks only like an HTML comment for me.

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 02. March 2017 21:48
by mwasser
yes, i know, that's the reason i'm asking about the include files, maybe i miss some param or the config was wrong.
On the mac, the same project with the same file work great.

so i've an index.php page and then in an include dir some others php files that can be added.
<? include "../includes/file2include.php"; ?>



file2include.php file :

<?php
function FunName($Var1,$Var2,$Var3) { ?>
<div>The Html to Include</div>
<? } ?>

But after running showing source code it appear :

<!--? FunName($Var1="Var1Value","Var2Value", "Var3Value"); ? -->

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 02. March 2017 22:44
by JJ_Tagy
Maybe your short_open_tags are turned off in your Windows installation.

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 02. March 2017 22:58
by Nobbie
Altrea wrote:
mwasser wrote:<!--? FUNCTION($VALUE="PARAM1","PARAM2"); ?-->

Never seen something like this.
Which language should this be?
Looks only like an HTML comment for me.


Thats SSI syntax.

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 02. March 2017 23:37
by Altrea
Are you sure?
I know SSI which starts with <!--# but not with <!--?
But i have never used SSI.

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 03. March 2017 07:18
by mwasser
Morning,
Yes i'am sure, that's the reason i'am asking you about this prob. I dont understand why that site was working perfectly on a Mac with a Mamp server, and not on windows with a Xampp Server (Togheter Locally), The syntax was the same here and there, but on windows wont work.

Great day.

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 03. March 2017 08:16
by mwasser
Solved, installing Mamp.
Thanku

Re: Xampp with PHP 5.6.28 how to config to enable includes f

PostPosted: 03. March 2017 11:40
by Nobbie
Altrea wrote:Are you sure?


More or less, i have seen that somewhere else, there was a Syntax change in SSI a couple of years ago in order to apply user functions or similar (SSI did know only some basic hardcoded functions). And therefore they extended the Syntax of SSI Tags. I am not 100% sure about that, but not far away, i have seen that also before. I am pretty sure that it works, if you enable SSI in httpd.conf (there are different options to do so, obviously MAMP comes with a preconfigured SSI, whereas Xampp does not).