PEAR installation fails

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PEAR installation fails

Postby jerrywalker3@gmail.com » 01. November 2007 00:05

:( Running clean install of XAMPP 1.6.4. Ran go-pear.bat. Get error message after responding with Enter afer the 8 item path list:
“Notice: unserialize(): error at offset 112….. in phar://go-pear.phar….”

This is immediately followed by:
“Fatal error: Call to undefined method PEAR_error::set<. In phar://go-pear….”
“Press any key to continue”
Can anyone give me some guidance about this? Ultimately, I want to use html_table.

:(
Jerry
jerrywalker3@gmail.com
 
Posts: 7
Joined: 31. October 2007 23:59

PEAR install solved

Postby jerrywalker3@gmail.com » 01. November 2007 15:20

I solved part of my problem after finding an August post. Search for "PEAR error on Config.php Line 1003 in Vista (solution)" Although it was labeled a vista issue, I found the same solution worked for XP.

Now my need is to update PEAR. When I ran the pear install html_table i got a message telling me installer v 1.5.0 was required. I downloaded 1.6.2 but don't know how to apply it. tried copying the unzipped files into \php\pear\pear. That didn't work.

The browser approach, which I though would get the most recent version automatically, to the update downloaded 1.4.11. As aside that solution gave a fatal error at the end but seemed to have completed the job.

Any help? :?:
Jerry
jerrywalker3@gmail.com
 
Posts: 7
Joined: 31. October 2007 23:59

PEAR Install

Postby jerrywalker3@gmail.com » 01. November 2007 15:23

After submitting my prior response, I noticed I left out some info. I know (I think) that I have to run go-pear to do the update. My problem is that I do not know how to tell go-pear where the new files are located.
So, that may be the real issue here.

Thanks to anyone who can get me moving again.
Jerry
jerrywalker3@gmail.com
 
Posts: 7
Joined: 31. October 2007 23:59

PEAR Installer update

Postby jerrywalker3@gmail.com » 01. November 2007 15:33

:lol: Where would one go, if one knew what they were doing, to discover the "pear update pear" command?

I ran it successfully, then ran install html_table. I have not test html_table but the install did run.

Perhaps someone could take a few minutes to acknowledge my postings and clarify as appropriate.

Thanks to those who read my post even if you could not help.

Perhaps this post will help others. :? :? :? :?
Jerry
jerrywalker3@gmail.com
 
Posts: 7
Joined: 31. October 2007 23:59

Postby Wiedmann » 01. November 2007 15:56

Perhaps someone could take a few minutes to acknowledge my postings and clarify as appropriate.

You are right.

To clarify:
- "go_pear.bat" is to install a new PEAR, if there is no PEAR installation. Makes no sense in XAMPP, because you have PEAR.

- "pear.bat" is to maintance a current PEAR installation.

- Both commands doen't work in XAMPP in many situations...

Result:
- You can use the PEAR classes provided by XAMPP as is.

- Or my way, delete PEAR from XAMPP and install it from scratch (see PEAR manual).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

PEAR install

Postby jerrywalker3@gmail.com » 01. November 2007 16:52

Given that I seem to have succeeded with my venture to get html_table, I am going to, at least for now, leave my XAMPP setup as is. When I am looking for something to do, I will reinstall separately. Thanks for the advice.

It appears that a pear install places the item in a folder under php\pear. I presume that I then copy the item to my htdocs folder for execution. I haven't had time to confirm that yet.

I am new to php as of a year ago. Still learning a lot daily. Just discovered that PEAR had a practical meaning to me while reading a book on PHP/MySQL. I have discovered a whole new world of tools. I have read about the large numbers of downloads from the PEAR site. A brief scan of the classes did not immediately lead to an understanding, by me, of why I should be so interested. However, it did net me html_table which I am eager to experiment with. And, I will be looking into PEAR more in the next few days.

Thanks for taking the time to respond to me. Sometimes it is very frustrating trying to find answers to problems when all I want to do is work on my site implementation.
Jerry
jerrywalker3@gmail.com
 
Posts: 7
Joined: 31. October 2007 23:59

Postby Wiedmann » 01. November 2007 16:55

I presume that I then copy the item to my htdocs folder for execution. I haven't had time to confirm that yet.

No, because the directory "\xampp\php\pear" is in your "include_path".
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

HTML_table

Postby jerrywalker3@gmail.com » 02. November 2007 03:46

Today, I made my first test using html_table. did an example from a book, looked around internet. Am able to make it do some things thus far, columns, bground.

However, one issue that I have given up on for now. No matter how I structure the html_table() line, it does not render any parameters on the <table> line in the html. I wonder if I am encountering something to do with Apache on XP. Here is my code.

Thanks for anyones thoughts.


<?php

// Include the HTML_Table package

require_once 'includes/html/Table.php';

$attrib10 = array('width'=>'100%', 'border'=>'1', 'bordercolor'=>'#9900FF');
$table = new HTML_Table(attrib10);
//$table = new HTML_Table("border=\"1\"");

// Assemble the data in an array

$salesreport = array(
'0' => array("12309","45633","2005-12-19 01:13:42","$22.04","$5.67","$27.71"),
'1' => array("12310","942","2005-12-19 01:1<?php

?>5:12","$11.50","$3.40","$14.90"),
'2' => array("12311","7879","2005-12-19 01:15:22","$95.99","$15.00","$110.99"),
'3' => array("12312","55521","2005-12-19 01:30:45","$10.75","$3.00","$13.75")
);

// Create the table object

$table = new HTML_Table();

$table->setAutoGrow(true);

// Set the headers

$table->setHeaderContents(0, 0, "Order ID");
$table->setHeaderContents(0, 1, "Client ID");
$table->setHeaderContents(0, 2, "Order Time");
$table->setHeaderContents(0, 3, "Sub Total");
$table->setHeaderContents(0, 4, "Shipping Cost");
$table->setHeaderContents(0, 5, "Total Cost");
$hrAttrs = array('bgcolor' => 'silver');
$table->setRowAttributes(0, $hrAttrs, true);
$table->setColAttributes(0, $hrAttrs);

// Cycle through the array to produce the table data

for($rownum = 0; $rownum < count($salesreport); $rownum++) {
for($colnum = 0; $colnum < 6; $colnum++) {
$table->setCellContents($rownum+1, $colnum, $salesreport[$rownum][$colnum]);
}
}

//$table->altRowAttributes(1,null,array("class"=>"alt"));

//alternate row background between 2 colors
$attributes1 = 'bgcolor = #CCFFFF';
$attributes2 = 'bgcolor = #FFFF66';

$table->altRowAttributes(1, $attributes1, $attributes2);

// Output the data

echo $table->toHtml();

?> :?: :x :?
Jerry
jerrywalker3@gmail.com
 
Posts: 7
Joined: 31. October 2007 23:59

Postby Wiedmann » 02. November 2007 04:17

Code: Select all
 require_once 'includes/html/Table.php';

This must be "require_once 'html/Table.php';".

Or have you changed something in the XAMPP setup or files which I don't know?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

HTML_table

Postby jerrywalker3@gmail.com » 02. November 2007 08:11

finally found the/a solution to the issue.

the pathing was ok, although I found I was updating the wrong php.ini.

The fix occured when I used:
$tableStyle = array("border"=>10, "bordercolorlight"=>"red", "width"=>'80%', "cellpadding"=>1, "cellspacing"=>4);
$table = new HTML_Table($tableStyle);

I don't have the knowledge to understand why this works and all of the other documented methods did not. However, experimenting with it showed it to be reliable.

What say you?

Thanks for your invaluable help. 8)

I will not post on this item again.
Jerry
jerrywalker3@gmail.com
 
Posts: 7
Joined: 31. October 2007 23:59


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests