Moving Smarty website to new server - migration

I'm moving a website to a new domain and server and I'm running into some problems. This website works with Smarty, and I've never used it before. I think I got a very basic problem, but I can't find the answer online.
I've moved all the FTP files to the new server
I've copied the database
I've edited the config file with the new database information
Now only EVERY page (even a blank test.php file with a simple echo) I get "failed to open stream" errors.
Warning: rename(/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php) [function.rename]: failed to open stream: Permission denied in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_write_file.php on line 48
Warning: rename(/tmp/wrtPBIHNP,/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php) [function.rename]: Permission denied in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_write_file.php on line 48
Warning: chmod() [function.chmod]: No such file or directory in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_write_file.php on line 50
Warning: include(/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_template.php on line 432
Warning: include() [function.include]: Failed opening '/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_template.php on line 432
It looks like a problem with premissions, but I've made EVERY file on the FTP premission 777 (to test) and this does not solve it.
There are two backslashes /public_html//skins/ which is weird.
The code is exactly the same on the "old" server, besides the config file. Only thing new is the domain name.
What am I doing wrong?

You should set for directory compiled permissions 755 or 777.
You should probably also remove all compiled and cached files (if you use cache) because it may also cause problems

Related

unable to unstage multiple files and directories from git bash and computer's command prompt

so my first attempt into web development, one best forgotten methinks in that -when creating my first html file- I was meant to load the saved file using sublime 3 and git gui. I'm unsure how but ended up loading thousands of files - seemingly entire C: Drive -and directories in one go instead of the html file only. Being a complete novice ( clearly so!) I suspect I may have erred in that it was saved on the desktop to start with and not a folder. Please advice how to unstage all these files and directories and get them off git gui and of course crucially my command prompt so I can start the entire excercise afresh . SEE BELOW how it looks. These all sits in the 'Unstaged changes' in git gui I tried git clean and now trying git--rm (attempted removing one file Jedi/ here). If these are the simplest means to remove it please provide how to script the command correctly . alternatively another simple way to remove them, all in one go
Microsoft Windows [Version 10.0.22000.1098]
(c) Microsoft Corporation. All rights reserved.
C:\Users\user>git status
warning: could not open directory 'Application Data/': Permission denied
warning: could not open directory 'Cookies/': Permission denied
warning: could not open directory 'Local Settings/': Permission denied
warning: could not open directory 'My Documents/': Permission denied
warning: could not open directory 'NetHood/': Permission denied
warning: could not open directory 'PrintHood/': Permission denied
warning: could not open directory 'Recent/': Permission denied
warning: could not open directory 'SendTo/': Permission denied
warning: could not open directory 'Start Menu/': Permission denied
warning: could not open directory 'Templates/': Permission denied
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .ipynb_checkpoints/Untitled3-checkpoint.ipynb
new file: .ipython/profile_default/history.sqlite
new file: .vscode/extensions/ritwickdey.liveserver-5.7.9/package.json
Untracked files:
(use "git add <file>..." to include in what will be committed)
...
.gitconfig
AppData/
Contacts/
Desktop/
Documents/
Downloads/
Favorites/
Jedi/
Links/
Music/
NTUSER.DAT
NTUSER.DAT{716b6697-d480-11ec-94d6-a6cb731d3b8d}.TxR.0.regtrans-ms
NTUSER.DAT{716b6697-d480-11ec-94d6-a6cb731d3b8d}.TxR.1.regtrans-ms
NTUSER.DAT{716b6697-d480-11ec-94d6-a6cb731d3b8d}.TxR.2.regtrans-ms
NTUSER.DAT{716b6697-d480-11ec-94d6-a6cb731d3b8d}.TxR.blf
NTUSER.DAT{716b6698-d480-11ec-94d6-a6cb731d3b8d}.TM.blf
NTUSER.DAT{716b6698-d480-11ec-94d6-a6cb731d3b8d}.TMContainer00000000000000000001.regtrans-ms
NTUSER.DAT{716b6698-d480-11ec-94d6-a6cb731d3b8d}.TMContainer00000000000000000002.regtrans-ms
OneDrive/
Pictures/
PycharmProjects/
Saved Games/
Searches/
Videos/
anaconda3/
coursera-test/
ntuser.dat.LOG1
ntuser.dat.LOG2
ntuser.ini
C:\Users\user>git rm --cached<file>Jedi/
The system cannot find the file specified.
C:\Users\user>git rm--cached<file>Music/...
The system cannot find the file specified.
C:\Users\user>git rm--cached<file>.ipynb_checkpoints/Untitled3-checkpoint.ipynb
The system cannot find the file specified.
I expected to load the HTML file to git hub and create my first web page, instead uploaded what seems to be my directory from c: drive and now I cannot unstage

Could not move uploaded file to destination Drupal 8

I have a trouble gatting drupal to upload files (images, configuration, I guess anything).
The error message is:
The file could not be saved because the upload did not complete.
File upload error. Could not move uploaded file.
When I go to log it says:
Upload error. Could not move uploaded file multimedia.svg to destination public://2017-03/multimedia.svg.
I already read about permissions and here they are:
sites/default/files - 770
sites/default/files/2017-03 - 770
/tmp - 1777
However I'm able to upload & install themes and modules without any ploblems at all.
So what could it be? And how do I fix this?
switch php mode from "Apache module (mod_php)" to "Fast CGI (mod_fcgid)"
core\includes\file.inc
function file_prepare_directory()
should return true
see this patch
or just temporarily put
return true;
instead of
return $writable;
in the function

Vagrant for web server with shared folders: Apache breaks file permissions if it tries to stat a file before it exists

I'm not sure if this is an issue with vagrant, virtualbox or a configuration issue inside the box itsef, however:
Using the following setup: Apache is running in the guest with its server root set to /srv/http, this is a synched folder which points to ./public_html on the host.
While most of the time it works as expected, the following steps causes an issue
1) Navigate to a file that doesn't exist localhost:8080/test2.css -- shows a 404 error as expected but correctly connects to the guest which is serving the error
2) Create test2.css with some content and place it in public_html
3) Reload localhost:8080/test2.css -- Still shows a 404 error even though the file now exists
4) To debug, run vagrant ssh and then ls /srv/http. Which shows:
ls: cannot access test2.css: No such file or directory
So it's seeing the file, sort of but it shows without any permissions:
-????????? ? ? ? ? test2.css
-rw-rw-r-- 1 vagrant 7 Oct 23 11:13 test3.css
If I then re-save the file as test3.css, a file that hasn't yet been accessed it works perfectly. E.g. on the host, save the file I had open as test3.css and then navigate to it, it works as expected!
Any ideas? On why this might be?
In short: If apache has tried to read a file that doesn't exist, creating that file will then cause it to have invalid permissions. If apache has never tried to read the file before, it can be created and work as expected.
Thanks for any help, I'm really confused by this!
This turned out to be a kernel bug on the guest. Upgrading to 4.2.4 using the same Vagrant/Virtualbox/Guest Modules solved the issue.

reputation module installation in phpbb3

Hi i am trying to install phpbb-reputation system i followed the xml file for installation but while executing install_reputation.php i am getting this error ERROR: Could not open the file ./styles/afterburnerafterburner_config.html for reading.There are many errors in the same fashin. where i gues it is not going inside afterburner/template folder where .html file exists. where should i check this?
More error samples:
Refreshing the proFormell template
ERROR: Could not open the file ./styles/proFormellcaptcha_recaptcha.html for reading.
Sounds like it's a permissions issue; if hosting on a LAMP server, just run chmod 755 * -R in the website root directory. Alternatively you could also change file permissions using an FTP client

Has anyone come across this php error before, Warning: imagejpeg()?

Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/SITENAME/public_html/files/cache/052f225905c1618003df0c5088aec7a9.jpg' for writing: Permission denied in /home/SITENAME/public_html/concrete/helpers/image.php on line 172
I emptied the cache directory and still no luck, and if I change the permissions on the cache folder then I get another error and I can't use the site at all:
Warning: require_once(Zend/Cache/Backend/File.php) [function.require-once]: failed to open stream: No such file or directory in /home/MYACCOUNT/public_html/concrete/libraries/3rdparty/Zend/Cache.php on line 133
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Cache/Backend/File.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/owen/php') in /home/MYACCOUNT/public_html/concrete/libraries/3rdparty/Zend/Cache.php on line 133
I don't get it? I've never had this problem before.
Sounds like a permissions problem to me, but we can't tell from this end.
If you can FTP (or CD) into that /home/SITENAME/public_html/files/
and see if 'files' is owned by, and has the same permissions as public_html
Then see what permissions they NEED to have for your hosting setup.
Check that directory exists.
Check if web server daemon, most of the time - www-data, has write permissions to that particular directory.
For future reference the problem was the PHP handler. It has been changed to CGI mode (as opposed to DSO) and they turned suEXEC ‘off’ - might be useful for someone down the line.