Gazley Posted July 13, 2013 Share Posted July 13, 2013 (edited) Hi there, I'm just in the middle of installing a PW site on a live server. I pointed the browser at the domain before I had called the install.php script. An error message occurred that I failed to record However, I pointed the browser at the site specifying the install.php script but I get the following message in the browser: "This installer has already run. Please delete it." It most definitely hasn't presented the installation options or anything like that. My question is whether and how I can re-run the install.php script? I have since renamed htaccess.txt to .htaccess If anyone can point me in the right direction, I'd be very grateful indeed! Cheers --Gary Edited July 13, 2013 by Gazley Link to comment Share on other sites More sharing options...
diogo Posted July 13, 2013 Share Posted July 13, 2013 Deleted Link to comment Share on other sites More sharing options...
Gazley Posted July 13, 2013 Author Share Posted July 13, 2013 Thanks diogo! Link to comment Share on other sites More sharing options...
diogo Posted July 13, 2013 Share Posted July 13, 2013 You don't have to point the browser to the installer. Look, this is the line in index.php that decides if the installer should be run: if(!$config->dbName && is_file("./install.php") && strtolower($_SERVER['REQUEST_URI']) == strtolower($rootURL)) { require("./install.php"); exit(0); } So, if there isn't a $config->dbName property yet, and the install.php file is there. You will get to the installer. So, that error message doesn't have anything to do with you calling the index instead of the installer. Can you confirm in your config.php file if you have a $config->dbName directive? Edit: anyway, you can always just replace the content of the config.php file buy the original content and delete the db table and create another one. Link to comment Share on other sites More sharing options...
Gazley Posted July 13, 2013 Author Share Posted July 13, 2013 Hi diogo Thanks for replying The $config->dbName directive is in the file. However, this will be from my localhost that I pushed to GitHub and then cloned into my Root folder on the live server. So, the DB isn't installed in MySQL even though it is specified in the config file. Any suggestions? Thanks --Gary Link to comment Share on other sites More sharing options...
diogo Posted July 13, 2013 Share Posted July 13, 2013 hm, I'm not sure what you are trying to do. But the error message comes from this line in the installer: if(is_file("./site/assets/installed.php")) die("This installer has already run. Please delete it."); ...so, I guess you would have to remove that file from the assets folder. Link to comment Share on other sites More sharing options...
Gazley Posted July 13, 2013 Author Share Posted July 13, 2013 Hi diogo, Boy I'm confused now. I deleted the installed file and copied a new version of config.php. This then allowed me to go through the install procedure. Happy days, it went through fine. I tried to load my index page but immediately, PW logged an error: Error: Exception: Unable to install module 'TextformatterVideoEmbed': Table 'textformatter_video_embed' already exists I don't know why PW is trying to install this module because it is already installed? When I load the site in admin mode, I see a new "standard" page tree configuration of PW and not the page tree configuration that I restored into the DB. However, if I check the DB, I see my restored DB on the live server. In config.php on the live server, it is indeed pointing to the correct DB so I don't understand why PW admin mode isn't loading the page structure from the DB? Just to give some background (your earlier comment suggested I wasn't clear enough in describing what I had done): The site has been developed on my MAMP localhost. I have the site folder on GitHub I cloned the site folder from GitHub into the document root on my live server I restored the associated DB from my local MySQL onto my live server's MySQL Any ideas? Thanks --Gary Link to comment Share on other sites More sharing options...
Gazley Posted July 13, 2013 Author Share Posted July 13, 2013 Problem resolved. I renamed the "site" folder and re-installed from GitHub. I ran that against my DB and it all worked. Seems that "installing" PW is not really required when you have an existing site that you can "copy". If my assumption isn't correct, I'd like to be corrected so I can understand this situation better Thanks for the help! --Gary Link to comment Share on other sites More sharing options...
diogo Posted July 13, 2013 Share Posted July 13, 2013 If you only want to move the website, you don't need to run the installer again. All you need is to import the database, move the files to the server, adjust the necessary permissions if needed, and update the database permissions on the config file. Edit: Oh, I didn't see your last post. Sorry that I understood what you wanted wrongly. I thought you were doing some weird experiment Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now