2

I don't have the cpanel password of my hosting, I want to install new module through website. It's easy in D7, how can I do it in D6.

Note: if you suggest any module, I can't install that too through ftp and I don't know drush too.

3
  • 3
    If the module directory is writeable from the user account used to run the web server, you can create a node whose body uses the PHP filter.
    – avpaderno
    Commented Dec 19, 2014 at 18:50
  • @kiamlaluno yaa it's writable, how should I do that using php?
    – Bala
    Commented Dec 19, 2014 at 19:00
  • 1
    A place to start looking might be the update_manager_batch_project_get() function in Drupal 7. You could replicate the parts of that system you need and I'm sure you could simplify it greatly as a one off script for your own use. You could potentially run it from the execute php page the devel module provides (devel/php).
    – rooby
    Commented Dec 19, 2014 at 22:01

1 Answer 1

1

If all directories are writable, you should be able to enable PHP module, create a node with PHP filter, and in that node use:

file_put_contents ( 'path_to_modules/mymodule/mymodule.info', 'name = example
description = Demonstrates how to write info file.
core = 6.x');

The same for module file.

Preferably do that with rudimentary module that will allow you to upload and extract zip / tar.gz module files as provided by Drupal.org, and then remove PHP filtered node and disable PHP module.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.