PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
problems with spreadsheet writer

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats
View previous topic :: View next topic  
Author Message
Freehawk



Joined: 07 Sep 2011
Posts: 1

PostPosted: Wed Sep 07, 2011 4:20 pm    Post subject: problems with spreadsheet writer Reply with quote

Hello,

I have a problem with the spreadsheet writer. Thats the frist time that I do something with the pear package and the spreadsheet writer. I want write some data from my sql table to a excel table. So I installed pear and the spreadsheet writer package.

After that I test the installation with the following script:

Code:
<?php

  error_reporting(E_ALL);

  //echo getcwd() . "<br>";
 
  chdir("pear/PEAR");
 
  //echo getcwd() . "<br>";

  require_once 'Spreadsheet/Excel/Writer.php';
 
  // Creating a workbook
  $workbook = new Spreadsheet_Excel_Writer();
 
  // sending HTTP headers
  $workbook->send('test.xls');
 
  // Creating a worksheet
  $worksheet =& $workbook->addWorksheet('My first worksheet');
 
  // The actual data
  $worksheet->write(0, 0, 'Name');
  $worksheet->write(0, 1, 'Age');
  $worksheet->write(1, 0, 'John Smith');
  $worksheet->write(1, 1, 30);
  $worksheet->write(2, 0, 'Johann Schmidt');
  $worksheet->write(2, 1, 31);
  $worksheet->write(3, 0, 'Juan Herrera');
  $worksheet->write(3, 1, 32);
 
  // Let's send the file
  $workbook->close();
 
?>


Wenn I execute the script a excel file will be downloaded. But inside there is only the following error:

Code:
<b>Warning</b>:  realpath() [<a href='function.realpath'>function.realpath</a>]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/bla/bla/bla/html/:/bla/bla/bla/phptmp/:/bla/bla/bla/files/:/bla/bla/bla/atd/:/usr/share/php/) in <b>/bla/bla/bla/html/bla/bla/pear/PEAR/System.php</b> on line <b>485</b><br />


Do somebody know whats wrong with my installation of pear?

thanks

Markus
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> File Formats All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement