FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18590&edit=1

ID: 18590
Updated by: hubert.bossot@gmail.com
Reported By: hubert dot bossot at gmail dot com
Summary: Impossible to work from IIS7
Status: Open
Type: Bug
Package: Spreadsheet_Excel_Writer
Operating System: Windows server 2008
Package Version: 0.9.2
PHP Version: 5.3.6
Roadmap Versions:
New Comment:

PS: I've replaced this path "C:\Sites\/PEAR" by a good one
"C:\Sites\PEAR" in all the subdirectories without success too.


Previous Comments:
------------------------------------------------------------------------

[2011-06-06 17:10:17] hbossot

Description:
------------
Hello,
I could install Spreadsheet_Excel_Writer easily with Apache on several
Windows, but on Windows server 2008 with IIS7 it has never worked.
Actually, I've checked carefully my IIS7 configuration (FastCGI is
enable), but every .xls which are generated are empty.

Test script:
---------------
C:\Sites\>pear install Spreadsheet_Excel_Writer
PHP_PEAR_INSTALL_DIR is not set correctly.
pearcmd.php could not be found there.
Please fix it using your environment variable or modify
the default value in pear.bat
The current value is:
C:\Sites\/PEAR

C:\Sites\>


Expected result:
----------------
The test file below writes one word in a base.xls file with Apache, but
with IIS7 it doesn't:

<?php
error_reporting( E_ALL & ~E_NOTICE & ~E_DEPRECATED );
set_time_limit(300);
set_include_path ("PEAR/");
include 'Spreadsheet/Excel/Writer.php';

$workbook = new Spreadsheet_Excel_Writer();
$workbook->setTempDir('./tempdoc');
$workbook->send('base.xls');
$worksheet = $workbook->addWorksheet();

$worksheet->write(1,2,'test');


$workbook->close();
$workbook->sendFile();
?>

------------------------------------------------------------------------

Search Discussions

  • Hubert Bossot at Jun 8, 2011 at 2:50 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18590&edit=1

    ID: 18590
    Comment by: hubert.bossot@gmail.com
    Reported By: hubert dot bossot at gmail dot com
    Summary: Impossible to work from IIS7
    Status: Open
    Type: Bug
    Package: Spreadsheet_Excel_Writer
    Operating System: Windows server 2008
    Package Version: 0.9.2
    PHP Version: 5.3.6
    Roadmap Versions:
    New Comment:

    FInally I've solved the problem by replacing the old syntax:
    $workbook->send($File);
    by:
    $workbook->setTempDir('../Temp'); //The directory should exist
    $workbook->send($File);
    $workbook->close();
    $workbook->sendFile();


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-06-07 14:42:39] hbossot

    PS: I've replaced this path "C:\Sites\/PEAR" by a good one
    "C:\Sites\PEAR" in all the subdirectories without success too.

    ------------------------------------------------------------------------

    [2011-06-06 17:10:17] hbossot

    Description:
    ------------
    Hello,
    I could install Spreadsheet_Excel_Writer easily with Apache on several
    Windows, but on Windows server 2008 with IIS7 it has never worked.
    Actually, I've checked carefully my IIS7 configuration (FastCGI is
    enable), but every .xls which are generated are empty.

    Test script:
    ---------------
    C:\Sites\>pear install Spreadsheet_Excel_Writer
    PHP_PEAR_INSTALL_DIR is not set correctly.
    pearcmd.php could not be found there.
    Please fix it using your environment variable or modify
    the default value in pear.bat
    The current value is:
    C:\Sites\/PEAR

    C:\Sites\>


    Expected result:
    ----------------
    The test file below writes one word in a base.xls file with Apache, but
    with IIS7 it doesn't:

    <?php
    error_reporting( E_ALL & ~E_NOTICE & ~E_DEPRECATED );
    set_time_limit(300);
    set_include_path ("PEAR/");
    include 'Spreadsheet/Excel/Writer.php';

    $workbook = new Spreadsheet_Excel_Writer();
    $workbook->setTempDir('./tempdoc');
    $workbook->send('base.xls');
    $worksheet = $workbook->addWorksheet();

    $worksheet->write(1,2,'test');


    $workbook->close();
    $workbook->sendFile();
    ?>

    ------------------------------------------------------------------------
  • Hubert Bossot at Jun 8, 2011 at 2:51 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18590&edit=1

    ID: 18590
    Updated by: hubert.bossot@gmail.com
    Reported By: hubert dot bossot at gmail dot com
    Summary: Impossible to work from IIS7
    -Status: Open
    +Status: Closed
    Type: Bug
    Package: Spreadsheet_Excel_Writer
    Operating System: Windows server 2008
    Package Version: 0.9.2
    PHP Version: 5.3.6
    -Assigned To:
    +Assigned To: hbossot
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: hbossot



    Previous Comments:
    ------------------------------------------------------------------------

    [2011-06-08 15:49:42] hbossot

    FInally I've solved the problem by replacing the old syntax:
    $workbook->send($File);
    by:
    $workbook->setTempDir('../Temp'); //The directory should exist
    $workbook->send($File);
    $workbook->close();
    $workbook->sendFile();

    ------------------------------------------------------------------------

    [2011-06-07 14:42:39] hbossot

    PS: I've replaced this path "C:\Sites\/PEAR" by a good one
    "C:\Sites\PEAR" in all the subdirectories without success too.

    ------------------------------------------------------------------------

    [2011-06-06 17:10:17] hbossot

    Description:
    ------------
    Hello,
    I could install Spreadsheet_Excel_Writer easily with Apache on several
    Windows, but on Windows server 2008 with IIS7 it has never worked.
    Actually, I've checked carefully my IIS7 configuration (FastCGI is
    enable), but every .xls which are generated are empty.

    Test script:
    ---------------
    C:\Sites\>pear install Spreadsheet_Excel_Writer
    PHP_PEAR_INSTALL_DIR is not set correctly.
    pearcmd.php could not be found there.
    Please fix it using your environment variable or modify
    the default value in pear.bat
    The current value is:
    C:\Sites\/PEAR

    C:\Sites\>


    Expected result:
    ----------------
    The test file below writes one word in a base.xls file with Apache, but
    with IIS7 it doesn't:

    <?php
    error_reporting( E_ALL & ~E_NOTICE & ~E_DEPRECATED );
    set_time_limit(300);
    set_include_path ("PEAR/");
    include 'Spreadsheet/Excel/Writer.php';

    $workbook = new Spreadsheet_Excel_Writer();
    $workbook->setTempDir('./tempdoc');
    $workbook->send('base.xls');
    $worksheet = $workbook->addWorksheet();

    $worksheet->write(1,2,'test');


    $workbook->close();
    $workbook->sendFile();
    ?>

    ------------------------------------------------------------------------

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJun 7, '11 at 1:43p
activeJun 8, '11 at 2:51p
posts3
users2
websitepear.php.net

2 users in discussion

Hubert Bossot: 2 posts Hubert Bossot: 1 post

People

Translate

site design / logo © 2021 Grokbase