Why does my Joomla site subdomain copy the main site? - joomla

I'm not a pro with server management, I mainly do web design on Joomla.
Our IT Manager recently left and I was given access to everything since no-one else in our company knows web.
We have a main site. In this example I'll name the site as cookies.com for example sake.
www.cookies.com is the main site. The domain is cookies.com only. We have 3 server accounts for this.
123reg - to buy the domain and renew
heartinterner - to host the website
1and1 - this is where it is redirected (or something), well all the files are found in virtual servers here.
When I go to the virtual servers, there are a couple of directories, and eventually I can find a folder called "var" which leads me to another directory. I go to "www" and I find so many site folders there, including cookies.com and dev.cookies.com and more
My objective was to backup and restore cookies.com to dev.cookies.com so that I can work on it and replace the original cookies.com later on. I use Akeeba Backup for this.
The issue is, as soon as I started making changes to dev.cookies.com, cookies.com also made those changes.
I'm very confused- what's going on here? Is there something written in the files that direct the database or whatever to the same place, for which reason the changes occur together?
Sorry this is very confusing. Please suggest if you can what I can do. I know this might not be much information.
Thank you!

You probably have used the same database for both. Create another database and user for dev.cookies.com and use that database and user to create the new dev site. Check in the configuration.php file that these values should be different.
public $db = 'joomla';
public $password = 'db_password';
public $user = 'root';
These are all database values. Also check these settings
public $log_path = 'C:/xampp/htdocs/joomla/administrator/logs';
public $tmp_path = 'C:/xampp/htdocs/joomla/tmp';

Related

User and Session sharing among multiple Laravel 8 sites under the same domain

Before anyone tells me to Google it - I did and followed the instructions on this link:
https://medium.com/#zsolt.gyure96/how-to-share-sessions-between-two-laravel-applications-4b9d061fa599
Below is my setup: I have a group of sites that are all under the same domain hosted under different directories. I use virtual host aliasing to point them. For example, alias blog points to example.com/blog. Now, I would like to share the users and sessions among my apps. I followed the instructions in the above article and created a common_database that manages all the user data and sessions. My apps can read the sessions table. I also have the same session set up as my domain.
By adding
protected $connection = 'common_database';
in the following files I can login and register from example.com/blog/login or register routes.
vendor/laravel/ui/auth-backend/RegistersUsers.php
vendor/laravel/ui/auth-backend/AuthenticatesUsers.php Instead added
The only problem I have now is that there is no session sharing. For example if i login example.com/blog/login then I cannot use the same session for example.com or example.com/news. I have to re-login. What am I missing here?
SESSION_DRIVER was not set to the database in the main site's .env.
I don't know if it will work for you but what I did was instead of using SESSSION_DRIVER=database I used SESSSION_DRIVER=cookie on .env file make sure your APP_KEY is the same for both projects.

prevent the access of folders that are not under public in laravel 4.2

hi guys im pretty new in laravel 4.2 i have a project that stores file in the server and what i did based from the opinion of other people, when the user saves a file it goes to app/storage/uploads my problem is when i know the url to the file, it still have access to the file. for example it is a pdf file, it opens in the browser or if it is doc, xls, xlsx etc it triggers a download what i'm tying to do is when the user tries to access that url, it would go to a certain view informing them that the folder is restricted so far i have this on my routes
Route::get(storage_path().'uploads/{all?}' , 'sample#restrict');
then in my controller
public function restrict()
{
dd("WHOOOPS!"); //for trial purposes
}
any ideas what im doing wrong? thanks in advance
With normal configuration web server has access only to a public directory.
If you set public directory as root for a virtual host, noone will be able to access app or storage directories which are outside public.

How to name api routing on a webhost sub folder

I have always thought the api controllers where not found by physical paths. The reason I ask is I have a website example.com I created a folder example.com/testing and uploaded my project to there. When I ran it I got errors saying that none of the apiControllers could be found. So I changed /api/apiCustomers to /testing/api/apiCustomers. It then worked, well not the actual posting of any new records. It did locate and retrieve all the records from the database though. But it doesn't seem like that is what I would actually need to do? I have a domain with WinHost and the default publish folder is example.com/myApp
AM I looking at this the wrong way?
To handle request where you do not know the root path, you can use (as in ASP.NET) the ~-character like this:
~/api/apiCustomers
~ will then be replaced by the root (i.e. /api/apiCustomers for prod and /testing/api/apiCustomers for your test environment)

windows folder for temporary files created by my application

I'm trying to decide where the 'correct folder' to store documents and logs created by my windows form application. The application is used in education and has all paths held in the SQL server. Some (like logs file paths are shared) are accessible on network but specifically for temporary documents where should I default the storage to? I've recently tried the Users/username/AppData/ folder but I seem to be getting differing results after installation; so far I have put this down to people user credentials as often in schools they can do whatever they want (yes I know shocking indeed).
If anyone can point me in the direction of an MSDn article or knows better please reply - Thanks.
** Edit 10/09/2013 - Sorry all I should be further explicit. I'm looking for the folder / structure Microsoft has designed for this sort off activity. My application already provides users with the ability to create thier own working directories (there are several required) but I'm keen to use the 'correct' locations for this sort of activity... I thought the right place would be c:/Users/USERNAME/Appdata/APPLICATION FOLDER/ but as I mention I've come across a few access rights issues when uses install the application.... hope that explains better - thanks
To create temporary directory you can use something like this:
public string GetTempDirectory() {
string path = Path.GetRandomFileName();
Path.Combine(Path.GetTempPath(), path);
Directory.CreateDirectory(path);
return path;
}
Path class info
Directory class info

Move shop to a other and new domain

i’m stuck.
I want to move a magento shop to a new domein.
Example: From testdomain.com/shop to newdomain.com/shop
I worked like this so the old shop on newdomain.com was able to keep running while building a new store on a testplace.
How can i move the shop to the newdomain.com ??
I made a sql backup from the testshop; this is a file of 15MB.
In the file there are references to testdomain.com. Offcource; i need to replace them by newdomain.com.
This replacing takes along time and mostly end ups in crashing file.
Is there another way to move a shop to a new domain ??
Thanks,
Dave
http://p1.b7d.com/magento/meghzal/
dont play with your sql file just import it as it is. if you only have 1 store view you only have to change 2 values to make you shop running.
Copy all file to you new webserver
Make the media and the var folder writeable by the webserver
Edit 'app/etc/local.xml' normally you only have to edit the database connection
With you favorite mysql tool edit the values under these paths: web/unsecure/base_url and web/secure/base_url set them to your new domain like http://newdomain.com/. if you have an ssl certificate use https for the secured one if not use normal http.
Now very important clear the cache. normally the cache is under var/cache but in case this one is not writable magento switches to the tmp folder of you server. So check you tmp folder for something like /tmp/magento and remove it
If you need to COPY installation of Magento to another server use the manual by Fantus here. Beware of different php.ini configuration, and OS (from Win to Unix set correct the rights by chmod)
If you have the same installation and ONLY CHANGING ENTRANCE DOMAIN to the same installation of Magento:
configure your domain A record to IP adress of your server
configure a vitual host of your ewb server (apache or etc) to reverse domain to magento folder
change configuration of new domain in magento/app/local.xml
Clear the magento/var/ folder (not neesesary)

Resources