Upgrading to 2.7 error
-
I just upgraded to 2.7 from 2.6.3 and I uploaded the new files to the server. When I go to the site, I get an error. It says – Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/MyRootUser/public_html/wp-config.php on line 56
What is going on?
-
what did you change in wp-config.php and why?
That is one file you are not supposed to touch on upgrade.Ohhh I didnt really change anything. I thought I was supposed to copy my settings from the old wp-change.php and into the new one. I copyed my info from the old wp-config.php into the new version. Am I just supposed to leave things alone? I didnt change anything in the new one, I just took my old ones settings and put it in the new one. In this case the $table_prefix – I put my old info into this new one. My old one was not the standard wp_ I changed it into a different one before my original installation.
Well, copying the settings into the new one would not be a problem, however you clearly changed something in a bad way.
Put the original wp-config.php file back and try using it unchanged from 2.6.3.
Thats what I did. It looks like it works, I dont have errors at least… the way I changed it is I took all the info I needed to from wp-config and put it into wp-config-sample then I copied everything from the sample into the main config and I uploaded it…. thats when I got an error. So I just tried reversing everything I did and put the old one back, and no more error, I can get into the admin panel, and I can post comments with no prob…. is this something I should be worried about though? Any errors forseen down the road?
Update – One additional thing. I cant seem to get the different button between html/visual post writing. I have had this issue on another blog on the same server, the drop down for any of the menus that are supposed to have this option. Any ideas in that area? Would it be something with a server or something else. I tried erasing cached files from my browser, didnt seem to do anything
The option on the top right does not work for me. It shows new post, and I assume other options, but it does not drop down for me. Other options work, but this one does not. I am having the same issue on another site of mine. It also wont allow me to re-arange widgets and if I click add or edit widget, it just reloads the page. Please help me with this one, I have been stuck on it for 3 weeks now.
Check that all your javascript files got uploaded to your site. Check that they are accessible. Check that your browser’s error console isn’t throwing any not found errors.
Usually, when the dynamic bits don’t work, it’s because your javascript files are missing/broken.
SOLVED kind off…… the issue I have been having this whole time is because of the .htaccess file!! I could have sworn that was the first thing I got rid of, but I was wrong. Ok. Now. The issue I have is how am I supposed to set the .htaccess file the right way? Here is what I have:
For wp-includes:
Order Allow,Deny
Deny from all
<Files ~ “.(css|jpe?g|png|gif|js)$”>
<Files ~ “.(/themes/)$”>
Allow from all
</Files>For wp-content:
Order Allow,Deny
Deny from all
<Files ~ “\.(css|jpe?g|png|gif|js)$”>
Allow from all
</Files><Files ~ “.(/themes/)$”>
Allow from all
</Files>I found out that if I delete these from my server, everything tends to work fine. However, as a security precaution, how do I edit this the right way.
Why would you have those in the first place? They’re not helpful nor do they make anything more secure. No wonder the site was broken.
Delete them. Leave them off entirely. They can only do bad things, not helpful ones.
Really? Shoot, I thought I needed them. Ok, that is what I am looking to pass up then. I do however need it to be as secure as it can. But id doesnt really do much?
The purpose of those is clearly to disallow browsers from pulling anything except certain types of files from those subdirectories. The problem is that all the WordPress files are safe to pull directly. They don’t do anything dangerous. I understand the idea as a general precaution, but really, WP was designed to be secure in that respect, so there’s nothing there that is dangerous.
Anything you would suggest? I have been to other users sites where it disallows access to the wp-content, wp-admin, and wp-includes folder for their site. Is that done with .htaccess?
Also, about the wp-config file, is that going to be an issue? Or can I just leave it the way it is?
You don’t need to disallow anything. It’s fine the way it is. And wp-content is already blocked by default with that index.php file in there. And you can’t block wp-admin, you kinda need to access that to do things on the site.
Also, your wp-config file should not change at all during a upgrade, unless you’re changing the secret keys.
in 2.7 wp-config.php, there is a NONCE_KEY … what is that? what do i put on there? it wasn’t there in 2.6
@otto42 Ok, the thing I had then was also about blocking the plugins page and wp-includes page. I went to your page, and this was blocked, how do you do this? How do you block acess. The admin I have blocked successfully, I just put a .htaccess in there not allowing anyone else in there except my home computers ip, no problems yet. How do I block access to those files though?
@annicole72 – I was wondering that too. You need to go to the link that is given to you in the commented out text above that. It will gave a url you can go to and the page automatically loads a random, hard to guess code.
EDIT – the link is https://api.www.ads-software.com/secret-key/1.1/
- The topic ‘Upgrading to 2.7 error’ is closed to new replies.