Problem with subdomains

Joppe

New member
Joined
Jun 22, 2005
Messages
4
Hello,

I got an own dedicated server with DirectAdmin. I wanna make 1000 subdomains in one time by just hitting a button. Its all working nice, BUT, when I'm creating them it goes till 33 subdomains than the script stops creating them.

Here is the script:

PHP:
<?php
include 'httpsocket.php';
$tekst = $_POST['tekst'];

$tekst = explode($teken,$tekst);

//begin array
foreach($tekst as $number => $value){

$bestand = str_replace(" ","+",$value);

$sock = new HTTPSocket;
$sock->connect('***.com',2222);

$sock->set_login(""***","***");

$sock->set_method('POST');

$sock->query('/CMD_SUBDOMAIN',
    array(
        'action' => 'create',
        'domain' => '***',
        'subdomain' => $bestand
    ));
$result = $sock->fetch_body();

echo $result;
//einde array
}
?>

Somebody knows how I can create 1000 subdomains in one time? And not 33 a time?

//Sorry for my bad english!

Kind regards,

Joppe
 
Hi,

I changed the time out in DA (timeout: 0, timeout: 999, timeout: 100 seconds), it makes now 70 subdomains but not more. I putted the subdomains to UNLIMITED but its still not working. I added the domain again and tried it again, still not workign :(

Thanks in advance if you can help me!

Joppe
 
Since your script appears to make a new connection to DirectAdmin I doubt it's a timeout with DirectAdmin. More likely it is the timeout of php. Check the php.ini and increase if necassary.

You can also set it to unlimited from within the php script itself if safe_mode is off.
 
Joppe said:
Oke thank you, I'm going to try it now. I will let you hear!

Oke I changed this in php.ini:

Code:
max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60     ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

to

Code:
max_execution_time = 1000     ; Maximum execution time of each script, in seconds
max_input_time = 120     ; Maximum amount of time each script may spend parsing request data
memory_limit = 50M      ; Maximum amount of memory a script may consume (8MB)

that didn't worked out, he only made 12 subdomains.

Than I tried this:


Code:
max_execution_time = 0     ; Maximum execution time of each script, in seconds
max_input_time = 120     ; Maximum amount of time each script may spend parsing request data
memory_limit = 50M      ; Maximum amount of memory a script may consume (8MB)

He makes now 100 subdomains, but I filled in my form, 1000 subdomains, so its not working right.

Is there another way to solve this?

Thanks in advance!

Joppe
 
Are any error messages produced when the script stops?
I guess we still don't know if it's a problem with DirectAdmin, the script, php etc..

Are you executing it through the web/apache+mod_php?
If so try executing it from the command line through ssh.

If I get some time later tonight I'll give it a try on one of my servers and see if I can provide any more insight. (reproduce the problem).
 
Back
Top