Hi -
absolutely new to PHP - i got a script for an email "form-send.php" which gives the following error message when i try to run it -

Insufficient disk space; try again later Insufficient disk space; try again later returntosender: cannot select queue for almond-villas.co.uk Insufficient disk space; try again later returntosender: cannot select queue for postmaster putbody: write error: No space left on device Error writing control file qfk7IEq928028690: No space left on device

I'm absolutely new to coding - any suggestions?

thanks in advance

    heres the code -

    */
    // write form results to file

    $fp = fopen("form-results.txt", "a");
    fwrite($fp, $POST['name'] . "," .
    $
    POST['DOB'] . "," .
    $POST['diagnosis'] . "," .
    $
    POST['consultant'] . "," .
    $POST['current condition'] . "," .
    $
    POST['current status'] . "," .
    $POST['telephone'] . "," .
    $
    POST['email address'] . "," .
    $_POST['comments'] . "," .
    date("M-d-Y") . "\n");
    fclose($fp);

    // send form results through email
    $recipient = 'admin@almond-villas.co.uk';
    $subject = 'Web Form Results';
    $headers = 'From: Enquiry@almond-villas.co.uk' . "\r\n" .
    'Reply-To: noreply@almond-villas.co.uk' . "\r\n" .
    'Return-Path:error@almond-villas.co.uk' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
    $forminfo =
    ($POST['name'] . "\r" .
    $
    POST['DOB'] . "\r" .
    $POST['diagnosis'] . "\r" .
    $
    POST['consultant'] . "\r" .
    $POST['current condition'] . "\r" .
    $
    POST['current status'] . "\r" .
    $POST['telephone'] . "\r" .
    $
    POST['email address'] . "\r" .
    $_POST['comments'] . "\r\n" .
    date("M-d-Y") . "\r\n\n");

    $formsend = mail($recipient, $subject, $forminfo, $headers);

    ?>

      Hi,

      this isn't a coding problem. A partition on the server seems to be full.

      Thomas

        thanks - so I need to make space or get the hosts to make some space?

          Do you have shell access (ssh) ?

            I haven't got access the account is free hosting 🙁

              anything i can do apart from pester the server admin?

                I think you need to contact the server admin because depending on the system setup you may not be able to free space on that partition.

                One way without having shell access is to use a php script to get some info about the partitions:

                <html>
                <head>
                <title>disk space</title>
                </head>
                <body>
                <pre>
                <?PHP passthru('/bin/df'); ?>
                </pre>
                </body>
                </html>
                

                If that doesn't print anything then try /usr/bin/df instead of /bin/df. Depending on the PHP setup the script may not have the privileges to execute that command. Besides that, I'd suggest to contact the server admin.

                Post the output if the script prints anything.

                Thomas

                  Write a Reply...