Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





PEAR Availability


I'm starting to look into PEAR, and it looks like there's some interesting
stuff in there. I'm wondering how much I can rely on it for a distributed
app. If I understand correctly, it's now included in the PHP distro, and
installed by default. What version did this start with? Is the default
installation just the base class, or are some of the packages included as
well? The tricky question is: does anyone have any idea of how commonly
it's installed? Do most hosting companies provide it? I know end users can
install it for themselves, but I have enough support issues without having
to hold users' hands on that.




View Complete Forum Thread with Replies

Related Forum Messages:
PEAR Availability On Web Hosts
Just wondering if anybody knew the availability of PEAR classes on most web hosts... i mean like if i write a script using say the PEAR db abstraction class, would most web hosts have the PEAR class installed and in the include_path so that my script would work?

View Replies !
PHP Availability Calendar
Do you guys know somewhere where i can find a script which creates a Calendar which can be controled via a database, so if a date is "occupied" then the date will be marked at BOOKED.

View Replies !
Availability Checker
I'm trying to build a site for Broadband and I am wanting to put a Broadband availability checker on my site like alot of other site have, However i am quite  new to PHP. Could someone point me in the right direction as how to go about producing the above?

View Replies !
Availability Calendar
where I could get a PHP based availability calendar for a holiday apartment website? I currently have the calendar as a html tables based affair that is updated via DW, but I am trying to migrate the site to PHP and wish to introduce a web based calendar that can be updated online.

I am looking for something similar to http://www.lanzarotebreaks.com/vill...ar.php/3882.htm that displays in a table format
but is controlled by PHP/MySQL, would like it to have online admin functionality. Am willing to learn how to handcode one if there are any good tutorials. Any help is gratefully received.

View Replies !
Availability Script
i have a number of villas in spain but id like to be able to show there availability online to prosepctive clients to cut down on wasting there time when a particular villa is not available!

i need to be able to show booked and available periods from anything from 1 day to two months, does anyone know i way i could do this, are there any ready made scripts out there doing this.

View Replies !
Varying Availability Of Libraries
I'm having problems connecting to postgres via php.  Error message = 'undefined function' when I make the call to pg_connect.  I have modified the php.ini file to enable the extension=php_pgsql.dll line.  The .dll in question exists in both windows and the defined php extensions directory.  I have confidence that the php.ini file in question is the one in use by Apache (if I rename, everything bombs). Code:

View Replies !
Writing Pseudo For Availability
creating an online store for a project in on of my classes. I've searched around and cant really find how to create some availability scripts. How can I create a script to check our database on whether certain things are available? Any suggestions? Just asking for a good starting point.

View Replies !
Checking For Amazon Availability
Rather than reinvent the wheel, I was wondering if anyone had a tried and true and fast way of checking a string containing availabilty information for an Amazon request.

View Replies !
Checking The Availability Of A Domain
I want to know whats the best way to check if a domain is available or not for registeration? Is there a recommended class i should use or is it easy to code myself?

View Replies !
Check Availability Button
I have a form that accepts user info. I want to create a button that enables the user to check for the availability of the username entered before continuing with the rest of the form. I have tried using the button onclick to call a JS function. The JS function have codes to compare the username with database select.

View Replies !
Date Columns Availability
I done an availabilitycheck that until now seems to work just perfect, except 1 problem. For exampel in the database if I have an booking in datecolumns llegada and salida dates 25/11 and 15/12, I would like the days 25/11 and 15/12 to be marked as available. This is the code I have:

$result = mysql_query ("SELECT llegada, salida, propiedad from bookings where ( propiedad = '$propiedad' )
AND (('$llegada' BETWEEN llegada AND salida) or ('$salida' BETWEEN llegada AND salida) or (llegada < '$llegada' AND salida > '$salida') or (llegada > '$llegada' AND salida < '$salida'))", $dbh);

In this piece of the code this is what I would like to do but don´t work:
('$llegada' BETWEEN llegada AND salida-1) or ('$salida' BETWEEN llegada-1 AND salida)

View Replies !
Calender - Availability Chart
I have availability on my site in an calendar and I manually introduces if available for that day or not. But I want to do it autmatically. At the moment I have the reservations in an database table, I have arrival in one column and departures in another column, both date types.

View Replies !
Redirection And Server Availability
I have two servers, one hosted and one local. My local server uses dynamic dns and I am trying to write a script on my hosted server that will check to see if my local server is accessible. If it is accessible I would like the script to do a browser redirect to my local server. If the connection can't be made I would like the script to be in the header of an index page on the hosted server or redirect to a valid page one the hosted server. From what I've found on the net it should be possible using socket() but am not sure how to go about it.

View Replies !
Check Room Availability System
I am super new to php/mysql etc. i am just trying to do a room availability system.
I have 5 rooms in 5 different category. i like to know how to design a DB and write a php that takes two different dates[checkin date / checkout date] and verifies the DB for availble rooms.

View Replies !
Ajax Script To Search Domain Name Availability In Php
hai friends can any one of you do my favour and send the script to
"search domain name availability in php using ajax"

View Replies !
Checking Room Availability For Hotel Booking System
I was wondering if anyone could help me with a problem I'm having.
I've been using Dreamweaver to create a hotel booking system for a
friend of mine, using MySQL (version 4.0.21) and PHP 5. The bit I'm
struggling with is checking the Room Availability based on dates that
are typed into a textfield and then returning a list of the available
rooms on the next page.

The three tables involved in this function are:

CREATE TABLE `room` (
Room_Number tinyint(1) UNSIGNED NOT NULL,
Price_Double_per_Night decimal(5,2) NOT NULL,
Price_Twin_per_Night decimal(5,2) NOT NULL,
Price_Single_per_Night decimal(5,2) NOT NULL,
Price_Double_per_Week decimal(5,2) NOT NULL,
Price_Twin_per_Week decimal(5,2) NOT NULL,
Price_Single_per_Week decimal(5,2) NOT NULL,
PRIMARY KEY(`Room_Number`),
)
TYPE=InnoDB
ROW_FORMAT=fixed;

CREATE TABLE `room_booking_link_entity` (
Room_Number tinyint(1) UNSIGNED NOT NULL,
Room_Booking_ID int(11) NOT NULL,
Single_Double_Twin enum('Single','Double','Twin') NOT NULL,
PRIMARY KEY(`Room_Number`, `Room_Booking_ID`),
INDEX `Room_Number`(`Room_Number`),
INDEX `Room_Booking_ID`(`Room_Booking_ID`),
FOREIGN KEY `Reference_14`(`Room_Number`)
REFERENCES `room`(`Room_Number`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
FOREIGN KEY `Reference_85`(`Room_Booking_ID`)
REFERENCES `room_booking`(`Room_Booking_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
TYPE=InnoDB
ROW_FORMAT=fixed;

CREATE TABLE `room_booking` (
Room_Booking_ID int(11) NOT NULL AUTO_INCREMENT,
Customer_ID int(11) NOT NULL,
Bill_ID int(11) NOT NULL,
Date_of_Arrival date NOT NULL,
Date_of_Departure date NOT NULL,
Number_of_Nights tinyint(3) NOT NULL,
Date_Booking_Made date,
Status_of_Booking enum('Booked','Arrived','Departed') NOT NULL,
Total_Cost decimal(7,2) NOT NULL,
PRIMARY KEY(`Room_Booking_ID`),
INDEX `Room_Booking_ID`(`Room_Booking_ID`),
INDEX `Customer_ID`(`Customer_ID`),
INDEX `Bill_ID`(`Bill_ID`),
INDEX `Date_of_Arrival`(`Date_of_Arrival`),
INDEX `Date_of_Departure`(`Date_of_Departure`),
INDEX `Status_of_Booking`(`Status_of_Booking`),
FOREIGN KEY `Reference_03`(`Customer_ID`)
REFERENCES `customer`(`Customer_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
FOREIGN KEY `Reference_14`(`Bill_ID`)
REFERENCES `bill`(`Bill_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
TYPE=InnoDB
ROW_FORMAT=fixed;

I've just discovered that MySQL 4.0.21 does not support subqueries.
I'm basically stuck with this version of MySQL. I think I've got
round the subquery problem by using a multi query option as follows:

1.Create a temptable that will store all of the room numbers that
have bookings for the particular dates requested as follows:

SELECT DISTINCT a.room_number INTO temptable
FROM booking_link_entity AS a INNER JOIN room_booking AS b
WHERE b.departure_date >$_POST[‘ARRIVAL'] And b.arrival_date <
$_POST[‘DEPART'];

2.Left join this with the room table and pull out rows with no match

SELECT a.room_number, b.room_number
FROM room AS a LEFT JOIN temptable AS b ON a.room_number=b.room_number
WHERE b.room_number IS NULL;

3.Delete temp table

I've tried doing this in Dreamweaver, but to no avail. I have a
feeling it is too complex for Dreamweaver.

My php knowledge is very basic and was wondering if anyone could give
me some pointers as how to do this in PHP?.

View Replies !
PEAR Newbie Trying To User PEAR DB And Falling At The First Hurdle
I've just installed PEAR on my local machine and all is well, updated
the include_path to point to my PEAR dir. So, when I just try to make
a simple connection like so the script just seems to stop but no error
messsages. I do get error messages normally (ie. when I can a method
from an object that doesnt actually exist) as I have set...

View Replies !
Pear Shaped PEAR
I read about PEAR in here a few days ago and thought I would give it a try
but I have got myself in a mess with the installation. I have found some
guides but they seem to move swiftly on from installation and get down to
using it.

I am using PHP 5.2.3 which came with NuSPhere PhED and is installed under...

View Replies !
Go-pear.bat:okay - Pear.bat Error - 5.2.4
first attempt at PEAR installation: PHP 5.2.4 - WinXP Sp2 - Apache 2.2

the Initial instruction, post-installation [local, vs system-wide] tells me (not verbatim) "...old version found... remember to use ./php/pear.bat instead...."

hence, the following command. note the feedback. Code:

View Replies !
To PEAR Or NOT To Pear?
This is just a discussion type post, I'm interesed to know your opinion and experiance with Pear Libraries, I have used some Pear libraries a while back, but not enough to form an opinion wheather it is worth it or not. Some of the question I have is scalability and performance specs, and if I ever have to switch hosts do I need to make sure they have the same version or are they usualy backward compatible... so to Pear or Not to Pear that is the question?

View Replies !
PEAR DB Help
I am currently running Windows XP Pro with PHP 5.2 and MySQL 5.0 installed. My remote server is a UNIX system with PHP 5.1 installed and MySQL 5.0 installed. Here is the code I'm trying to run:

// Load up the PEAR DB class //
$this->mysql = DB::connect(sprintf("%s://%s:%s@%s/%s", TYPE, USERNAME, PASSWORD, HOST, DATABASE));
echo "hello";

On my computer it works perfectly fine, returns a db_mysql class and no errors. On my server it does nothing. I put echo "hello" there as a test, and when I run the script I don't even see "hello" get printed to the screen, for some reason it's just screwing the entire script up. I checked the USERNAME, PASSWORD, etc. values against the ones I have in CPANEL and they match. Does anyone know what might be causing this problem?

View Replies !
Help For Pear
where can i find some sample code for PEAR. i have pear manual but it
is not sufficient to get all details of how PEAR work.

View Replies !
What Is PEAR? What's It Do?
What is PEAR? What's it do? What's it useful for?

View Replies !
OOP And Pear::DB
I am currently working on a PHP application which I am using as a
personal learning environment for getting a better working
understanding about how to tackle application development in an OOP/MVC
pattern fashion.

I am using PEAR::DB to create database connection objects, and my major
question concerns where these objects should be created.

For example: Let's say I have a login application that that has a
controller-like script that looks something like this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// login.php
<?php
require_once('User.class.php');

$user = new $User;
$user->getAdminRights();
?>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

....and a model-like User class that looks something like this: (The
important note is that I may need to load data multiple times from a
database.)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// User.class.php
<?php

class User
{
public $user_name;
public $user_id;
public $admin_rights = array();
protected $db_connection;

function __construct()
{
if (!this->db_connection){
require_once();
$this->db_connection = DB::connect(DB_DSN);
}

$sql = "SELECT USERNAME, USER_ID FROM SOME_TABLE...";
$result = $this->dbh->getAll($sql, array($this->request_id);
$this->user_name = $result['USERNAME'];
$this->user_id = $result['USER_ID'];
}

function getAdminRights()
{
$sql = "SELECT * FROM SOME_TABLE WHERE ADMIN_ID = ?";
$this->admin_rights = $this->dbh->getAll($sql,
array($this->user_id);
}

}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View Replies !
Pear
kann somebody tell me what i do wrong?

i write this little script:
<?php
include_once "DB.php";
// Example:

echo "Hi";
?>

then, i have the first page von "go-pear"

View Replies !
PEAR: Is It Really Necessary?
I've been using PHP for a while now but I haven't actually used PEAR. I
have just read half a chapter in a book, it sounds alright but haven't
actually used it. I was just wondering, is it really necessary to use
PEAR? I usually get things done using PHP/MySQL. I don't know if I'm
really missing out on something by not using PEAR. How highly is it
recommended? On most job ads, i don't even see them mentioning PEAR.
They mostly just say PHP/MySQL.. Why is that? Don't people like PEAR
much?

View Replies !
Php --without-pear
Lately I started to "bravely fight" with Postfix + Squirrelmail
everything works great (PHP also :))
but I want to have possibility to change passwords
(from MySql database) through the webside
SM has a plugin (change_sqlpass) - but it needs Pear DB installed

[root@kompik ~]# rpm -q php-pear
php-pear-1.4.9-1.2
[root@kompik ~]# rpm -q php-pear-DB
php-pear-DB-1.7.6-6.fc5

and as You see I installed it ...
but .....
PHP has no PEAR handling installed
i checked through phpinfo()
and there are Configure Commands and unfortunatelly
there is also '--without-pear'
I installed everything without to many combination
using rpm-s so now i don't really know howto
recompile php without this option ...
i prefer not to uninstall php and compile it
by myself because i would have to uninstall lots
of other stuff ..
Does anyone know any solution for my problem ?

View Replies !
To Pear DB Or Not To Pear DB?
i'm developing a small web app for a non-profit i'm affiliated with and i'm not sure if i want to use the pear DB abstraction layer or not. i've got a simple page currently developed w/o it, so all my database calls are using MySQL specific functions.
i know that using the pear DB is good if, say, we end up changing databases down the road, but i highly doubt we will.

i mean, MySQL isn't going anywhere, right? anyhow, i just simply don't like pear DB. maybe the fact that it took me a friggin hour to install it has something to do w/ that. also, i'm re-writing the simplest of code using DB functions and i'm having a hell of a time, probably b/c i have nothing but a cheesy pear manual to go by.

View Replies !
A DB.php PEAR
I am preparing a few PHP scripts conversion to registerglobals=Off And presently testing a new login script that requires PEAR I tested it on my local RH and it works fine in both configurations (with registerglobals On or Off) But on a production server that I do not manage it does not work.

And does not display anything (Blank screen)In order to narrow down the problems I used
<? Error_reporting (E_ALL) ;?> Which shows that my “require” for DB.PHP class does not find it. How can I find if PEAR is made available? And if it is. Is the directory that contains the PEAR files included in my include_path in my php.ini. And if so do I have to provide a path?

View Replies !
PEAR: Yes Or No
Some PEAR packages seam really cool but I worry about my code starting to be too *dependant* on PEAR if I start using it. You know, the way it handles errors, etc. What are your thoughts? Recommendations?

View Replies !
Using PEAR
im not getting into using pear but i have a problem, im not sure how it works exactly i have read the website but i contacted my shared server host they say:

Please note that the path to pear package on the server is:

/usr/local/lib/php/

but not sure how to incorporate that in scripts do i need to include a certain file?

View Replies !
PHP 5 And PEAR
I've been using PHP for a while now - and have recently been trying to set up PHP, MySQL and Apache on Windows (for a client). It seems like all the PEAR stuff under PHP 5 doesn't work out of the box. It took me a while to track down the go-pear.bat file in the root - what with all the other garbage in there. Shouldn't this file get at least a mention in:

install.txt and /PEAR/go-pear.php

The installation instructions in /PEAR/go-pear.php for Windows seem rather out of date - and sent me off in totally the wrong direction :-

(
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.

View Replies !
All Pear
I'm using a prepare and execute sql statement. I'm curious if there is a getAll() function that can be used with the execute. Not sure if this would be advantageous if it existed, but I was thinking to try it if I could.

View Replies !
What Is PEAR?
What is the use of PEAR? How can I get it working with localhost IIS

I am using PHP Version 4.3.2
Server API CGI/FastCGI
I've a PEAR directory in c:/php4/includes/pear
whenever I enable it in php.ini, I get errors in my php applications e.g.,

Fatal error: main(): Failed opening required 'mainfile.php' (include_path='C:php4includespear') in C:Inetpubwwwroot
ukehtmlincludescounter.php on line 25

other examples of error:

Fatal error: main(): Failed opening required 'PEAR.php' (include_path='.;../phpwebsitelibpear') in C:InetpubwwwrootphpwebsitelibpearHTMLTemplateIT.php on line 22

Warning: main(): Failed opening '/path/to/xoops/directory/include/common.php' for inclusion (include_path='.;c:php4pear') in C:Inetpubwwwrootxoopshtmlmainfile.php on line 60

View Replies !
PEAR DB
is when no row is found:

$what = $db->getOne("SELECT field FROM table WHERE 1=2");
if($what=="") echo "emptystring";
if($what==false) echo "false";
if($what==NULL) echo "null";
echo $what;
echoes "emptystringfalsenull".
$id = $db->getOne("SELECT id FROM table WHERE condition='fulfilled');
// this one?
if($id=="") do_something();
// or this one?
if($id==false) do_something();
// or that one?
if($id != NULL) do_something();

else do_something_else($id).

View Replies !
PEAR Questions
Can someone explain to me exactly what PEAR is?

I've been looking around for different html modules/classes and it keeps coming up, but I can't find anything that actually explains what it's all about.

Also, is there a complete list of "PEAR" modules anywhere, organised in one place?

View Replies !
Pear Madness
I'm trying to install the HTTP_Request package but I get this error:

----------------------------
root@host [~]# pear install
http://pear.php.net/get/HTTP_Request-1.3.0.tgz
downloading HTTP_Request-1.3.0.tgz ...
Starting to download HTTP_Request-1.3.0.tgz (13,808 bytes)
......done: 13,808 bytes
requires package `Net_Socket' >= 1.0.2
-----------------------------

So naturally I went to install Net_Socket 1.0.6:

-----------------------------
root@host [~]# pear install
http://pear.php.net/get/Net_Socket-1.0.6.tgz
downloading Net_Socket-1.0.6.tgz ...
Starting to download Net_Socket-1.0.6.tgz (4,623 bytes)
......done: 4,623 bytes
Net_Socket already installed
------------------------------

What's going on? Pear won't let me upgrade Net_Socket. Has anyone ever
ran into this problem before?

View Replies !
PEAR Doesn't Seem To Be Working
I installed PHP with PEAR support on my Windows computer. I tried the
snippet of the book "Learning PHP5":

<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);
echo "test";
include 'DB.php'
$db = DB::connect('mysql://penguin:top^hat@db.example.com/restaurant');
if (DB::isError($db)) { die("Can't connect: " . $db->getMessage( )); }
?>

But it only prints "test", it should display an error message saying
it's not able to connect to the DB. Do you know why nothing happens?
Also, I think there should be a real "DB.php" file, correct? What
should I put into this file? Or is it only a line "as is", that doesn't
mean there needs a "DB.php" file?

View Replies !
PEAR/Info.php
I tried to use Example 49-1. Using PEAR_Info

This is not showing PEAR installation information on local/remote server.
What I see local, I've no file Info.php in package PEAR in PEAR directory.
I've installed PEAR, why this file is missing?

My Web host say, they've installed PEAR, and I can use PEAR.

View Replies !
Help On Pear Modules
First of all, I'm not a very seasoned programmer. It's just a hobby grown
out of control.

For a project I am working on I need to be able to send and receive e-mail.
I wrote some code for this myself, but that is just not quite good enough.
So I did a little research and found the Pear modules. I installed all the
Pear modules that I am supposed to need, but I don't understand the
documentation.

Could someone please explain to me how I am supposed to compose, send,
receive and identify the various parts of an incoming e-mail? I am, of
course, in full control of the mailsever.

View Replies !
Must I Still Use Addslashes With PEAR DB?
I now use the DB classes from PEAR with mysql. Do I still have to use
addslashes? I ask, because I get some very strange results, I get slashes in front of every " and they get saved in my database.

Now my hoster has turned magic_quotes_gpc on anyway. As a workaround:
On a PHP-environment where magic_quotes_gpc is turned on, can I do
stripslashes on every request-data without danger?

Or what is the recommended way to safely insert request-data into
mysql with PEAR?

View Replies !
Emails & PHP / PEAR ?
Ive found this nifty script that does what I want - in PEAR.. (to send emails)

However i'm getting an error.. - Can anyone advise a suitable course
of action to correct this :-

View Replies !
PEAR Server Down?
I am unable to reach PEAR server. Here is the error message:

# pear upgrade-all
XML_RPC_Client: Connection to RPC server pear.php.net:80 failed. Connection timed out

View Replies !
Pear XML Serializer
I'm trying to run a script that uses the XML Serializer package but I
get this error:

[Mon May 15 13:14:24 2006] [error] PHP Fatal error: Call to undefined
function: sethandlerobj() in /usr/local/lib/php/XML/Unserializer.php
on line 852

I reinstalled the package just to be sure but no luck. I didn't edit
the file so I don't know why this is happening. Anybody know what's up?

View Replies !
Mysql_num_fields To PEAR
Anyone know how to handle the while and for loops with PEAR in the code
below??

// ----------------------------------------------------------------

$result = mysql_query("SELECT bus_price FROM cf where name='$name'",
$connect);

while ($row = mysql_fetch_row($result)) {
for ($i = 0; $i < mysql_num_fields($result); $i++) {

/*
Hunt down instances of newline breaks and text spaces in blob field of
database and replace with HTML linebreak and HTML spaces...
*/

$replace = str_replace(" ", "&nbsp;", $row[$i]);
$replace = nl2br($replace);

echo
"<font face = "arial, helvetica, sans-serif" size ="2">
<b>Price:</b>
<br>" . $replace . " ";

}
}

// ----------------------------------------------------------------

View Replies !
Is PEAR DB Worth Using?
Is PEAR DB worth using?
Slower?
Other problems?
Or should a person just wrap db functions in a user-defined class?

View Replies !
Use The Pear Db Feature In Php
I am TRYING to use the Pear db feature in php to build a signon script. I am on PHP 4.2.1, APACHE 1.3.26 AND MYSQL On Win ME. While executing the db connect function( "require_once db.php" )it gives an error, "Undefined Class Name 'db' in SCRIPT blah blah. The script looks like this: Code:

View Replies !
PEAR DB 1.6.0 Has Been Released
[This has be cross-posted. Be careful when following up, please.]

Greetings:

Crack open the beer, PEAR DB 1.6.0 is here! (Hey, I'm a bit giddy
with excitement that my intense work during the past seven weeks
has come to fruition.)

For those unfamiliar with PEAR DB, it's a package of PHP classes
that provide an object oriented API with common methods of accessing
thirteen of PHP's database driver extensions:
dBase, FrontBase, InterBase, Informix, mSQL, MS SQL Server,
MySQL, Oracle, ODBC (tested with DB2 and Access), PostgreSQL,
SQLite and Sybase.

Key links for PEAR DB:

Download: http://pear.php.net/get/DB
Change Log: http://pear.php.net/package-changelog.php?package=DB
Manual: http://pear.php.net/manual/en/package.database.php
Home Page: http://pear.php.net/package/DB

Notable changes since 1.5.0RC2 include:

* New portability features, making it possible to write
applications which can be easily ported between DBMS's.

* Tons of bug fixes, making the package actually work for more
than just MySQL systems.

* Improved error reporting.

* Getting prepare/execute to work the same way for all DBMS's
and allow escaping of placeholder characters.

* Deploying tableInfo() in more drivers and officially moving
it from DB_result to DB_common. See the documentation for
proper usage.

* Making the test suite simpler to use and work on both
windows and *nix platforms.

* Various optimizations, several of which were uncovered
using Zend Studio's Code Analyzer.

* Countless documentation corrections.

* Full PHP 5 compatibility.

* Requiring PHP to be at version 4.2.0 or higher.

* Deprecating quote() and quoteString().

If you're one of the lucky few people using PHP's mysqli extension,
do note that the DB file/class has been renamed from mysql4 to mysqli,
but the online documentation won't reflect this modification until
they're rebuilt on Sunday. Similarly, there are a few other features
and documentation bugs that won't show up there until then either.

View Replies !
PEAR::Config
I'm writing a little app for my personal use and want to store the
configuration data in an xml file. I found PEAR::Config that lets
me read the config data into my app. But so far, I haven't figured
out how to get modifcations back to the xml file.

Here's what I've got so far. I ran across this basic code in an article
at DevShed.

<?php
require_once 'Config.php'

$conf = new Config;
$root =& $conf->parseConfig('/usr/local/apache/myapp.xml', 'XML');

if (PEAR::isError($root)) {
die('Error while reading configuration: ' . $root->getMessage());
}

$settings = $root->toArray();

printf('User settings<br>');
printf('=============<br>');
printf('dbhost: %s<br>',$settings['root']['connect']['dbhost']);
printf('dbuser: %s<br>',$settings['root']['connect']['dbuser']);
printf('dbpass: %s<br>',$settings['root']['connect']['dbpass']);
printf('dbname: %s<br>',$settings['root']['connect']['dbname']);

$conf->writeConfig('/usr/local/apache/myapp.xml', 'XML');
?>

What I want to able to do is modify the values in the settings array (not
the problem) and the write them back out to the xml file.

I understand that it takes all the data from the root level and assigns it
to an array called $settings. What I'm having trouble with is getting
$settings back to the file.

Has anyone else used PEAR::Config doing this sort of thing?

View Replies !
Upgrading PEAR
I see some references to this on the web but I can not find a
specifically what the fix is - please, I need to know specifically what
I do to fix it.

I'm using win2k. Here's the error message I get when I try go-pear.bat,
I upgraded from PHP4 to 5, seems to all work except for PEAR:

Unknown(): (null): Unable to initialize module
Module compiled with module API=20040412, debug=0, thread-safety=1
PHP compiled with module API=20020429, debug=0, thread-safety=1
These options need to match
Edit/Delete Message

View Replies !
PEAR Conflict
Iam running a server and PEAR is compiled with PHP. Before some days I have
upgraded PHP from 4.3.4 to 4.3.7 using Apache update from WHM (cPanel). This
went well but after that one client contacted me to tell me that he have
problems with showing some variables. The thing is that he told me that he is
using his own PEAR installation in his web hosting account !

This is part of the code which had a problem:

$ID_rubrike =$row[ID]; //THIS VARIABLE NOT SHOWING

$ID_stranice =$row[ID_stranice]; //THIS VARIABLE NOT SHOWING

$tip_vijesti =$row[$naziv_tablica];//THIS VARIABLE WORKING OK

Problem was found but it is weird. In his configuration od DB.php file following
value was changed :
define('DB_PORTABILITY_LOWERCASE', 0); This value was somehow set to "1" so "ID"
was watched as "id"

Then he change it back to "0" and it is OK now. I inspect server's PEAR
installation under PHP and found that this value default is "1" . But it seems
that his scripts are using his PEAR installation and not server PEAR.

View Replies !
Email Using PEAR
I am running Red Hat 8.0 and have pear enabled in PHP. I have installed
the Socket.php in the PEAR Net/ directory. When I run this test script
It displays the "Mail has been sent message" but no mail arrives in my box.

It was suggested by a friend that using PEAR was easier than setting up
sendmail on my box.

David

<?php
include("Mail.php");
$recipients = "davidwright@sympatico.ca";
$headers["From"] = "myaddress@host.com";
$headers["To"] = "myaddress@host.com";
$headers["Subject"] = "Test message";
$body = "TEST MESSAGE!";
$params["host"] = "smtp.server";
$params["port"] = "25";
$params["auth"] = true;
$params["username"] = "user";
$params["password"] = "password";

// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory("smtp", $params);

$mail_object->send($recipients, $headers, $body);

echo "Mail has been sent!";

?>

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved