View Single Post
  #20  
Old 27th December 2005, 18:06
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Talking

Ok! It worked! (but I have a new problem)
I did put my function on config.lib.php inside isp_web class
this is the function:
Code:
function make_install_phpnuke($web_id, $username, $path_to_create) {

	$web_id = intval($web_id);	
	exec("mkdir $path_to_create");
	system("cp -R /var/www/installers/php-nuke/html/* $path_to_create");
	system("chown -R $username:web$web_id $path_to_create");
}
writeconf.php has now:
Code:
$isp_web = new isp_web;

$web_id = "8";
$username = "mundohosting";
$path_to_create = "/var/www/web8/web/phpnuke";
$isp_web->make_install_phpnuke($web_id, $username, $path_to_create);
And my install.php has the touch .run file.
Everything works as espected, BUT, as you have noticed, in writeconf.php I have defined all the functions variables...
Code:
$web_id = "8";
$username = "mundohosting";
$path_to_create = "/var/www/web8/web/phpnuke";
Because I dont know how to pass those values from install.php to writeconf.php... I cant think in a simple way to do this, but is there any? Maybe I should create a plain text file with the install data and read it from writeconf.php IF there is another touched file? like for example /home/admispconfig/.install
Is there any other way?
thank you!!
Reply With Quote