Transfer Joomla website to another server

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
retzel21
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Oct 23, 2017 4:15 am

Transfer Joomla website to another server

Postby retzel21 » Mon Oct 23, 2017 4:23 am

Hi,

I recently transfer my Joomla website to another server by using the procedure below

1. install wampserver
2. copy the website folder (located in C:\wamp\www\websitename) to the same path on the new server
3. restore mysql db from old to new server

After the procedure all are working fine except for the added script I used to secure the php page (script below)

$mainframe =& JFactory::getApplication('site');

$user =& JFactory::getUser();

$username = $user->username;

$id = $user->get('id');

IF (!$username){die('What?');}

whenever I access the pages the "What?" message always appears, though when I access the administrator page all users and access are already there.

Appreciate your help regarding this thanks

User avatar
toivo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8860
Joined: Thu Feb 15, 2007 5:48 am
Location: Nottingham, UK
Contact:

Re: Transfer Joomla website to another server

Postby toivo » Mon Oct 23, 2017 5:36 am

Where did you put your script or did you modify one of the core files?

Modifying the core is not recommended and unnecessary.
Toivo Talikka, Global Moderator
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100

retzel21
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Oct 23, 2017 4:15 am

Re: Transfer Joomla website to another server

Postby retzel21 » Mon Oct 23, 2017 5:46 am

Hi,

I put my scripts on the same location on the new server C:\wamp\www that is also the same location for the old server. I did not modify any core files also

User avatar
toivo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8860
Joined: Thu Feb 15, 2007 5:48 am
Location: Nottingham, UK
Contact:

Re: Transfer Joomla website to another server

Postby toivo » Mon Oct 23, 2017 6:05 am

Your script does not load the Joomla framework, therefore it has no user object to check, and how would the visitor to the website get to access it?

If you want to restrict your site to registered users only, you can do that without any extra scripts. Make sure that the viewing access level of the existing content is 'Registered' or above. In Global Configuration - Site - Site Settings, change Default Access Level to 'Registered', which makes sure that new content can be accessed only by users who have logged in.
Toivo Talikka, Global Moderator
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100

retzel21
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Oct 23, 2017 4:15 am

Re: Transfer Joomla website to another server

Postby retzel21 » Mon Oct 23, 2017 6:18 am

Ok thanks but can I ask how the framework was affected by the transfer? Is copy and pasting the whole www folder conflicts with the framework? there's a lot of pages using this script so what would be the best option to make the framework work again?

regarding the access after I restored the mysql db all logins are still working I can even see all the users in the user management tab of the administrator it is just that the script denied the users of access on the pages where this script is involve but all other pages not using it are accessible

User avatar
toivo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8860
Joined: Thu Feb 15, 2007 5:48 am
Location: Nottingham, UK
Contact:

Re: Transfer Joomla website to another server

Postby toivo » Mon Oct 23, 2017 6:32 am

Usually it is best to transfer sites using Akeeba Backup and Kickstart because individual files can get corrupted or simply go missing during a file transfer. Otherwise the Joomla framework would remain the same at the new site.

However. it is not clear at all why and how you implemented the script. You said "on the pages where this script is involve(d)" but you have not given an example of such a page.
Toivo Talikka, Global Moderator
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100

retzel21
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Oct 23, 2017 4:15 am

Re: Transfer Joomla website to another server

Postby retzel21 » Mon Oct 23, 2017 6:43 am

Hi sorry for not being clear....

there are multiple articles in the website some using the problem script I mention some are not. For those articles that does not use the problem script users can access and use it with no problem but those articles that embedded with the script all I can see is the word "What?" maybe because I didn't install joomla the correct way and only by copying and pasting the folders.

If I install Joomla and backup transfer using Akeeba are the users already included in the transfer?

User avatar
toivo
Joomla! Exemplar
Joomla! Exemplar
Posts: 8860
Joined: Thu Feb 15, 2007 5:48 am
Location: Nottingham, UK
Contact:

Re: Transfer Joomla website to another server

Postby toivo » Mon Oct 23, 2017 7:06 am

If you copied all the folders and restored that database, the site should work as before, assuming that the version of PHP is the same.

Embedding PHP code into articles requires a plugin to evaluate and run the code. If your site runs Joomla 1.5, which had its End Of Life (EOL) in support terms five years ago, the plugin can be causing the issue, especially if your new server runs a recent version of PHP.

Joomla provides a straight forward ACL system to protect the content and allow granular access to different user groups, which may not have been the case in the days of Joomla 1.5. You may find that there is a simpler way to achieve what you want if you update your site to a supported version of Joomla.
Toivo Talikka, Global Moderator
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100

retzel21
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Oct 23, 2017 4:15 am

Re: Transfer Joomla website to another server

Postby retzel21 » Mon Oct 23, 2017 8:31 am

toivo,

Thanks you very much for the support I guess I must need to update the joomla version itself


Return to “Administration 1.5”

Who is online

Users browsing this forum: No registered users and 6 guests