How can I configure php5.4.17 to support pear running?

Source: Internet
Author: User
Tags xsl file
How can I configure php5.4.17 to support pear running? Php PHP5 pear

Apache2.2 + php 5.2.17 was used in the past. due to the recent increase in users, php code occupies a high system load. Therefore, we wanted to upgrade php to the latest version of 5.4.17. we originally hoped that 5.4 could improve code performance, help me solve my urgent needs for the moment!
However, it is found that 5.4 is incompatible with 5.2 in many places, and the functions used in 5.2 cannot run in 5.4! I am sad!

Perform the following operations when installing pear:
Cd php/php go-pear.pharpear list -- normal execution


For example, the original export excel pear Library: Spreadsheet_Excel_Writer-0.9.3, installed 5.4 found that the default does not contain pear installation package, after the installation of pear, the export excel function can not run. Inexplicably, the following error was reported:
Warning: require(../../inc/conn.php): failed to open stream: No such file or directory in C:\wwwroot\excel.php on line 2PHP Fatal error:  require(): Failed opening required '../../inc/conn.php' (include_path='.;C:\php\pear') in C:\wwwroot\excel.php on line 2Fatal error: require(): Failed opening required '../../inc/conn.php' (include_path='.;C:\php\pear') in C:\wwwroot\excel.php on line 2


The export code can run normally in Version 5.2, but version 5.4 makes me confused !~
If you have encountered such a problem, please help me solve it! Thank you!


Reply to discussion (solution)

You may have to discard pear, or you just quit php5.3 or later.
Php upgrades are too fast and many restrictions are imposed on itself.
The contributors of pear do not have the energy to keep up with the pace of php change, or they simply do not agree with the php change.

You may have to discard pear, or you just quit php5.3 or later.
Php upgrades are too fast and many restrictions are imposed on itself.
The pear contributors did not have the energy to keep up with the pace of php change, or they simply did not agree with the amount of php change. The problem was so serious ..
I am currently using 5.2.17 performance may not be able to keep up, and urgently need to optimize. Otherwise, I will not change the version ~

Could you tell me how to export an excel file by using php? Pear is used because it has the excel export Class Library Spreadsheet_Excel_Writer, which has a good performance. the phpexcel class used in the past has a poor performance, and the csv format cannot meet the needs !~
If you have a good excel export method, I am very grateful !!~

If you only need the Spreadsheet_Excel_Writer class, copy it and related files.
However, if there are not many errors reported in php5.4, you can use it again.

If you only need the Spreadsheet_Excel_Writer class, copy it and related files.
However, if there are not many errors reported in php5.4, you can use it again.

I have tried to copy this class library to the site directory. version 5.4 still does not respond to the error log of opening php. ini and does not output any problems. it is only executed in the php installation directory.

Php c: \ wwwroot \ excel. php will output the above error !~

I have to do it now. Can the moderator use other excel export methods ?! Thank you!

System. php
Function tmpdir () is changed to static function tmpdir ()

OLE. php
Change function Asc2Ucs ($ ascii) to static function Asc2Ucs ($ ascii)
Function LocalDate2OLE ($ date = null) to static function LocalDate2OLE ($ date = null)

Worksheet. php row 2490
$ This-> _ append (& $ string, true); changed to $ this-> _ append ($ string, true );

This should be done. if there is still an error, the error message will be displayed in the generated xsl file.

System. php
Function tmpdir () is changed to static function tmpdir ()

OLE. php
Change function Asc2Ucs ($ ascii) to static function Asc2Ucs ($ ascii)
Function LocalDate2OLE ($ date = null) to static function LocalDate2OLE ($ date = null)

Worksheet. php row 2490
$ This-> _ append (& $ string, true); changed to $ this-> _ append ($ string, true );

This should be done. if there is still an error, the error message will be displayed in the generated xsl file.

Thank you for trying it out ~

System. php
Function tmpdir () is changed to static function tmpdir ()

OLE. php
Change function Asc2Ucs ($ ascii) to static function Asc2Ucs ($ ascii)
Function LocalDate2OLE ($ date = null) to static function LocalDate2OLE ($ date = null)

Worksheet. php row 2490
$ This-> _ append (& $ string, true); changed to $ this-> _ append ($ string, true );

This should be done. if there is still an error, the error message will be displayed in the generated xsl file.
Ah, I tried it and it still didn't work !~ No error reported ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.