How to post a blog entry via e-mail?
PHP web-programming
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PHP web-programmingGo to page: « previous | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | next »

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:
Friday, 19 January 2007
Conditional Select Dan Shirah 23:33:46
 I have a page that shows all outstanding tickets, what I'm trying to have it
do is let users search by several categories. I want to be able to filter
the results based on the user input.

For instance, say I have an employee that wants to find ticket #2. He
enters "2" in the Request ID field and also enters "01/01/06" in the Date
Requested field. How would I return the ticket that matches both Request ID
and Date Requested fields? I have been able to return a result with only 1
search criteria entered, but get no results with more than 1.

Below is the code I am working on.

else {
/* if the "submit" variable exists, the form has been submitted - look for
and process form data */
// display result
$request_id = $_POST['request_id'];
$date_entered = $_POST['date_entered'];
$status = $_POST['status'];
$request_type = $_POST['request_type'];


?>
<form name="submitForm" action="<?php echo $_SERVER['PHP_SELF']; ?>"
method="post">
<table align="center" width="780" cellpadding="2" cellspacing="2"
border="0">
<tr>
<td width="185" align="right"><span­ class="smallbold">R­equest
Id:</span></td>
<td width="128" class="tblcell"><in­put type="Text" value="<?php echo
$_POST['request_id']; ?>" name="request_id" size="8" maxlength=""></td>
<td width="187" align="right"><span­ class="smallbold">D­ate
Entered:</span></td­>
<td width="254" class="tblcell"><in­put type="Text" value="<?php echo
$_POST['date_entered']; ?>" name="date_entered"­ size="15" maxlength=""></td>
</tr>
<tr>

<td width="185" height="27" align="right"><span­
class="smallbold">S­tatus:</span></td>
<td width="128" class="tblcell"><in­put type="Text" value="<?php echo
$_POST['status']; ?>" name="status" size="8" maxlength=""></td>
<td width="187" align="right"><span­ class="smallbold">R­equest
Type:</span></td>
<td width="254" class="tblcell"><in­put type="Text" value="<?php echo
$_POST['request_type']; ?>" name="request_type"­ size="15" maxlength=""></td>
</tr>
</table>
<FORM ACTION="a href="javascript:cl­earForm()" METHOD="POST"
name="logoutform">
<table align="center" border="0" cellpadding="0" cellspacing="0"
width="780">
<tr>
<td colspan="2">
<input type="submit" name="submit" value="Search">&nbs­p;
<input type="submit" name="reset" value="Reset">
</td>
</tr>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0"
width="780">
<tr><td>&nbsp;</td>­</tr>
<tr>
<td height="13" align="center" class="tblhead"><di­v
align="center"><str­ong>Process
Payments </strong></div></td­>
</tr>
<tr>
<td colspan="6"><hr color="#006600" /></td>
</tr>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0"
width="780">
<tr>
<td width="88" height="13" align="center" class="tblhead"><di­v
align="center">Requ­est
ID </div></td>
<td width="224" height="13" align="center" class="tblhead"><di­v
align="center">Date­/Time
Entered </div></td>
<td width="156" height="13" align="center" class="tblhead"><di­v
align="center">Stat­us</div></td>
<td width="156" height="13" align="center" class="tblhead"><di­v
align="center">Requ­est Type </div></td>
<td width="156" height="13" align="center" class="tblhead"><di­v
align="center">Last­ Processed By</div></td>
</tr>
</table>
<?php
$database = "database";
$host = "host";
$user = "username";
$pass = "password";
// Connect to the datbase
$connection = mssql_connect($host­, $user, $pass) or die ('server
connection failed');
$database = mssql_select_db("$d­atabase", $connection) or die ('DB
selection failed');
// Query the table and load all of the records into an array.

**Note my SQL statement below, can I break in and out of PHP like this to
verify if multiple variables are set?*
*
$sql = "SELECT
child_support_payme­nt_request.credit_ca­rd_id,
credit_card_payment­_request.credit_card­_id,
date_request_receiv­ed
FROM child_support_payme­nt_request,
credit_card_payment­_request
WHERE child_support_payme­nt_request.credit_ca­rd_id =
credit_card_payment­_request.credit_card­_id" ?>
<?php if ($request_id !== '') {
"AND credit_card_payment­_request.credit_card­_id = $request_id"
}
?>
<?php if ($dateTime !== '') {
"AND date_request_receiv­ed = $dateTime";
}
?>
<?php
$result = mssql_query($sql) or die(mssql_error());­
echo "<table width='780' border='1' align='center' cellpadding='2'
cellspacing='2' bordercolor='#00000­0'>";

while ($row = mssql_fetch_array($­result)) {
$id = $row['credit_card_id'];
$dateTime = $row['date_request_received'];
echo "<tr>";
echo "<td width='88' height='13' align='center' class='tblcell'><di­v
align='center'>$id<­/div></td>";
echo "<td width='224' height='13' align='center' class='tblcell'><di­v
align='center'>$dat­eTime</div></td>";
echo "<td width='156' height='13' align='center' class='tblcell'><di­v
align='center'>Open­</div></td>";
echo "<td width='156' height='13' align='center' class='tblcell'><di­v
align='center'>Paym­ent Type</div></td>";
echo "<td width='156' height='13' align='center' class='tblcell'><di­v
align='center'>Last­ Processed By</div></td>";
echo "</tr>";
}
echo "</table>";
?>
<?php } ?>
comment 1 answer | Add comment
What makes a PHP expert H 22:16:27
 Dear All



I often see job ads asking for a PHP expert and was wandering what you all thought makes a PHP programmer into an expert.



what would you mark out as the key skills that distinguishes an expert from the ordinary i.e. OOP mastery, regular expressions etc.



p.s. I am not an expert but am intersted to see if i could become one!
comment 9 answers | Add comment
[PHP-DEV] CVS Account Request: jamek6 David Jamka 22:01:59
 For Translating the documentation

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Beginner Question Rob 21:50:33
 I am a newcomer to PHP and I am looking for an intsallation package similar
to to FoxPro for MAC OSX 10.2.(Ie intsall appache, MY SQL and Latest version
of PHP) Does anyone know where I may find one?
Thanks RB

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 22 answer | Add comment
[PHP-DEV] Some questions about PHP Dev. from an open source perspective Kin Lau 20:44:14
 Hi there,

My name is Kin Lau and I'm doing some study on open source projects. I
would like to take a look at PHP, but I'm having some difficulties
finding the all the information the web. I'd be much obliged if anyone
could provide any extra information on the questions/aspects for PHP
below. Just whatever you know for any of them, don't have to answer all
of them:

Questions:
-How do decision processes work in os projects? Is this also open to the
whole community?
-How is QA/testing done and why is it effective? (reputation in os is an
important aspect)
-How is reusability working and why is it so effective in open source?
-What are the incentives for developers in os development?

Aspects:
-Structure of development team (hierarchy)
-Distribution of development team
-Type of developers -> Employed? Students? Other individuals?
-Defect tracking
-QA
-Requirements
-Documentation
-Reviews
-Transparency
-Planning (versions, etc.. stable/unstable)
-Communication style/tools
-Change tracking
-Tools (web sites, builds, change management, newsgroups, forums, etc..)
-How successful is the feedback loop (contributions from outside core
team/company contributions)


Thank you very much for your time!

Sincerely,
- Kin

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
PHP5 Cross Compilation Kiran Malla 20:16:55
 Hello,

I am trying to cross compile PHP-5.2.0 for arm linux.

# export CC=/usr/local/arm/3­.3.2/bin/arm-linux-g­cc
# export AR=/usr/local/arm/3­.3.2/bin/arm-linux-a­r
# export LD=/usr/local/arm/3­.3.2/bin/arm-linux-l­d
# export NM=/usr/local/arm/3­.3.2/bin/arm-linux-n­m
# export RANLIB=/usr/local/a­rm/3.3.2/bin/arm-lin­ux-ranlib
# export STRIP=/usr/local/ar­m/3.3.2/bin/arm-linu­x-strip

# ./configure --host=arm-linux --sysconfdir=/etc/a­ppWeb
--with-exec-dir=/et­c/appWeb/exec

Result of this configure is,

Checking for iconv support... yes
checking for iconv... no
checking for libiconv... no
checking for libiconv in -liconv... no
checking for iconv in -liconv... no
configure: error: Please reinstall the iconv library.

I have installed libiconv-1.11 on my system. The command 'which iconv' shows
'/usr/local/bin/ico­nv'. I have no clue why configure is failing due to
missing iconv.

Somebody please throw some light on this issue.

Regards,
Kiran
comment 3 answer | Add comment
exchange server connection problem Runner60 19:00:15
 Strange behaviour: using same script with php.exe and php-win.exe (cli)
give different result in connecting to an exchange server. Using
phpmailer class it is generated a "$Language string failed to load:
connect_host" error. I tried using mail() php function and problem still
exist, so this is not a phpmailer class problem.
I've assured using same php.ini, tried to ini_set() relevant settings in
script, but php.exe connects and php-win.exe doesn't.
Any clues??
Thanks.

Davide

--
PHP Windows Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
webservice libraries/framework­s Blackwater Dev 18:08:51
 I've heard that there might be a php library or framework that allows you to
expose your code as a webservice with little to no extra code. I heard the
code could potentially also allow access via several different protocols.

Has anyone come across anything similar, or do I need to pick a specific
protocol for my services?

Thanks!
Add comment
[PHP-DEV] CVS Account Request: tkli Tom Klingenberg 17:57:24
 I'd like to maintain my code via CVS and I do not have a CVS repository somewhere else (this is related to a PEAR Package).

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 1 answer | Add comment
Displaying Results on different rows in tables Dan Shirah 16:24:38
 Hello all,

I am trying to pull data and then loop through the multiple results display
in seperate rows.
My database contains several tables which are all tied together by the
credit_card_id. After running the query, it ties the unique record together
by matching the credit_card_id in both tables. How would I go about
displaying the results of this query in a table with a single row for each
unique record?

Each row of the result will have 5 columns: Request ID, Date/Time Entered,
Status, Payment Type, Last Processed By.

If I assign the results of the query to variables (Such as $id =
$row['credit_card_id'];) how would I display that data?

Would it be something like this:

foreach($row as $data)
{
echo "<table>
<tr>
<td><a href=$item->link>$i­d</a></td>
</tr>";
echo "<tr>
<td>$dateTime</td>
</tr>
</table>";
echo "<tr> <td>$Status</td>
</tr>
</table>";

}
Below is the code I have so far.

<?php
$database = "database";
$host = "host";
$user = "username";
$pass = "password";
// Connect to the datbase
$connection = mssql_connect($host­, $user, $pass) or die ('server
connection failed');
$database = mssql_select_db("$d­atabase", $connection) or die ('DB
selection failed');
// Query the table and load all of the records into an array.
$sql = "SELECT
child_support_payme­nt_request.credit_ca­rd_id,
credit_card_payment­_request.credit_card­_id,
date_request_receiv­ed
FROM child_support_payme­nt_request,
credit_card_payment­_request
WHERE child_support_payme­nt_request.credit_ca­rd_id =
credit_card_payment­_request.credit_card­_id";
$result = mssql_query($sql) or die(mssql_error());­
while ($row=mssql_fetch_a­rray($result));
$id = $row['credit_card_id'];
$dateTime = $row['date_request_received'];

?>
comment 4 answer | Add comment
FOCUS-IN-EVENT FOCUS-OUT-EVENT RUN WELL AngeloP 14:41:59
 
Here an examle

<?php
// display popup alert box
function alert($msg) {
$dialog = new GtkDialog('Alert', null, Gtk::DIALOG_MODAL);­
$dialog->set_positi­on(Gtk::WIN_POS_CENT­ER_ALWAYS);
$top_area = $dialog->vbox;
$top_area->pack_sta­rt($hbox = new GtkHBox()); // note 3
$stock = GtkImage::new_from_­stock(Gtk::STOCK_DIA­LOG_WARNING,
Gtk::ICON_SIZE_DIAL­OG);
$hbox->pack_start($­stock, 0, 0);
$hbox->pack_start(n­ew GtkLabel($msg));
$dialog->add_button­(Gtk::STOCK_OK, Gtk::RESPONSE_OK);
$dialog->set_has_se­parator(false);
$dialog->show_all()­;
$dialog->run();
$dialog->destroy();­
}
// Write something into status bar
function Status_Message($msg­){
$context_id = $GLOBALS["status"] ->get_context_id('.­..');
$GLOBALS["status"]->push($con­text_id, $msg);
}

// ===================­====================­==================
$window = new GtkWindow();
$window->set_size_r­equest(400, 150);
$window->connect_si­mple('destroy', array('Gtk','main_q­uit'));

$window->add($vbox = new GtkVBox());
$window->add_events­(Gdk::FOCUS_CHANGE);­

// display title
$title = new GtkLabel("Focus in Out tab from one to other field");
$title->modify_font­(new PangoFontDescriptio­n("Times New Roman Italic 10"));
$title->modify_fg(G­tk::STATE_NORMAL, GdkColor::parse("#0­000ff"));
$title->set_size_re­quest(-1, 40);
$vbox->pack_start($­title, 0, 0);

$name = new GtkEntry();
$name->connect_afte­r('focus-in-event', 'on_focus_in_name')­;
$name->connect_afte­r('focus-out-event',­ 'on_focus_out_name'­);
$vbox->pack_start($­name, 0, 0);

$surname = new GtkEntry();
$surname->connect_a­fter('focus-in-event­', 'on_focus_in_surnam­e');
$surname->connect_a­fter('focus-out-even­t', 'on_focus_out_surna­me');
$vbox->pack_start($­surname, 0, 0);

$status = new GtkStatusbar();
$vbox->pack_start($­status, 1, 1);


// check user input
function on_focus_in_name($w­idget) {
Status_Message('I get into the name...');
print "Test focus in name\n";
return false;
}

// check user input
function on_focus_out_name($­widget) {
alert ("focus is out name");
print "Test focus out name\n";
return false;
}

// check user input
function on_focus_in_surname­($widget) {
Status_Message('I get into the suname...');
print "Test focus in suname\n";
return false;
}


// check user input
function on_focus_out_surnam­e($widget) {
alert ("focus is out surname.\nWait please I crash!!!");
print "Test focus out surname\n";
return false;
}

$window->show_all()­;
Gtk::main();
?>
--
View this message in context: http://www.nabble.c­om/FOCUS-IN-EVENT-FO­CUS-OUT-EVENT-RUN-WE­LL-tf3039452.html#a8­447704
Sent from the Php - GTK - General mailing list archive at Nabble.com.

--
PHP-GTK General Mailing List (http://gtk.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment
Month display calendar Denis L. Menezes 12:55:44
 Dear friends.

Can anyone please show me calendar scripts to make a calendar with a monthly
display as shown in http://www.easyphpc­alendar.com/ ?

Thanks
Denis

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 2 answer | Add comment
what do i need to disable Don 11:51:57
 Ok,



You have been very helpful with my questions so far and I thank you for
that.



My next task is disable harmful tags/scripts in a full text field.



I want to store a bio type field and I am considering allowing html (to
allow a myspace type of customization to the page), but I am really new to
this so I really don't know what kind of trouble I am asking for.



I'm sure that I need to block JavaScript, but are there other things (tags,
scripting, etc.) that can be input into my DB that will cause problems
either being stored as such or when accessed?



Again, thanks for the advice in advance.



Don

comment 1 answer | Add comment
[PHP-DEV] [RFC] Help debugging overloaded objects Marcus Boerger 11:29:26
 Hello internals,

the attached patch introduces a new handler to the engine that is
supposed to help debugging overloaded objects. It allows to return a
temporary hash rather then the object properties. This way an extension
can show non properties in var_dump() and print_r(). It will be used
in extensions like SimpleXML. To show how it will look like the changes
for said extension are alsopresent. Last but not least the handler can
be NULL in which case the old behavior is maintained. If noone objects
I will commit this by the end of the week.

Any comments?

Best regards,
Marcus

Index: Zend/zend.c
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend.c,v
retrieving revision 1.391
diff -u -p -d -r1.391 zend.c
--- Zend/zend.c12 Jan 2007 14:38:07 -00001.391
+++ Zend/zend.c15 Jan 2007 22:23:16 -0000
@@ -17,7 +17,7 @@
+------------------­--------------------­--------------------­------------+
*/

-/* $Id: zend.c,v 1.391 2007/01/12 14:38:07 dmitry Exp $ */
+/* $Id: zend.c,v 1.390 2007/01/11 16:47:46 dmitry Exp $ */

#include "zend.h"
#include "zend_extensions.h"­
@@ -581,6 +581,7 @@ ZEND_API void zend_print_zval_r_e­x(zend_
HashTable *properties = NULL;
zstr class_name = NULL_ZSTR;
zend_uint clen;
+int is_temp;

if (Z_OBJ_HANDLER_P(ex­pr, get_class_name)) {
Z_OBJ_HANDLER_P(exp­r, get_class_name)(exp­r, &class_name, &clen, 0 TSRMLS_CC);
@@ -593,8 +594,11 @@ ZEND_API void zend_print_zval_r_e­x(zend_
if (class_name.v) {
efree(class_name.v)­;
}
-if (Z_OBJ_HANDLER_P(ex­pr, get_properties)) {
+if (Z_OBJ_HANDLER_P(ex­pr, get_debug_info)) {
+properties = Z_OBJ_HANDLER_P(exp­r, get_debug_info)(exp­r, &is_temp TSRMLS_CC);
+} else if (Z_OBJ_HANDLER_P(ex­pr, get_properties)) {
properties = Z_OBJPROP_P(expr);
+is_temp = 0;
}
if (properties) {
if (++properties->nApp­lyCount>1) {
@@ -604,6 +608,10 @@ ZEND_API void zend_print_zval_r_e­x(zend_
}
print_hash(properti­es, indent, 1 TSRMLS_CC);
properties->nApplyC­ount--;
+if (is_temp) {
+zend_hash_destroy(­properties);
+efree(properties);­
+}
}
break;
}
Index: Zend/zend_object_ha­ndlers.c
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend_object_han­dlers.c,v
retrieving revision 1.182
diff -u -p -d -r1.182 zend_object_handler­s.c
--- Zend/zend_object_ha­ndlers.c10 Jan 2007 15:59:55 -00001.182
+++ Zend/zend_object_ha­ndlers.c15 Jan 2007 22:23:17 -0000
@@ -49,13 +49,19 @@
called, we cal __call handler.
*/

-static HashTable *zend_std_get_prope­rties(zval *object TSRMLS_DC)
+ZEND_API HashTable *zend_std_get_prope­rties(zval *object TSRMLS_DC)
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
return zobj->properties;
}

+ZEND_API HashTable *zend_std_get_debug­_info(zval *object, int *is_temp TSRMLS_DC)
+{
+*is_temp = 0;
+return zend_std_get_proper­ties(object TSRMLS_CC);
+}
+
static zval *zend_std_call_gett­er(zval *object, zval *member TSRMLS_DC)
{
zval *retval = NULL;
@@ -1186,6 +1192,7 @@ ZEND_API zend_object_handler­s std_object
zend_std_compare_ob­jects,/* compare_objects */
zend_std_cast_objec­t_tostring,/* cast_object */
NULL,/* count_elements */
+NULL, /* get_debug_info */
};

/*
Index: Zend/zend_object_ha­ndlers.h
===================­====================­====================­========
RCS file: /repository/ZendEng­ine2/zend_object_han­dlers.h,v
retrieving revision 1.61
diff -u -p -d -r1.61 zend_object_handler­s.h
--- Zend/zend_object_ha­ndlers.h1 Jan 2007 09:29:21 -00001.61
+++ Zend/zend_object_ha­ndlers.h15 Jan 2007 22:23:17 -0000
@@ -80,6 +80,8 @@ typedef void (*zend_object_unset­_dimensi
/* Used to get hash of the properties of the object, as hash of zval's */
typedef HashTable *(*zend_object_get_­properties_t)(zval *object TSRMLS_DC);

+typedef HashTable *(*zend_object_get_­debug_info_t)(zval *object, int *is_temp TSRMLS_DC);
+
/* Used to call methods */
/* args on stack! */
/* Andi - EX(­fbc) (function being called) needs to be initialized already in the INIT fcall opcode so that the parameters can be parsed the right way. We need to add another callback for this.
@@ -132,6 +134,7 @@ struct _zend_object_handle­rs {
zend_object_compare­_tcompare_objects;
zend_object_cast_tc­ast_object;
zend_object_count_e­lements_tcount_eleme­nts;
+zend_object_get_de­bug_info_tget_debug_­info;
};

extern ZEND_API zend_object_handler­s std_object_handlers­;
@@ -142,7 +145,8 @@ ZEND_API zval **zend_std_get_stat­ic_prop
ZEND_API zend_bool zend_std_unset_stat­ic_property(zend_cla­ss_entry *ce, zend_uchar type, zstr property_name, int property_name_len TSRMLS_DC);
ZEND_API union _zend_function *zend_std_get_const­ructor(zval *object TSRMLS_DC);
ZEND_API struct _zend_property_info­ *zend_get_property_­info(zend_class_entr­y *ce, zval *member, int silent TSRMLS_DC);
-
+ZEND_API HashTable *zend_std_get_prope­rties(zval *object TSRMLS_DC);
+ZEND_API HashTable *zend_std_get_debug­_info(zval *object, int *is_temp TSRMLS_DC);
ZEND_API int zend_std_cast_objec­t_tostring(zval *readobj, zval *writeobj, int type, void *extra TSRMLS_DC);


Index: ext/simplexml/simpl­exml.c
===================­====================­====================­========
RCS file: /repository/php-src­/ext/simplexml/simpl­exml.c,v
retrieving revision 1.226
diff -u -p -d -r1.226 simplexml.c
--- ext/simplexml/simpl­exml.c1 Jan 2007 09:29:29 -00001.226
+++ ext/simplexml/simpl­exml.c15 Jan 2007 22:23:18 -0000
@@ -615,6 +615,7 @@ static void sxe_dimension_write­(zval *ob
}
/* }}} */

+#if HELLY_0
static zval** sxe_property_get_ad­r(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
php_sxe_object *sxe;
@@ -639,12 +640,16 @@ static zval** sxe_property_get_ad­r(zval
_node_as_zval(sxe, node, return_value, type, name, sxe->iter.nsprefix,­ sxe->iter.isprefix TSRMLS_CC);

sxe = php_sxe_fetch_objec­t(return_value TSRMLS_CC);
+if (sxe->tmp) {
+zval_ptr_dtor(&sxe­->tmp);
+}
sxe->tmp = return_value;
return_value->is_re­f = 1;

return &sxe->tmp;
}
/* }}} */
+#endif

/* {{{ sxe_prop_dim_exists­()
*/
@@ -946,9 +951,7 @@ static void sxe_properties_add(­HashTable
}
}

-/* {{{ sxe_properties_get(­)
- */
-static HashTable * sxe_properties_get(­zval *object TSRMLS_DC)
+static HashTable * sxe_get_prop_hash(z­val *object, int is_debug TSRMLS_DC) /* {{{ */
{
zval *value;
zval *zattr;
@@ -962,7 +965,10 @@ static HashTable * sxe_properties_get(­zv

sxe = php_sxe_fetch_objec­t(object TSRMLS_CC);

-if (sxe->properties) {
+if (is_debug) {
+ALLOC_HASHTABLE(rv­);
+zend_u_hash_init(r­v, 0, NULL, ZVAL_PTR_DTOR, 0, UG(unicode));
+} else if (sxe->properties) {
zend_hash_clean(sxe­->properties);
rv = sxe->properties;
} else {
@@ -975,7 +981,7 @@ static HashTable * sxe_properties_get(­zv
if (!node) {
return rv;
}
-if (1||sxe->iter.type != SXE_ITER_CHILD) {
+if (is_debug) {
if (sxe->iter.type == SXE_ITER_ELEMENT) {
node = php_sxe_get_first_n­ode(sxe, node TSRMLS_CC);
}
@@ -1066,6 +1072,19 @@ next_iter:
}
/* }}} */

+static HashTable * sxe_get_properties(­zval *object TSRMLS_DC) /* {{{ */
+{
+return sxe_get_prop_hash(o­bject, 0 TSRMLS_CC);
+}
+/* }}} */
+
+static HashTable * sxe_get_debug_info(­zval *object, int *is_temp TSRMLS_DC) /* {{{ */
+{
+*is_temp = 1;
+return sxe_get_prop_hash(o­bject, 1 TSRMLS_CC);
+}
+/* }}} */
+
static int sxe_objects_compare­(zval *object1, zval *object2 TSRMLS_DC) /* {{{ */
{
php_sxe_object *sxe1;
@@ -1657,16 +1676,20 @@ static int cast_object(zval *object, int
static int sxe_object_cast(zva­l *readobj, zval *writeobj, int type, void *extra TSRMLS_DC)
{
php_sxe_object *sxe;
-xmlChar *contents = NULL;
+xmlChar *contents = NULL;
xmlNodePtr node;
-int rv;
+int rv;
+HashTable *prop_hash;

sxe = php_sxe_fetch_objec­t(readobj TSRMLS_CC);

if (type == IS_BOOL) {
node = php_sxe_get_first_n­ode(sxe, NULL TSRMLS_CC);
+prop_hash = sxe_get_prop_hash(r­eadobj, 1 TSRMLS_CC);
INIT_PZVAL(writeobj­);
-ZVAL_BOOL(writeobj­, node != NULL || zend_hash_num_eleme­nts(sxe_properties_g­et(readobj TSRMLS_CC)) > 0);
+ZVAL_BOOL(writeobj­, node != NULL || zend_hash_num_eleme­nts(prop_hash) > 0);
+zend_hash_destroy(­prop_hash);
+efree(prop_hash);
return SUCCESS;
}

@@ -1749,14 +1772,14 @@ static zend_object_handler­s sxe_object_h
sxe_property_write,­
sxe_dimension_read,­
sxe_dimension_write­,
-sxe_property_get_a­dr,
+NULL,
sxe_get_value,/* get */
NULL,
sxe_property_exists­,
sxe_property_delete­,
sxe_dimension_exist­s,
sxe_dimension_delet­e,
-sxe_properties_get­,
+sxe_get_properties­,
NULL, /* zend_get_std_object­_handlers()->get_met­hod,*/
NULL, /* zend_get_std_object­_handlers()->call_me­thod,*/
NULL, /* zend_get_std_object­_handlers()->get_con­structor, */
@@ -1764,7 +1787,8 @@ static zend_object_handler­s sxe_object_h
NULL, /* zend_get_std_object­_handlers()->get_cla­ss_name,*/
sxe_objects_compare­,
sxe_object_cast,
-sxe_count_elements­
+sxe_count_elements­,
+sxe_get_debug_info­
};

/* {{{ sxe_object_clone()
Index: ext/standard/var.c
===================­====================­====================­========
RCS file: /repository/php-src­/ext/standard/var.c,­v
retrieving revision 1.259
diff -u -p -d -r1.259 var.c
--- ext/standard/var.c1­ Jan 2007 09:29:32 -00001.259
+++ ext/standard/var.c1­5 Jan 2007 22:23:18 -0000
@@ -181,6 +181,7 @@ PHPAPI void php_var_dump(zval **struc, i
zstr class_name;
zend_uint class_name_len;
int (*php_element_dump_­func)(zval**, int, va_list, zend_hash_key*);
+int is_temp;

if (level > 1) {
php_printf("%*c", level - 1, ' ');
@@ -217,9 +218,10 @@ PHPAPI void php_var_dump(zval **struc, i
}
php_printf("%sarray­(%d) {\n", COMMON, zend_hash_num_eleme­nts(myht));
php_element_dump_fu­nc = php_array_element_d­ump;
+is_temp = 0;
goto head_done;
case IS_OBJECT:
-myht = Z_OBJPROP_PP(struc)­;
+myht = Z_OBJ_HANDLER_PP(st­ruc, get_debug_info)(*st­ruc, &is_temp TSRMLS_CC);
if (myht && myht->nApplyCount > 1) {
PUTS("*RECURSION*\n­");
return;
@@ -237,6 +239,10 @@ head_done:
php_printf("%*c", level-1, ' ');
}
PUTS("}\n");
+if (is_temp) {
+zend_hash_destroy(­myht);
+efree(myht);
+}
break;
case IS_RESOURCE: {
char *type_name;


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php
comment 8 answers | Add comment
File not found error Alex Keim 10:19:46
 I can't figure out how to fix the file not found error that I'm
getting. "... failed to open stream: No such file or directory..."
I've looked for answers all over the net and can't find anything that
seems to help. Basically I only get the error when using relative
paths. My PHP include_path is set to ".;c:\php\includes"­. Absolute
paths work just fine. I know my PHP is at least mostly configured
correctly. I say mostly because I run Gallery (which uses PHP) on my
server and it works just fine but I cann't run either phpBB2 or
MediaWiki because they use relative paths for includes. phpBB2 does
work when I change relative to absolute but I don't want to go through
and edit ever single file... plus upgrades will be a pain. So anyone
run into this problem and solve it? Thanks.
- Alex

some phpinfo:
PHP Version 5.2.0RC3-dev
Build Date Aug 31 2006 20:16:01
Configure Command cscript /nologo configure.js
"--enable-snapshot-­build" "--with-gd=shared"
Server API Apache 2.0 Filter
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\php\php.ini
PHP API 20041225
PHP Extension 20060613
include_path .;c:\php\includes .;c:\php\includes

--
PHP Windows Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 4 answer | Add comment
Question about session Bagus Nugroho 09:31:14
 
I have session code which written WindowsXP and It wotk properly as expected, but when I'm used in Windows 2K, it got error as;
Notice: Undefined index: loginMessage in C:\CentralData\form­s\mainForm.php on line 65
I'am used Apache 2.0 and PHP 5.0.4.
Is php.ini setting on W2K different with XP

Thxs in advance
bgs
<!--
.style1 {font-weight: bold}
.style2 {
font-size: 24px;
font-weight: bold;
}
.style8 {color: #0066CC; font-weight: bold; font-size: 18px; }
-->

comment 6 answers | Add comment
Oracle Execute Function Brad Bonkoski 05:53:19
 Hello All,

I have this Oracle function, and within my code I call it like this:

$sql = "BEGIN :result := my_funtion_name('$p­arm1', $parm2, null, null,
null); END;";
$stmt = $db->parse($sql);
$rc = null;
ocibindbyname($stmt­, ":result", &$rc);
$db->execute($stmt,­ $sql);

The problem is that the execute function spits back an error/warning
message, but the Oracle function properly executes and the data is in
the Database.
The execute function looks like this:
(This function enters the conditional where ii executes the die() function)

public function execute($stmt, $query = "") {
if( $this->trans)
$result = @ociexecute($stmt, OCI_DEFAULT);
else
$result = @ociexecute($stmt);­
if (!$result ) {
$error = ocierror($this->lin­k);
$this->report('Inva­lid Statement: ' . $stmt
.'('.$query.')'. ' '
. htmlentities($error­['message']));
die('Invalid Statement: ' . $stmt
.'('.$query.')'. ' ' . htmlentities($error­['message']));
}
return $result;
}

I use this wrapper class for many things, and the execute function for
many things, without any problems.
Now, this is an initial run at calling Oracle functions within PHP.
Any words of wisdom as to what could be causing this problem, or any
other insight?

TIA
-Brad

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 4 answer | Add comment
Storing dynamic attribute data in a db Chris W. Parker 04:34:17
 Hello,

This is now my 3rd attempt at writing this email. :)­ The first two were
pretty long...

I'm currently working on trying to find a solution that is both simple
and flexible for storing the data of a complicated set of dynamic
options for some of our products. My current thinking is that I will use
Modified Preorder Tree Traversal to organize the data. Each record will
have the following:

id (auto-number)
sku (related product's sku)
lft (hierarchy data)
rgt (hierarchy data)
attribute (like: Size, Color, Style)
option (like: Blue, Large, Plain)
pricemodifier (-$20, +$20)

This kind of data is not difficult to handle if every combination that
is available through the different options is actually available from
the manufacturer. However, some combinations are not possible so the
data needs to represent itself that way. For example, all t-shirts come
in Red, Green, or Blue but only Green shirts come in Large. All other
colors have only Small and Medium.

Is there a standard way to handle this kind of thing if not, how would
you handle it?

(On a side note, when the solution is found, could it be called a
"pattern"?)



Thanks,
Chris.

p.s. Yes this is the short email.

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 4 answer | Add comment
[PHP-DEV] Im back Jason Greene 00:39:11
 All,

I am sure many of you have noticed that I haven't been around for about
the last 6 months. This was mainly due to a large amount of commitment
required for a large project by my employer, and other events in my life
that limited my free time.

I will be catching back up in the next few weeks, and my first goal is
to finish off the sockets and pcntl documentation (Should take about 2
weeks).

If anyone has any questions, feel free to email me.

Thanks,
-Jason

--
Jason Greene <jason@inetgurus.ne­t>
<jason@php.net>


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 42 answer | Add comment
Re: Problem with focus-in or focus-out event and GtkDialog Anant Narayanan 00:39:11
 Hi Angelo,
all run well if I add a comment to alert //alert> so I thik the problem is in GtkDialog>
Anyone has an idea about it?

The problem seems to be with $dialog->destroy();­ Although the dialog is
destroyed the program segfaults as soon as the function returns.

As a temporary solution; use $dialog->hide_all()­ instead of destroy();
and store the dialog widget in a global variable or something to avoid
recreating it everytime. Just change the attributes and show it when you
need it again on the next event.

Also, I suggest you use the GtkMessageDialog widget rather than just
GtkDialog; it seems to suit your purpose.

--
Anant

--
PHP-GTK General Mailing List (http://gtk.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 3 answer | Add comment
Include files beneath pointed directory Wikus Moller 00:39:11
 Hi.

I have a windows server and I know this issue has been dealt with
before but I can't find it, I want to include a file from a directory
beneath or aside my home directory.

Can I use the C:\directory\anothe­rdirectory\file.php in the include
function like include "C:\directory\anoth­erdirectory\file.php­"; or do
I need more code to make it work? I am sure I do. The directory would
be aside my home directory.

Thanks

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 1 answer | Add comment
Scope of include Jekillen 00:12:07
 Hello php list:
If I include a php script inside a php function definition and then
call the
function in another script. What is the scope of variables in the
included
script? Are they local to the function that calls include with the file
name?
Thanks in advance;
I'm not sure where to look for this answer;
JK

--
PHP General Mailing List (http://www.php.net­/)
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 6 answers | Add comment
Thursday, 18 January 2007
Daylight Savings Time in PHP4 Mike Caplin 23:01:58
 Does anyone know if the change in Daylight Savings Time (March this year)
affects PHP v4.x? I looked around www.php.net and all I could find was a
reference to v5 (http://bugs.php.ne­t/bug.php?id=35296).­ Is there a v4
release which is compatible with the DST change? Or even a patch could be
applied?

Thanks.

Mike
comment 1 answer | Add comment
[PHP-DEV] CVS Account Request: cbaughman Christopher Baughman 20:37:27
 I would like to help maintain documentation, I have noticed many unanswered bugs, and have time to contribute to a project I have come to enjoy. I would also like to possibly help with developing the runtime.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


comment 2 answer | Add comment
[PHP-DEV] CVS Account Request: tsuruoka TSURUOKA Naoya 20:34:53
 commit Crypt_DSA(http://pe­ar.php.net/pepr/pepr­-proposal-show.php?i­d=467) to cvs.php.net

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/­unsub.php


Add comment

Add new topic:

How:  Register )
 
Логин:   Пароль:   
Комментировать могут: Премодерация:
Topic:
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > PHP web-programmingGo to page: « previous | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | next »

see also:
Convert MyISAM to InnoDB
Re: dynamic request hook ordering (take…
Incorrect example in Appendix B.3 of…
пройди тесты:
see also:
New iPod touch 2G Guide
How to edit a DVD movie with Windows…
Hello everybody!Here i want to shar...

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .