Jump to content
xisto Community
Nameless_

I Can't Update Modules In Drupal Especially the Views module

Recommended Posts

Hello people... it seems like such a long time ago when I asked a "Questions and Queries" thread... but it seems like I need your help again. Help at Xisto is always much much more efficient and faster and better than any other communities like Drupal.org, so I thought that I should come that to my lovely Xisto community in which I now call my home and ask for some help.The problem is that I can't seem to update my modules on my drupal site, especially the views module. Cron stopped working for ages and then it suddenly works again, and then I found out that my views module needed updating, and I have been trying to update it for hours. I've deleted the Views module 6.x-2.7 and replaced it with 6.x-2.8, but while I did that properly, and tried to run update.php on my site, it still shows that I haven't updated it yet. Can someone help me?I think it is something to do with the update.php, because I'm not sure how to use it, and I tried to choose the right files in the views module to update, but it showed line errors instead. Now it seems to be working okay... I'm not sure if the line errors are still there... but anyway... Can someone tell me how to update my modules in Drupal? And cancel out any possible errors? Thanks.Also, an easier way of back upping my site will be nice. I had to copy the whole folder and paste it on my desktop. Took a long time.Thanks so much, Nameless_(By the way, Xisto is still my favourite forum. :P)

Share this post


Link to post
Share on other sites

sorry, but i have no help with your main question...but as far as backing up your site, there is no other easier way than copying the public_html folder. now ofcourse it took a lot of time, but that doesn't mean it wasn't easy. you said you copied just the folder. that isn't your whole site though. you will also have to back up your database...

Also, an easier way of back upping my site will be nice. I had to copy the whole folder and paste it on my desktop. Took a long time.
Thanks so much, Nameless_
(By the way, Xisto is still my favourite forum. :P)


ok. i don't know anything about drupal, but i am editing this post because i looked up the answer for you. hope this helps....

i am assuming you have the update module that tells you when you can update your modules automatically. when you run across a module that you want updated, you have to disable it. it didn't recomend to uninstall it OR delete it as you have done. just disable it. THEN, reinstall the module. once that is done, then you can go ahead and run the update.php script. also, after you run the update, it is recommended that you leave the database module setting alone. if you got errors, then something went wrong with the update. if you are not getting any errors, everything updated correctly. maybe you need to run update.php again to see if you are getting any errors since you don't even know if you're getting errors or not. if not, then this whole thread was for nothing. here's where i got my information from...

http://forums.xisto.com/no_longer_exists/
Edited by anwiii (see edit history)

Share this post


Link to post
Share on other sites

We need to set up the cron job in the cpanel with proper crontab command so that it runs periodically, did you do it? Otherwise cron wont run and we have to manually run it.About views module updating, I never had such issue. Did you untar the new version module on the server? My usual method of upgrading modules is: upload the new module on all sites/all/modules directory. Untar the file there. Run the update.php. update.php is used only to modify tables if any in new version, otherwise it doesn't change anything.As for backing up, how did you copy the folder, through FTP? I use th backup wizard in cpanel. There, we have the option of either creating a full backup of site with databases, or just the databases, or home directory backup.Edit:I updated the views module to version #6007. I saw there were no queries generated in the update.php results, hence no table alterations required in this version. So the version should be updated even if you dont run update.php. Check the path where you copied the new module. And make sure you untarred it there.

Edited by BCD (see edit history)

Share this post


Link to post
Share on other sites

Updating modules is fairly simple. Just delete the old folder (better copy that folder for backup purposes). Then copy your new module.tar to the sites/all/modules directory and extract it.

Some times this is giving problem in CPanel's File Manager. It shows extract completed but no folder appearing in File Manager. If you faced that problem, just Extract the folder in your computer and upload that folder via FTP to the modules folder.

 

Now run update.php script. (If you are using Administration menu module then chose Run Update from that). Then continue as default. Don't select anything. Just press update. If the update script detects anything new, it will automatically updates that particular module or theme and will show you the details. Thats it.

Now run Cron to make sure everything ok.

 

But Never choose Uninstalling a module, because if you uninstall a module all of its settings will be deleted. You have to manually set them again.

Share this post


Link to post
Share on other sites

sorry, but i have no help with your main question...but as far as backing up your site, there is no other easier way than copying the public_html folder. now ofcourse it took a lot of time, but that doesn't mean it wasn't easy. you said you copied just the folder. that isn't your whole site though. you will also have to back up your database...

Oh... I don't know how to back up my database though... but my site seems to be working normal... so I think it's working? :P

 

ok. i don't know anything about drupal, but i am editing this post because i looked up the answer for you. hope this helps....

 

i am assuming you have the update module that tells you when you can update your modules automatically. when you run across a module that you want updated, you have to disable it. it didn't recomend to uninstall it OR delete it as you have done. just disable it. THEN, reinstall the module. once that is done, then you can go ahead and run the update.php script. also, after you run the update, it is recommended that you leave the database module setting alone. if you got errors, then something went wrong with the update. if you are not getting any errors, everything updated correctly. maybe you need to run update.php again to see if you are getting any errors since you don't even know if you're getting errors or not. if not, then this whole thread was for nothing. here's where i got my information from...

 

http://themeit.com/


Well, I go error messages before, and then I updated things again and the error message was gone, so I am not sure if the error message is still there, but if I update it properly, then it should be right... and thanks, you didn't have to edit your post for that. Thank you very much!!! :P

 

 

We need to set up the cron job in the cpanel with proper crontab command so that it runs periodically, did you do it? Otherwise cron wont run and we have to manually run it.

 

About views module updating, I never had such issue. Did you untar the new version module on the server? My usual method of upgrading modules is: upload the new module on all sites/all/modules directory. Untar the file there. Run the update.php. update.php is used only to modify tables if any in new version, otherwise it doesn't change anything.

 

As for backing up, how did you copy the folder, through FTP? I use th backup wizard in cpanel. There, we have the option of either creating a full backup of site with databases, or just the databases, or home directory backup.

 

Edit:

I updated the views module to version #6007. I saw there were no queries generated in the update.php results, hence no table alterations required in this version. So the version should be updated even if you dont run update.php. Check the path where you copied the new module. And make sure you untarred it there.


Yes... this is the problem. I don't know how to set up cron, or understand what the "crontab" is, or "tarring" stuff, and maybe that is why I have the cron job problem. Can you explain what cron really does, and how to run it and set it periodically? Also, what does Tarring mean? I have read it in a drupal forum thread on updating modules but I don't know what that means.

 

Yes, I copied the whole public_html folder via FTP. I'll check out the update thing that you said on cpanel. And YES!!! It's the 6007 thing. I don't understand what that means, but I tried to update that. But there is still the updating error that is showing. :D I don't know how to check the path or "tarring" stuff though. Please explain!!!

 

Thank you very much!!!

 

Updating modules is fairly simple. Just delete the old folder (better copy that folder for backup purposes). Then copy your new module.tar to the sites/all/modules directory and extract it.

Some times this is giving problem in CPanel's File Manager. It shows extract completed but no folder appearing in File Manager. If you faced that problem, just Extract the folder in your computer and upload that folder via FTP to the modules folder.

 

Now run update.php script. (If you are using Administration menu module then chose Run Update from that). Then continue as default. Don't select anything. Just press update. If the update script detects anything new, it will automatically updates that particular module or theme and will show you the details. Thats it.

Now run Cron to make sure everything ok.

 

But Never choose Uninstalling a module, because if you uninstall a module all of its settings will be deleted. You have to manually set them again.


Yes... that was what I did. I just deleted the old views folder and put in the new one. I copied the whole site too, so the old folder is still there. I extracted the folder in my computer and then uploaded it via FTP though. So therefore, it must be the update.php that isn't working properly. :D I went to http://forums.xisto.com/no_longer_exists/ to run it, and then I pressed update. But the update thing still tells me to download the new version when I checked in the reports page. So I tried to manually update #6007 but the same thing still happened, so I tried #6000 instead, thinking that it was the wrong version. But then the error messages showed, so I updated it again without touching anything and after a few tries it worked.

 

Maybe it's the running cron problem? I don't know how to run cron. Can someone help me? I tried to uninstall the module, but I couldn't do anything, so I didn't do it.

 

Thanks... Nameless_

Share this post


Link to post
Share on other sites

Maybe it's the running cron problem? I don't know how to run cron. Can someone help me? I tried to uninstall the module, but I couldn't do anything, so I didn't do it.

Usually, we need to run cron for some periodic tasks like indexing our website, checking for updates etc.. Other than that, cron doesn't have anything related to versions. You can run cron in drupal, using Run Cron manually. It available in Status Report.

 

Do you have Administration Menu installed? If not, go and install it, that is very handy when administering Drupal. If you want a Cron application for Drupal, Try Poormanscron module. It is a module designed to run cron periodically, without the input from user. Download and install poormanscron.

 

Or we can setup cron job in CPanel also(without the help of poormanscron), if our server supports that. I haven't checked it yet. I'll check it and tell you later.

 

When coming to backing up your site, There is no need to copy the entire drupal installation folder. Just copy the Sites folder. And the .htaccess and robots.txt files. And backup your MySql database. If you have any other doubts, ask me.

Share this post


Link to post
Share on other sites

Usually, we need to run cron for some periodic tasks like indexing our website, checking for updates etc.. Other than that, cron doesn't have anything related to versions. You can run cron in drupal, using Run Cron manually. It available in Status Report.

 

Do you have Administration Menu installed? If not, go and install it, that is very handy when administering Drupal. If you want a Cron application for Drupal, Try Poormanscron module. It is a module designed to run cron periodically, without the input from user. Download and install poormanscron.

 

Or we can setup cron job in CPanel also(without the help of poormanscron), if our server supports that. I haven't checked it yet. I'll check it and tell you later.

 

When coming to backing up your site, There is no need to copy the entire drupal installation folder. Just copy the Sites folder. And the .htaccess and robots.txt files. And backup your MySql database. If you have any other doubts, ask me.

OK... so... do I just download the poormanscron module? And that will help me run cron? Also, I went tried to go to http://forums.xisto.com/no_longer_exists/, but I all have is a blank page, unlike http://forums.xisto.com/no_longer_exists/. Is that meant to be correct? I will download porrmanscron and see if it works, thanks... :P

 

I hope it works... They should have that module automatically installed in it is needed to run a cron job. :P I tried to run cron manually, but it still shows the error, and it cannot detect that I already have the new views module installed. :D

Share this post


Link to post
Share on other sites

To run cron manually you just need to type ./
You don't even need to login. So you see, anybody can run your website's cron. They can repeatedly execute cron script without your permission. Although there are no security issues, this can slow down the server if somebody is trying to bog your server. And just the fact that anyone can perform administrative tasks of your website would want you to secure cron.php.

Setting up cron for dupal and securing it:
Assuming you are hosted on gamma server, where it cron jobs are allowed to be run and has curl enabled.

1) Go to Cpanel and click Click "Cron Jobs" in Advanced section.
2) Click Advanced (Unix Style) button.
3) Fill the time period for the cron execution. For example:



Minute Hour Day Month Weekday50 * * * *

This will run cron every 50 minutes.

For command field, I will show you the curl method:



curl --silent --compressed http://<web site name>.com/cron.php

Add it.

Thats it. Now cron will be executed every 50 minutes. You can change the values if you wish. But as I said earlier, anyone can run cron by just typing in the url. One method to prevent this is to change rename cron.php to some less obvious name. If you do this you also need appropriately change the name in the cron command you entered before.

Tarring is nothing but an creating a single archive file consisting of many files. Similar to the more common .zip files, but without compression. You might have seen that the drupal modules that you download have an extension .tar.gz this means they are archives compressed using qzip compression. So you need to uncompress these files on server. You need to select one tar.gz at a time an click "Extract" at the top in file manager.

For the modules problem, you need to explain somethings. Just follow the steps and you should be doing fine:
1) Open Cpanel and go to File Manager.
2) Navigate to sites/all/modules directory.
3) Click upload and select the downloaded modules.
4) Now the file should appear in the file manger in that directory.
5) Select the file and extract it by clicking extract from top right.
6) When logged in, run the update.php.

If the problem persists, paste the error text here.

Edit:



Also, I went tried to go to http://forums.xisto.com/no_longer_exists/, but I all have is a blank page, unlike http://forums.xisto.com/no_longer_exists/. Is that meant to be correct?


Yes, that means cron has run successfully. Anyone can run cron. Read the above text.

Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

OK... so... do I just download the poormanscron module? And that will help me run cron? Also, I went tried to go to http://forums.xisto.com/no_longer_exists/, but I all have is a blank page, unlike http://forums.xisto.com/no_longer_exists/. Is that meant to be correct? I will download porrmanscron and see if it works, thanks... :P

Yes, that module will help you to run cron automatically at particular intervals. No need to run cron through that http://forums.xisto.com/no_longer_exists/. And BCD is right, if you see a blank screen when running http://forums.xisto.com/no_longer_exists/ , it means cron ran successfully. If you have doubts, check Recent Log Entries under reports. You'll see a cron run completed message there, if cron ran successfully.

 

To setup poormanscron, Just go to Site Information in Site Configuration. At the bottom of the page, you'll find an entry to Automatically run cron at specific interval. Thats it.

 

They should have that module automatically installed in it is needed to run a cron job.

They are planning to integrate into core modules in Drupal 7, so no need to worry in Drupal 7. :P

 

 

You don't even need to login. So you see, anybody can run your website's cron. They can repeatedly execute cron script without your permission. Although there are no security issues, this can slow down the server if somebody is trying to bog your server. And just the fact that anyone can perform administrative tasks of your website would want you to secure cron.php.

Well, you are right. Drupal's core installation doesn't secure the cron.php file. Any one can run cron.php without the admin privileges. But there is an easy way to block cron.php access from anonymous users.

 

Just add the following code at the end of your .htaccess file in your drupal directory.

<Files "cron.php">  Order deny,allow  Allow from 127.0.0.1  Deny from all</Files>

Now, your cron.php is protected from url run. That means if anybody tries to access http://forums.xisto.com/no_longer_exists/ it will give a Page Not Found error. (Even if we logged in as administrator). But it will run normally if we run it through a cron job, or Run Cron manually in Status Report.

Share this post


Link to post
Share on other sites

there is an easy way to block cron.php access from anonymous users.

 

Just add the following code at the end of your .htaccess file in your drupal directory.

<Files "cron.php">  Order deny,allow  Allow from 127.0.0.1  Deny from all</Files>

Is it working for you. I tried this but it didn't work, so I had to resort to file renaming method. I even tried adding server's IP address in the allow directive, even then it doesn't work. I only get an email with html code of the page not found error page which my cron command patiently tries to access every hour.

Share this post


Link to post
Share on other sites

Is it working for you. I tried this but it didn't work, so I had to resort to file renaming method. I even tried adding server's IP address in the allow directive, even then it doesn't work. I only get an email with html code of the page not found error page which my cron command patiently tries to access every hour.

Yes, it is working for me. But I'm using it along with my poormanscron module. I never tried the servers Cron Job. May be that was blocking access for servers Cron job.
Its working fine with poormanscron module without any problem.

Share this post


Link to post
Share on other sites

Thanks guys.... I'll have to try out the coding thing, but there are more problems... I ran cron successfully manually, but the thing still didn't update, and it still shows the error. I have posted the error message below and the image. I don't understand. The views module is up to date in my filezilla FTP thing... I'll attach another picture up for it, but cron doesn't seem to recognise the new file and thing that it is still the old version.What is going on? Views is still working, because I have the archives up, and I don't use the archives module for that, I use the Views module, but cron still says that it is still the old version when it is obviously not.By the way, why do we have to not let anyone run cron? Isn't that a good thing? The run cron by someone else? I don't think anyone will bother doing that though... :P

post-86048-1260654993_thumb.jpg

post-86048-1260655264_thumb.jpg

Share this post


Link to post
Share on other sites

As per your first screenshot, my first question is Where is your Views folder of 6.x-2.7 version? Your screenshot is showing that you copied your Views 6.x-2.8 to

public_html/modules/views which is the location of core drupal modules. If you want to install a third party module, you should copy your module to

/sites/all/modules folder.

 

So I think, your views 2.7 is still in sites/all/modules folder, and copied version 2.8 to modules folder. That means you may have two versions installed. And that is causing problems. So delete views module in public_html/modules folder, and copy it to sites/all/modules and then run the update. And tell us the report.

Edited by xpress (see edit history)

Share this post


Link to post
Share on other sites

As per your first screenshot, my first question is Where is your Views folder of 6.x-2.7 version? Your screenshot is showing that you copied your Views 6.x-2.8 to

public_html/modules/views which is the location of core drupal modules. If you want to install a third party module, you should copy your module to

/sites/all/modules folder.

 

So I think, your views 2.7 is still in sites/all/modules folder, and copied version 2.8 to modules folder. That means you may have two versions installed. And that is causing problems. So delete views module in public_html/modules folder, and copy it to sites/all/modules and then run the update. And tell us the report.


Thank you SO much, xpress!!! I didn't realise that you had to create another module folders in the sites/all directory for non core drupal modules... Now it works!!! I'll have to move the modules one by one to the correct folder when they need updates from now on.

 

Thanks so much!!! Now I because of this thread, I have learned a few new things, like what "untarring" means, which is to unzip the tar.gz folder, and how to run update.php and cron.php correctly, as well as why cron.php has a blank page when you visit it. :P Thank you so much for your help!!!

 

Xisto turns out to be better than the drupal.org forum. :D People there still hasn't resolved my problem yet and Xisto beat them to it. :P Yes! Now the update status page is correct, with the new version of the module correctly recognised... I wonder how many errors I have made in installing drupal? :D Well, this is the first one, and I suppose there will be many more to come. :D

 

Do you also have to create a templates folder in sites/all for non-core templates?

 

Nameless_

Share this post


Link to post
Share on other sites

Do you also have to create a templates folder in sites/all for non-core templates?

Yes, but the directory name should not be templates, it should be themes, like sites/all/themes

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.