Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Moving Smarty site from one server to another

 
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
alinux
Smarty n00b


Joined: 24 Aug 2011
Posts: 4

PostPosted: Wed Aug 24, 2011 9:26 am    Post subject: Moving Smarty site from one server to another Reply with quote

Hi
I am moving a smarty site to a new server however on the new server all I get is 404 errors for the index.html files that should be generated by smarty as I understand it.

The site is access by index.php but all template files are in .html I tried forcing a template regeneration but that did not help either.

What are the requisites for moving a site, PHP is the same and as far as I get Smarty all it's files are under the demo folder.

Any hints please.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7237
Location: Lincoln Nebraska, USA

PostPosted: Wed Aug 24, 2011 1:51 pm    Post subject: Reply with quote

* remove all compiled/cache files
* check permissions on templates_c and cache folders
* run $smarty->testInstall(), be sure all tests pass
* check your php error log for any errors
Back to top
View user's profile Send private message Visit poster's website
alinux
Smarty n00b


Joined: 24 Aug 2011
Posts: 4

PostPosted: Fri Aug 26, 2011 1:10 pm    Post subject: Reply with quote

Hi

Thanks for your reply, can you please elaborate on the following :


* remove all compiled/cache files
Removed contents of cache template_c

* check permissions on templates_c and cache folders
Made 777 for cache and template_c

* run $smarty->testInstall(), be sure all tests pass

Smarty Installation test...
Testing template directory...
./templates/ is OK.
Testing compile directory...
./templates_c/ is OK.
Testing plugins directory...
/var/www/html/demo/includes/plugins/ is OK.
Testing cache directory...
./cache/ is OK.
Testing configs directory...
./configs/ is OK.
Tests complete.


I still get
The requested URL /demo/index.html was not found on this server.

* check your php error log for any errors

[Fri Aug 26 09:05:05 2011] [error] [client 78.101.242.243] File does not exist: /var/www/html/demo/index.html

On the server where the site is working index.html is not working as well.

Please advice.

I tried


$smarty->force_compile = true;
$smarty->clear_compiled_tpl();


As well
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4507
Location: Hamburg / Germany

PostPosted: Fri Aug 26, 2011 1:59 pm    Post subject: Reply with quote

I think your server has a missing rewriteRule mapping .html URLs to .php.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7237
Location: Lincoln Nebraska, USA

PostPosted: Fri Aug 26, 2011 1:59 pm    Post subject: Reply with quote

Does /var/www/html/demo/index.html exist?

What does the PHP look like that loads the page? (why is index.html trying to be loaded?)
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4507
Location: Hamburg / Germany

PostPosted: Fri Aug 26, 2011 2:30 pm    Post subject: Reply with quote

He does use /demo/index.html as URL which must be mapped to
/var/www/html/demo/index.php for the Smarty demo page.
Back to top
View user's profile Send private message
alinux
Smarty n00b


Joined: 24 Aug 2011
Posts: 4

PostPosted: Fri Aug 26, 2011 5:17 pm    Post subject: Reply with quote

Hi
.htaccess is

ewriteEngine on
Options FollowSymLinks
RewriteBase /

RewriteRule ^videoplayer.html$ videoplayer.php?%{QUERY_STRING} [L]

RewriteRule ^([0-9]+)\/$ index.php?menue=index&sponsorid=$1 [L]
RewriteRule ^([0-9]+)$ index.php?menue=index&sponsorid=$1 [L]

# Normale Links
RewriteRule ^(.*)\/(.*).html$ $1/index.php?menue=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*).html$ index.php?menue=$1&%{QUERY_STRING} [L]
Back to top
View user's profile Send private message
alinux
Smarty n00b


Joined: 24 Aug 2011
Posts: 4

PostPosted: Fri Aug 26, 2011 5:17 pm    Post subject: Reply with quote

The way I understood it the html pages should be generated by smarty ? I might be totally wrong about this.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7237
Location: Lincoln Nebraska, USA

PostPosted: Fri Aug 26, 2011 6:10 pm    Post subject: Reply with quote

Take a look at your apache error log. You can also make the rewrite engine dump out debug info, see the apache documentation.
Back to top
View user's profile Send private message Visit poster's website
bszike
Smarty n00b


Joined: 25 Oct 2011
Posts: 3

PostPosted: Tue Oct 25, 2011 8:02 am    Post subject: Please help me Reply with quote

Hi. I copied an Smarty project to an other server. I set the permissions for folders (template_c, cache), and paths. The site is working fine, but sometimes the design is become deformed. After refresh everiting fine again.

Please help me
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 698
Location: Germany, border to Switzerland

PostPosted: Tue Oct 25, 2011 8:56 am    Post subject: Reply with quote

Try to figure out what php error is happening when your design looks malformed.
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
bszike
Smarty n00b


Joined: 25 Oct 2011
Posts: 3

PostPosted: Tue Oct 25, 2011 9:30 am    Post subject: Reply with quote

In the log files do not have any php error unfortunately. Firebug indicates a javascript error but if I refresh the page, the error disappears. Can be problems with the compilled files?

Best regards,
Szilard Bodor
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 698
Location: Germany, border to Switzerland

PostPosted: Tue Oct 25, 2011 9:31 am    Post subject: Reply with quote

well… what's the javascript error say?
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
bszike
Smarty n00b


Joined: 25 Oct 2011
Posts: 3

PostPosted: Tue Oct 25, 2011 9:40 am    Post subject: Reply with quote

Always different. Sometimes found errors in the yui library`s js files, sometimes in other js files, which are incorporated into the tpl files. The error messages such as: YAHOO undefined variable, unexpected token etc.
I can`t understand.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP