You are Wellcome to register and use this Installation for testing purposes.

http://www.adaccs.at/test

Comments

Geotechy’s picture

Systematic knowledge is a short circuit access to success--GyaNeX

Try the following method, just copy and paste. I have already tested them. These statements work very well .....==>

You might want to follow the following steps to download the Drupal CMS V5.0 file until before you call Drupal V5.0Beta 1's install.php at your website. (you can also find the same file at http://www.geotechnical.org/drupal5p0.html )



1. Copy the following text and save as a different text file e.g. copy_DrupalCms_files.php. Save as a php file in your local computer.

2. Upload this PHP file to your website server's directory where you want to download the Drupal files, and install the Drupal Cms V5.0 Beta1 or other versions.

3. Change the File attributes to 755 or 777 (chmod 777), that is the easiest method.

4. Run this PHP file using http protocal: URL. Initial Run will allow you to check the commands and the respective directories.
If everything looks fine, then switch on the execution control code, i.e. set "$exit_com = "GO"" by removing the two foward slashes "//" in front the statement.

5. Run it again. Check whether there are total four "SUCCESSFUL COMMANDs ..." appears or not at the bottom of the html file. If you see it, everything went fine. If you find the remark: "COMMAND I/II/III or IV FAILED",
then, check correct directories that you have set corresponding to the Drupal's current version that you want to install.

6. Disable the the execution control code, i.e. set "$exit_com = "GO"" by having slashes "//" in front of that statement. My recommendation is to delete this particular PHP file. It will ensure safety and security.

7. Now you may call install.php file using standard URL recommended by Drupal Version 5 or other verions.

Congratulations! You are done!

<html>
<head> Copyright  © Dr. G. Pokharel, Geotech.Info Solutions, 2000-2006 
</head>
<body>
Dr. G. Pokharel, Geotech.Info Solutions, 2000-2006 offers: <br><br>

<table><tr><td>Geotech.Info Solutions <sup>MW</sup> 

<?php

echo  "\n<br><u>You are trying to check or execute the Drupal Auto file download and CALL the TAR system commands.</u>! <br>\n";


	$exit_com = "CHECK";  // do not modify this particular line.

	$wget_ver = "drupal-5.0-beta1"; // check drupal.org and write the appropriate version and file name here.
	$wget_com = "wget http://drupal.org/files/projects/" . $wget_ver . ".tar.gz && echo \"SUCCESSFUL COMMAND I  EXECUTION.\" || echo \"EXECUTION I FAILED\"";
	$zxvf_tar  = "tar -zxvf " . $wget_ver . ".tar.gz && echo \"SUCCESSFUL COMMAND II  EXECUTION.\" || echo \"EXECUTION II FAILED\"";

	$cur_dir = "./";

	$copy_fr_sub_dir  = "$wget_ver/"; 	//e.g. $copy_fr_sub_dir  = "drupal-5.0-beta1"; // WARNING!!!! Non empty dir should have "/" at the end of dir name.
	$copy_to_sub_dir  = ""; 	// no preceeding slashes. $copy_to_sub_dir  = "mydrupal"; 
//
// Moves all files inside the dir: drupal-5.0-beta1 , but not the directory: drupal-5.0-beta1 
 	$copyAllFiles = "mv " . "$cur_dir" . "$copy_fr_sub_dir" . "*"         . " $cur_dir" . "$copy_to_sub_dir" . " && echo \"SUCCESSFUL COMMAND III EXECUTION.\" || echo \"EXECUTION III FAILED\"";

	$copyHtaccess = "mv " . "$cur_dir" . "$copy_fr_sub_dir" . ".htaccess" . " $cur_dir" . "$copy_to_sub_dir" . " && echo \"SUCCESSFUL COMMAND IV  EXECUTION.\" || echo \"EXECUTION IV  FAILED\"";

	echo  "<br>\n<br>\n";
	echo  "<pre>CHECK---I:-> FILE WGET COMMAND: $wget_com </pre><br>\n";
	echo  "<pre>CHECK--II:-> FILE TAR  COMMAND: $zxvf_tar </pre><br>\n";
	echo  "<pre>CHECK-III:-> FILE MOVE COMMAND: $copyAllFiles </pre><br>\n";
	echo  "<pre>CHECK--IV:-> FILE MOVE COMMAND: $copyHtaccess </pre><br>\n";

//	To execute the system commands, you must assign $print_check  = "GO"; i.e. switch on the next line by removing two slashes. Once your job is done, do not forget to disable the next line (re type // in the beginning of the line as you see right now). Otherwise, you might overwrite the files again and again.
//	$exit_com  = "GO"; 

if (  $exit_com == "GO") { echo "\n<br>CONFIRM YOUR COMMANDS<br><br>\n";
	system($wget_com); 	echo "<br><br>\n";
	system($zxvf_tar); 	echo "<br><br>\n";
	system($copyAllFiles); 	echo "<br><br>\n";
	system($copyHtaccess); 	echo "<br><br>\n"; // you may not need this command under current version of Drupal CMS V5.0 Beta1
	}

echo  "\n<br><u>End of the Shell command executions or checks. </u>! <br>\n";

?>

</body>
</head>
Geotechy’s picture

I would recommend the Drupal Developers to attach the small PHP program that I listed in previous posting be saved and be made available as a short cut method for download and installation on Linux or Unix platforms. It will avoid extra 4 hectic steps involved in unzipping the TAR file. I developed the code when I tried to find an easy way to unzip Drupal 4.7.3 sometime back. At that time, I had tough time finding any easy freeware program that can easily unzip tar file. Because of the program, now I can install similar programs very fast. Novice people like me, could save time and effort if these 4 steps are made easy by making this PHP code or similar codes made available to them. They will certainly benefit from it. All drupal users are free to use the aforesaid PHP code, and you are also free to enhance its performance. Thanks.

G. Pokharel
http://www.geotechnical.org/

greggles’s picture

As has already been expressed (search the drupal5 beta thread, or the dev mailing list) this method can cause security and configuration problems down the road, so...no, it won't be included. And is basically not recommended.

If you can find another reputable online web application that performs such an action, then let's talk about how they made their implementation safe. But that is unlikely.

--
Knaddison Family | mmm Beta Burritos

tetramentis’s picture

I wonder if the pre-install PHP script from Gallery2 could be bundled with Drupal to allow this single-file-upload-and-install functionality.... As I noticed, Gallery2 has no further problems after being installed via the pre-installer. But I'm no pro- in these matters :), so using pre-installer alike that of Gallery2 is IMHO a good approach to use.

glendac’s picture

Me no codehead, I don't understand how the process you detailed would make the task of unzipping a tar file any easier than using good 'ol WinZip or other compression technologies.

Geotechy’s picture

Hi!

The code that I published above can be saved as a text file (with .php extension) and uploaded to the web-server, in a matter of few minutes. Then, run it after you adjust appropriate file attributes. Then, call install.php. You are done. If you want to have other add-ins later, you can just adjust file and URL, it will work perfectly fine.

As I wrote before, I don't have WinZip or other unzipping programs. There are some free, but not so robust. WinZip is not free, I guess. I dislike software that are free for some short evaluation period, and they are extremely annoying. Secondly, I am not using DSL network, and I am using a dial-up based network and it is slower, so unzipping a zipped file means that you need a lot of upload time for these locally unzipped files to web-servers. That is what most people around the world still use to upload their contents to web-servers. But, by using the method described above in my previous posting, you can do (download, unzip, and move to a right directory) in a matter of a minute or less than a minute. Very precise, and safe: because you don't have to worry about interruptions while you try to upload both the large number of files and large sized files. If you have MB speed DSL service, I think the same 'ol WinZip is great, there is no denial, I agree with you. But, I am talking about the people who like me don't have DSL, who don't have WinZip or other robust unZip software. For them the method described above is excellent and a time, money and effort saving device.

Good Luck.
GyaNeX