Problem on live, but works perfectly on localhost

I modified mainbox_general.tpl like the following:



{* $Id: mainbox_general.tpl 8967 2010-03-02 09:04:29Z angel $ *}

{if $anchor}



{/if}



{if $title}

{$title}


{/if}

{include_php file='slider.php'}


{$content}



Practically I add only this line: {include_php file='slider.php'}

On localhost this script (a slider) is working fine but when I put it live I receive this messages:

Warning: include(slider.php) [function.include]: failed to open stream: No such file or directory in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926

Warning: include(slider.php) [function.include]: failed to open stream: No such file or directory in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926

Warning: include() [function.include]: Failed opening 'slider.php' for inclusion (include_path='/home/picturaf/public_html/lib/pear/.:/usr/lib/php:/usr/local/lib/php') in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926

You can see it live here: [url]http://www.picturafata.ro[/url]

Any ideea what cause this error?

Thanks.

Probably the file doesn’t exist or isn’t in the location.

[quote name=‘indy0077’]Probably the file doesn’t exist or isn’t in the location.[/QUOTE]



Everything I have on localhost I’ve moved to live. :sunglasses: And yes, I checked if the file is there

[quote name=‘thelight’]Everything I have on localhost I’ve moved to live. :sunglasses: And yes, I checked if the file is there[/quote]

What says the ‘line 1926’ ?



EDIT: I found it, it’s just the ‘include’ function…



I think here is the bug:


{include_php file='slider.php'}



should be:


{include file="slider.php"}

Thank you indy0077,



But is not from there. I don’t understand why is working well on localhost and live doesn’t… the same files (identical)

Hmmm…:confused:




[quote name=‘indy0077’]What says the ‘line 1926’ ?



EDIT: I found it, it’s just the ‘include’ function…



I think here is the bug:


{include_php file='slider.php'}



should be:


{include file="slider.php"}

That may be your server configuration (php). Try to contact your hosting provider, they should help you with.

I erase the line that I added in mainbox_general.tpl ([COLOR=“Red”] {include_php file=‘slider.php’}[/COLOR] )

and surprise: the error is still there:


Warning: Smarty error: file:slider.php is not readable in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1095

Warning: include() [function.include]: Filename cannot be empty in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926

Warning: include() [function.include]: Filename cannot be empty in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='/home/picturaf/public_html/lib/pear/.:/usr/lib/php:/usr/local/lib/php') in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926




and this tell me that the file mainbox_general.tpl is not read every time I made a change to it.



I tried to clear cache with:[B] [url]http://www.picturafata.ro/index.php?cc[/url][/B]

but nothing happens.



What else should I try? How to force server to read file mainbox_general.tpl again?

[quote name=‘thelight’]I erase the line that I added in mainbox_general.tpl ([COLOR=Red] {include_php file=‘slider.php’}[/COLOR] )

and surprise: the error is still there:


Warning: Smarty error: file:slider.php is not readable in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1095

Warning: include() [function.include]: Filename cannot be empty in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926

Warning: include() [function.include]: Filename cannot be empty in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='/home/picturaf/public_html/lib/pear/.:/usr/lib/php:/usr/local/lib/php') in /home/picturaf/public_html/lib/templater/Smarty.class.php on line 1926
and this tell me that the file mainbox_general.tpl is not read every time I made a change to it.



I tried to clear cache with:[B] [URL]http://www.picturafata.ro/index.php?cc[/URL][/B]

but nothing happens.



What else should I try? How to force server to read file mainbox_general.tpl again?[/quote]

There isn’t something else. The file has to be set to 644. that’s all. If you delete the added line, it’s working?

[quote name=‘indy0077’]There isn’t something else. The file has to be set to 644. that’s all. If you delete the added line, it’s working?[/QUOTE]



No, I receive the same error.

[quote name=‘thelight’]No, I receive the same error.[/quote]

Then re-upload the file 'mainbox_general.tpl ’ and the ‘Smarty.class.php’