View previous topic :: View next topic |
Author |
Message |
alinux Smarty n00b
Joined: 24 Aug 2011 Posts: 4
|
Posted: Wed Aug 24, 2011 9:26 am Post subject: Moving Smarty site from one server to another |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Aug 24, 2011 1:51 pm Post subject: |
|
|
* 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 |
|
alinux Smarty n00b
Joined: 24 Aug 2011 Posts: 4
|
Posted: Fri Aug 26, 2011 1:10 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Aug 26, 2011 1:59 pm Post subject: |
|
|
I think your server has a missing rewriteRule mapping .html URLs to .php. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Aug 26, 2011 1:59 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Aug 26, 2011 2:30 pm Post subject: |
|
|
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 |
|
alinux Smarty n00b
Joined: 24 Aug 2011 Posts: 4
|
Posted: Fri Aug 26, 2011 5:17 pm Post subject: |
|
|
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 |
|
alinux Smarty n00b
Joined: 24 Aug 2011 Posts: 4
|
Posted: Fri Aug 26, 2011 5:17 pm Post subject: |
|
|
The way I understood it the html pages should be generated by smarty ? I might be totally wrong about this. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Aug 26, 2011 6:10 pm Post subject: |
|
|
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 |
|
bszike Smarty n00b
Joined: 25 Oct 2011 Posts: 3
|
Posted: Tue Oct 25, 2011 8:02 am Post subject: Please help me |
|
|
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 |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Tue Oct 25, 2011 8:56 am Post subject: |
|
|
Try to figure out what php error is happening when your design looks malformed. _________________ Twitter |
|
Back to top |
|
bszike Smarty n00b
Joined: 25 Oct 2011 Posts: 3
|
Posted: Tue Oct 25, 2011 9:30 am Post subject: |
|
|
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 |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Tue Oct 25, 2011 9:31 am Post subject: |
|
|
well… what's the javascript error say? _________________ Twitter |
|
Back to top |
|
bszike Smarty n00b
Joined: 25 Oct 2011 Posts: 3
|
Posted: Tue Oct 25, 2011 9:40 am Post subject: |
|
|
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 |
|
|