Saturday, 27 January 2007
|
| Charset problem with PHP-GTK2 Miguel J. Jim nez 21:07:17 |
| | Hi, I am passing the following string to a CLI script using PHP-GTK:
$> /usr/bin/php pnota argv1 \
The system locale and all locales AFAIK are UTF-8 but I cannot get the euro char written in the GtkLabel I am using. I have tried \ € but nothing... any ideas? Thanks
--- Miguel J. Jim nez ISOTROL, S.A. mjjimenez@isotrol.com +34 955036800 +34 607448764
"I try to save a life a day. Usually it's my own." John Crichton, FARSCAPE (1x07)
-- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | Add comment |
|
| [PHP-DEV] [PATCH] fix zend_llist_remove_tail Michael Wallner 20:32:54 |
| | The attached patch fixes zend_llist_remove_tail() which didn't reset zend_llist->head properly. The diff was generated against 5_2.
Regards, -- Michael
Index: Zend/zend_llist.c =================================================================== RCS file: /repository/ZendEngine2/zend_llist.c,v retrieving revision 1.35.2.1.2.1 diff -u -p -d -r1.35.2.1.2.1 zend_llist.c --- Zend/zend_llist.c1 Jan 2007 09:35:46 -00001.35.2.1.2.1 +++ Zend/zend_llist.c27 Jan 2007 17:31:36 -0000 @@ -130,28 +130,17 @@ ZEND_API void zend_llist_clean(zend_llis ZEND_API void *zend_llist_remove_tail(zend_llist *l) { -zend_llist_element *old_tail; +zend_llist_element *current = l->tail; void *data; - -if ((old_tail = l->tail)) { -if (l->tail->prev) { -l->tail->prev->next = NULL; -} - -data = old_tail->data; - -l->tail = l->tail->prev; -if (l->dtor) { -l->dtor(data); -} -pefree(old_tail, l->persistent); - ---l->count; - -return data; + +if (current) { +data = current->data; +DEL_LLIST_ELEMENT(current, l); +} else { +data = NULL; } - -return NULL; + +return data; }
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php |
| | Add comment |
|
| [PHP-DEV] Improving the documentation Mehdi Achour 19:26:24 |
| | Hello internals,
I've been helping with PHP documentation for 4 years now, and I still can't help the fact that a loooot of things are not documented, that our/my way of handling the PHP documentation update is not accurate, nor productive, nor bug free at all.
Personally, I try to follow commits on php.cvs, bug reports, Change Log?, user notes on the online manual.. but I still have the feeling of missing a lot of changes. After a year away from the project, I have _no_ clue what was added, when, and whether it was added to our documentation or not.
I know that you developers are willing to help a lot with it, but that you cannot manage to save the spare time needed to do it the right way. That's why I would like to propose a simple/small/timeless change in your CVS commit messages: If you feel that the change need to be documented, place the @doc keyword at the end of your message log entry.
And if you feel like telling us more about what you changed, point us to some online resource or whatever. Simply add that after the @doc tag. This additional comment is optional, and you don't need to bother if the change is obvious, or if you simply don't feel like doing it ATM.
This small @doc tag could _slightly_ improve/optimize/sanitize our work on the documentation. By adding some SQL logging in loginfo.pl, and storing the following:
* date: commit date * login: CVS account of the developer * branch: CVS branch * files: Changed files * commit: Commit message before @doc * desc : Optional developer description after @doc
We would be able to have an interface displaying a dynamic phpdoc TODO, with some nice features like a search by PHP version, extension, assignee, keywords..
Additionally, we can imagine adding an online help feature on the interface, by setting a 'help' flag on some hardly understandable change, to have login@php.net notified of our need for enlightenment.
Any thoughts ?
Mehdi Achour
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
|
| | Add comment |
|
| php & javascript interaction William Stokes 16:54:38 |
| | Hello,
I need some advice on how to learn Javascript and PHP interaction. Any good tutorials on the web would be most welcome. I particulary need to learn how to pass JS user input/choices to PHP.
My current problem is how to ask user confirmation over his actions on a web form after POST. "Are you sure" type questions and how to pass the user choice back to program make choices with PHP.
Thanks -Will
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 3 answer | Add comment |
|
| Result sorting not working Dan Shirah 16:51:01 |
| | I have a search page that displays all active records in my application, but for some reason, I can not get it to display based on a specific input.
For instance, I have records with id's 2, 3, 4, 5 etc... In my search form, the default view shows all records, and my form variable lets you put in different search criteria. If I do a search by id and put in "2" as the search condition, my results keep coming back blank. It does not matter which parameter or value I put in, it still returns blank.
Any ideas?
<?php $connection = mssql_connect($host, $user, $pass) or die ('server connection failed'); $database = mssql_select_db("$database", $connection) or die ('DB selection failed');
// Query the table and load all of the records into an array. $query = "SELECT child_support_payment_request.credit_card_id, credit_card_payment_request.credit_card_id, credit_card_payment_request.date_request_received FROM child_support_payment_request, credit_card_payment_request WHERE child_support_payment_request.credit_card_id = credit_card_payment_request.credit_card_id"; if ($request_id !== '') { $query.=" AND credit_card_payment_request.credit_card_id = $request_id2"; } if ($dateTime !== '') { $query.=" AND credit_card_payment_request.date_request_received = $dateTime2"; } $res = mssql_query($query) or die(mssql_error());
echo "<table width='780' border='1' align='center' cellpadding='2' cellspacing='2' bordercolor='#000000'>";
while ($rows = mssql_fetch_array($res)) { $res_id = $rows['credit_card_id']; $res_dateTime = $rows['date_request_received']; echo "<tr>"; echo "<td width='88' height='13' align='center' class='tblcell'><div align='center'>$res_id</div></td>"; echo "<td width='224' height='13' align='center' class='tblcell'><div align='center'>$res_dateTime</div></td>"; echo "<td width='156' height='13' align='center' class='tblcell'><div align='center'>Open</div></td>"; echo "<td width='156' height='13' align='center' class='tblcell'><div align='center'>Payment Type</div></td>"; echo "<td width='156' height='13' align='center' class='tblcell'><div align='center'>Last Processed By</div></td>"; echo "</tr>"; } echo "</table>"; ?>
The variables $request_id and $dateTime are specified in a seperate chunk of php code, but are still included on the same page as the code below. Am I right in assuming that any variable set on the same page can be carried into different php blocks on the same page?
Example:
<?php
$id = $_POST['request_id']
?>
<?php
echo "<table>"; echo "<td>"' echo $id; echo "</td>"; echo "</table>";
?>
That would be valid, correct?
|
| | 1 answer | Add comment |
|
| PHP & Flash Skip Evans 16:44:32 |
| | Hey all,
We have a new project that will require pretty robust communication between Flash and PHP, and I've begun Googling and came across Actionscript here:
http://www.adobe.com/devnet/flash/articles/flashmx_php.html
I wonder if anyone knows anything about running actionscript on LinuxFfirfox machines. My install of Firefox on Debian/Fluxbox runs Flash okay, but not the sample app on this page.
The page above had a zip file that may need to be downloaded to your Windows machine, but my Windows machine ran it fine.
Anyone have any experience with PHP/Actionscript on Linux?
Thanks! -- Skip Evans Big Sky Penguin, LLC 61 W Broadway Butte, Montana 59701 406-782-2240 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-=
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 3 answer | Add comment |
|
| Rory Browne from this php list (0.T) Ryan A 16:14:23 |
| | Hello!
As some of you might remember: a little while back I had a project to be done in PHP, which I asked if anyone on the list would be interested in completing for $800 USD.
Rory Browne from the list got the job and around the 15th of Jan he told me he completed the work and was going to send me/setup the software but then I did not get any word from him after multiple emails in the days since, am wondering if something bad happened to him... (hope not)
Does anyone know Rory Browne's phone number or any other contact details?
Thanks, Ryan
------ - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. --------------------------------- Everyone is raving about the all-new Yahoo! Mail beta. |
| | Add comment |
|
| [PHP-DEV] CVS Account Request: wharmby Andy Wharmby 14:24:50 |
| | Maintaining the COM extension. Andi Gutmans suggested I apply for access.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 1 answer | Add comment |
|
| Calling all Windows users - which PHP extensions do you use? Steph Fox 07:50:05 |
| | Hi all,
Thanks largely to Elizabeth Smith's efforts, it's become obvious that we need to distribute a special version of PHP alongside the next PHP-GTK 2 release - definitely for the Windows 98/ME users, who will not be able to use the new 'FastCGI optimized' versions of PHP currently available for testing on php.net, and possibly for the Windows NT/XP/Vista users too.
Windows 98/ME is no longer supported in PHP 5.2.1; the last version you'll be able to use on those sytems is PHP 5.2.0.
The 'up' side of this is it gives us some freedom; we can make a PHP binary without considering thread safety (same as the FastCGI optimized versions) and build PHP-GTK 2 against it, giving you a fairly hefty speedup (around 25%). The 'down' side is that you won't be able to use that PHP binary alongside the official extension DLLs - a) because they're thread-safe, and b) because the PECL and snaps DLLs are being built against a version of PHP that doesn't support Win98.
So we need to know which extensions you find yourselves using, because the obvious thing to do here would be to build the most common ones into the PHP binary as static (giving you less 'stuff' to distribute alongside your applications) and make any further extensions available through the download page on request.
If you're running under NT/XP/Vista, we'd still like to know your needs because a) there are currently no PECL extensions provided for the FastCGI optimized binaries, and b) to the best of my knowledge these are currently built against the 'old' C runtime rather than the one optimal for your system. Both these things are likely to change in the foreseeable future... we just don't know when.
So - feedback, please!
Thanks,
- Steph
-- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 12 answers | Add comment |
|
| PHP with XML database Ritesh Nadhani 05:39:30 |
| | Hello all
As part of my research under my professor I have to implement a web interface to their benchmarking data.
PHP is the chosen web language but we are little worried about the database. The benchmark data comes to us in XML format (e.g. http://www.matf.bg.ac.yu/~filip/ArgoLib/smt-lib-xml/Examples/FolEq1.xml). We have to implement an interface to query them, get data, update etc.
We even can change schema in the form of attributes. . The data size would be around 100 MB each XML with around 100 different XMLs.
The load would be max 5-10 users any given time, batch updates once a month and heavy load probably 2-3 times a month. Mission criticality is not important, we can get it down sometimes. Which db would you suggest?
I did Google research and as of now - I like eXist, Sedna (they seem to have good PHP wrapper support) and Timber. Another thing would be good documentation and support.
Any suggestions?
Ritesh
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 3 answer | Add comment |
|
| Fw: Calling all Windows users - which PHPextensions do you use? Steph Fox 03:56:49 |
| | I'll translate that.
Thanks, because that's really useful and means non-win98 users can switch to the NTS builds without worrying about it.
I'm mostly worried about the win98 users here.
- Steph
----- Original Message ----- From: "Steph Fox" <steph@zend.com> To: "Frank M. Kromann" <frank@kromann.info> Cc: "PHP-GTK gen" <php-gtk-general@lists.php.net> Sent: Saturday, January 27, 2007 12:52 AM Subject: Re: [PHP-GTK] Calling all Windows users - which PHPextensions do you use?
Hi Frank,> There are already win98-unfriendly calls in the PHP core as of 5.2.1 > RC1... and Edin's planning a move to VC8. I'm playing for safety here, > since the decision to drop support was made and changes were made in the > core immediately to reflect the move to the new API.> If you're building non-ZTS extensions on a regular basis that's brilliant, > but for them to be reliable under win98 they'll need to pre-date those > changes.> - Steph> When PHP 5.2.1 is released I don'expect many changes to the source three>> for 5.2.0 so it should not be a big problem to build as many extensions >> as>> possible from that branch and make them available for download. These >> would>> only need recompilation if the internal API's should change.>> I build both ZTS and non ZTS extensioons on my site and I don't mind>> keeping things arround for a while. I might even get the time to add gtk>> binaries again when I move my servers to a new location.>> Thanks largely to Elizabeth Smith's efforts, it's become obvious that we>> need to distribute a special version of PHP alongside the next PHP-GTK 2>> release - definitely for the Windows 98/ME users, who will not be able>> to>>> use the new 'FastCGI optimized' versions of PHP currently available for>> testing on php.net, and possibly for the Windows NT/XP/Vista users too.>>> Windows 98/ME is no longer supported in PHP 5.2.1; the last version>> you'll>>> be able to use on those sytems is PHP 5.2.0.>>> The 'up' side of this is it gives us some freedom; we can make a PHP>> binary>>> without considering thread safety (same as the FastCGI optimized>> versions)>>> and build PHP-GTK 2 against it, giving you a fairly hefty speedup>> (around>>> 25%). The 'down' side is that you won't be able to use that PHP binary>>> alongside the official extension DLLs - a) because they're thread-safe,>> and>>> b) because the PECL and snaps DLLs are being built against a version of>> PHP>>> that doesn't support Win98.>>> So we need to know which extensions you find yourselves using, because>> the>>> obvious thing to do here would be to build the most common ones into the>> PHP>>> binary as static (giving you less 'stuff' to distribute alongside your>>> applications) and make any further extensions available through the>> download>>> page on request.>>> If you're running under NT/XP/Vista, we'd still like to know your needs>> because a) there are currently no PECL extensions provided for the>> FastCGI>>> optimized binaries, and b) to the best of my knowledge these are>> currently>>> built against the 'old' C runtime rather than the one optimal for your>>> system. Both these things are likely to change in the foreseeable>> future...>>> we just don't know when.>>> So - feedback, please!>>> -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | Add comment |
|
| Ongoing encoding issues Dave Goodchild 00:42:26 |
| | Hi all, I posted a question a couple of days ago regarding a web app I have wherein users are able to indicated prices and concessions via a text field, and the resulting encoding issues I have experienced, the main one being seeing the pound sign as бё if viewing the results in a browser with the encoding set to Latin-1.
My question is, how do I overcome this. If I set my browser encoding to Latin-1 and enter the data I get that odd symbol, if I set it to UTF-8 I get clean data. Is there a way to sniff out what encoding the browser is using and then clean the data in any way.
I am googling for help also but you guys have been so helpful in the past I thought I'd try you also.
-- http://www.web-buddha.co.uk
|
| | 5 answers | Add comment |
|
| Multi lingual pages Otto Wyss 00:42:26 |
| | I'd like to make my pages multi lingual, showing everything in the language the user chooses. My pages show mostly static text. So what's the usual implementation for this case.
O. Wyss
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 8 answers | Add comment |
|
| Creating an array as a property of an object Ken Kixmoeller -- reply to ken@kixmoeller.com 00:21:21 |
| | Hello, folks -- lurking for a while, first post --
I'm relatively new to PHP but doing database design work for nearly 20 years.
I've RTFM'ed (+ books + other resources) a bunch of times but I have a mental block around doing this:
I want to have an multidimensional array as a property of an object.
Example:
MySQL Resource: WHAM_ID NAME AMOUNT 5 Fred 99 9 Albert 345 23 Mary 5 (etc...)
Inside the function which builds the instance of the object, I have language like:
while ($line = mysql_fetch_array($result_set,MYSQL_ASSOC)) { $this->foom_array = array("MyKey".$line["wham_id"]=>array($line).","; } This isn't even close. <g>
Any examples, or a well-written resource to help me do this?
TIA
Ken
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 2 answer | Add comment |
Friday, 26 January 2007
|
| memory_limit Setting? Jay Paulson 23:20:51 |
| | Hi everyone,
I m trying to upload a 25MB file via PHP and I m setting the memory limit way high so I don t get a fatal error from php (the error is below). What I find really odd about this is that the error message says that PHP tried to allocate almost 54MB. First question is why is PHP allocating so much memory when I m only uploading a 25MB file? Second question is why is PHP failing when obviously the memory limit is set to just over 100MB? (I m using PHP 5.1.2 Apache 2.0.55 and using an .htaccess file to change the PHP settings on the fly.)
Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to allocate 53764163 bytes) in /path/to/php/file on line 942
.htaccess settings below:
php_value memory_limit 100M php_value post_max_size 30M php_value upload_max_filesize 30M php_value max_execution_time 300 php_value max_input_time 300 php_value display_errors On
|
| | 2 answer | Add comment |
|
| RAD and Databases AngeloP 22:09:27 |
| | Hi guys ,
I work often with databases. I would to know if anybody is working about a project like this..
http://www.glom.org/wiki/index.php?title=Screenshots
to develop a RAD tool for database.
Ciao a tutti.
-- View this message in context: http://www.nabble.com/RAD-and-Databases-tf2932885.html#a8199937 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
|
| | 2 answer | Add comment |
|
| Slow (sometimes minutes) to load pages Jim Valavanis 20:55:40 |
| |
For some reason since upgrading phpgroupware and moving it to a new location, one user base (from one DSL location) is having poor results. At times they will click on a calendar entry and literally wait 5 minutes for the page to come up. It does seem to eventually come up which is strange.
I've tested site access from many other locations and did not find issues. I thought it might be related to only 256MB RAM in the system. I also installed eaccelerator to see if that would speed it up, but same results. I've tried firefox, and IE and same results.
Configuration is:
Fedora Core 4 256MB RAM 2.6.17 kernel PHP 5.0.4 mysql 4.1.20 memory_limit = 30M
I do think it's a network problem on their end, or maybe a DNS issue. I might try running ngrep and accessing the site to test, but won't have a chance to do that until next week. Please, if anyone has any ideas, it would be very helpful.
Thanks. JimSent from the phpGroupWare forums @ http://forums.phpGroupWare.org
|
| | 5 answers | Add comment |
|
| [PHP-DEV] PHP6 - x64 SegFault Chris Malton 20:45:38 |
| | Hi, I'm new to the newsgroup and I'm trying to debug PHP 6 on a test server (x64 architecture). However, for some unknown reason, it segfaults if I try to run it with any files that work in PHP 5.2.0.
The segfault is at the end of most scripts, at the beginning of others.
The backtrace looks like this: #0 _zend_mm_free_int (heap=0xb30330, p=0x377cff39f390d7e) at /root/php6/Zend/zend_alloc.c:1522 #1 0x00000000006a5cdf in destroy_op_array (op_array=0x2ab2aef29ff8) at /root/php6/Zend/zend-opcode.c:265 #2 0x00000000006b06d5 n zend_execute_scripts (type=8,retval=<value optimised out>, file_count=3) at /root/php6/ZendSend.c:1665 #3 0x0000000000662763 in php_execute_script (primary_file=0x7ffffbb9d360) at /root/php6/main/main.c:1949 #4 0x000000000073d1c4 in main (argc=2, argv=0x7ffffbb9f5c8) at /root/php6/sapi/cgi/cgi_main.c:1656
This looks like a Zend issue trying to clean up after the running of a program.
Can somebody please find a fix? I'm willing to test a patch first before it is committed.
Chris
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 3 answer | Add comment |
|
| [PHP-DEV] [PATCH] stream_socket_pair Six 20:17:25 |
| | i'm reposting this patch which adds the stream_socket_pair function, I've posted it one month ago, made some requested modifications but it seems nobody commited it so if you still want it it's here : http://si.kz/~six/stream_socket_pair.diff
vincent
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 4 answer | Add comment |
|
| [PHP-DEV] COM extension defects: Patch for defect 37927 Andy Wharmby 19:38:54 |
| | Hi Internals, Attached are details of a suggested patch for COM extension defect 37927 (http://bugs.php.net/bug.php?id=37927). All comments welcome; good or bad.
Regards Andy
Andy Wharmby IBM United Kingdom Limited Winchester, England SO21 2JN E-mail: andy_wharmby@uk.ibm.com
_*COM Defect 37927*_
This defect actually reports issues with 2 different event sink interfaces, DwebBrowserEvents2 and DWebbrowserEvents. So taking each one in turn:
*DWebBrowserEvents2::NewWindow2 Event * This event is documented at : http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/dwebbrowserevents2/newwindow2.asp The defect details an issue with the NewWindow2 event handler but my testing has shown the exact same issue with NewWindows3 event too.
The problem here is that the user defined event handler is not getting called when the associated event occurs in IE and my investigations have shown this is due to a bug in the COM extension code. Examining the COM trace output with DebugView shows:
[4716] T=00001890 [4716] PHP:IEEventSinker InvokeEx [4716] T=00001890 [4716] -- Invoke: 251 newwindow2 [10] flags=00000001 args=2 [4716] T=00001890 [4716] alloc zval for arg 0 VT=00004009 << only one of two arguemets gets processed !! [4716] T=00001890 [4716] PHP:IEEventSinker InvokeEx <<next event
So the event is reported but is only partially processed by the COM extension code; no attempt is made to call the event handler.
BTW. This COM trace in com_wrapper.c, which output using "OutputDebugString", is active in non-DEBBUG builds unlike all other uses in the PHP code base. I am not sure what the cost of these calls is but I would have expected such calls to be enabled in DEBUG builds only. Easily fixed and I will put together a fix unless anyone sees a need for this trace in non-DEBUG, i.e production builds.
Anyway the reason for the partial request processing is because the code is trapping in php_com_wrap_variant() when processing the input arguments for the "NewWindow2" (and NewWindow3) event. The NewWIndow2 event is defined on MSDN as follows:
void NewWindow2(IDispatch **&ppDisp, VARIANT_BOOL *&Cancel);
i.e a double indirect pointer to a IDispatch. However, this argument is defined for output. The VT_DISPATCH variant addressed has its type set but its value is NULL , i.e V_DISPATCH(<var addr>) == NULL . So when php_com_wrap_variant() attempts a call on the IDispatch interface to get type information and the PHP thread traps. Easily fixed by checking for a NULL IDispatch interface pointer prior to call.
Required patch to fix is here: http://www.pastebin.ca/329136
This fixes the problem of the event handler not being called in the first place. However any attempt by a NewWindow2/3 event handler to cancel the navigation, i.e by setting $cancel == TRUE, will still fail until the fix for defect 345764 is dropped (http://bugs.php.net/bug.php?id=34564). Frank is currently reviewing this fix.
*DWebBrowserEvents::NewWindow Event * This event is documented at : http://msdn.microsoft.com/workshop/browser/webbrowser/reference/ifaces/dwebbrowserevents/newwindow.asp.
However, the MSDN description does include the following warning:
"This interface is obsolete; use the DWebBrowserEvents2 interface instead. The DWebBrowserEvents2 interface provides more control over the WebBrowser control than the DWebBrowserEvents interface."
From my investigations I believe this interface has fallen into a state of disrepair and should not be used anymore. I can see no reason why anyone would need to use DWebBrowserEvents in preference to DWebBrowserEvents2; given that the minimum requirements, IE and Windows levels, are the same in both cases.
During my investigation I found 2 problems which appear IE related and not issues in the COM extension itself:
(1) The interface defines NewWindow as an event that takes just 2 arguments. However it appears it actually now takes 6 !!.
The COM trace shows:
[7060] T=00001de4 [7060] PHP:IEEventSinker InvokeEx [7060] T=00001de4 [7060] -- Invoke: 107 newwindow [9] flags=00000001 args=6 [7060] T=00001de4 [7060] alloc zval for arg 0 VT=00000008 [7060] T=00001de4 [7060] alloc zval for arg 1 VT=00000003 [7060] T=00001de4 [7060] alloc zval for arg 2 VT=00000008 [7060] T=00001de4 [7060] alloc zval for arg 3 VT=0000400c [7060] T=00001de4 [7060] alloc zval for arg 4 VT=00000008 [7060] T=00001de4 [7060] alloc zval for arg 5 VT=0000400b [7060] T=00001de4 [7060] arguments processed, prepare to do some work [7060] T=00001de4 [7060] function called ok
So defining the event handler as described on the MSDN site will result in unpredictable behaviour; certainly navigation will not be prevented with the supplied testcase.
The 6th argument is of type VT_VOOL so I am guessing that's the "cancel" argument. By adding dummy arguments to the event handler as follows:
function NewWindow(&$dum1, $dum2, $dum3, $dum4, $dum5, &$Cancel) { $this->newWindowOpened = true; echo "NewWindow event was fired.\n"; variant_set($Cancel,true); return; }
and with the fix for defect 345764 applied then the NewWindow event is fired the first time its tried and navigation is cancelled. However any subsequent attempt to open any link in a new window is also prevented even though not all attempts result in a NewWindow event being reported and occasionally I am unable to close down IE so perhaps my guess at what the 6th argument does is invalid!!. Everything is fine when DWebBrowserEvents2 interface is used.
(2) The supplied testcase defines the "OnQuit" event which is, according to MSDN, defined by the DWebBrowserEvents interface. Alas not !! Or at least not using IE Version 6. The actual event name appears to be "Quit" and not "OnQuit". Again here is the COM trace of the event reported using the supplied test case:
[6012] PHP:IEEventSinker InvokeEx [6012] T=00000ff0 [6012] -- Invoke: 103 quit [4] flags=00000001 args=1 [6012] T=00000ff0 [6012] alloc zval for arg 0 VT=0000000b [6012] T=00000ff0 [6012] arguments processed, prepare to do some work [6012] T=00000ff0 [6012] failed to call func
This clearly shows the event is named "quit" and so the call to the any handler named "onQuit" fails. Modifying the testcase to define a method "Quit" and the user defined method fires OK.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
|
| | Add comment |
|
| php code to upload a url correctly Corden James CM&MC Manchester 19:30:29 |
| | I have a form in which users submit a url. I am having problems as some people submit the url in the format http://www.blah.blah.org <http://www.blah.blah.org/> while others submit in the format www.blah.blah.org <http://www.blah.blah.org/> I have designed the form so that it seems fairly obvious (to me anyway) not to include the http:// but people are still doing it (presumably because they are copying and pasting from a browser). My form processing script is designed to add http:// to the submitted url and place the modified url in a database for future use. As you can imagine sometimes I end up with urls such as http://http://www.blah.blah.org <http://http:/www.blah.blah.org> in my database. Hence I need a more rigorous form processing script that is capable of first checking if the url includes http:// and then processes accordingly. Can anyone point me in the right direction for such a script?
Thanks
Dr James Corden
Technology Evaluation Manager
TrusTECH, Innovation Unit
1st Floor Postgraduate Centre
Manchester Royal Infirmary
Oxford Road
Manchester
M13 9WL
Tel: 0161 276 5782
Fax: 0161 276 5766
E-mail: james.corden@cmmc.nhs.uk
Web: http://www.trustech.org.uk
This email and any files transmitted with it are confidential and solely for the use of the intended recipient. It may contain material protected by law as a legally privileged document and copyright work. Its content should not be disclosed and it should not be given or copied to anyone other than the person(s) named or referenced above. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
If you have received this email in error please notify sender immediately on +44 (0161) 276 5782
|
| | 8 answers | Add comment |
|
| two php.ini on the same server Phpdevster 18:59:05 |
| | Hi
i am trying to run two Apache server on the same machine and that is work fine
but the problem is how to create separate php.ini for each Apache server . is that possible ??
|
| | 4 answer | Add comment |
|
| [PHP-DEV] PHP 5.2.1RC4 Released Ilia Alshanetsky 18:34:01 |
| | The final release candidate for PHP 5.2.1, RC4 is now available for download. Pending any problems this will be released as 5.2.1 next week, so this is the last chance to identify any critical issues before it is too late. If you have not tried any previous RCs, please do so now. The tar balls can be found at the URLs below and win32 binaries will follow shortly.
http://downloads.php.net/ilia/php-5.2.1RC4.tar.bz2 (md5sum: f50578276f653b1f523150e3ff987f03) http://downloads.php.net/ilia/php-5.2.1RC4.tar.gz (md5sum: 361197eb2b21b36e2e20cb132da2cf16)
I'd like to ask all developers to refrain from making any (no matter how trivial) commits to the 5.2 branch until 5.2.1 is released, if you feel you have a critical patch, please run it by me first, thanks.
Ilia Alshanetsky 5.2 Release Master
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 4 answer | Add comment |
|
| retrieve all the groups a user is memberOf from active directory? Bing Du 18:14:36 |
| | Hi,
Sorry if the top is not closely PHP related. But I need to accomplish it using PHP.
I can query the attribute 'memberOf' of a user from the active directory server with no problem. The challenge I'm facing now is how to obtain all the groups a user is member of. In many cases, a user can be in many groups which could be nested. Say, user is a member of group B which is a member of group A. So user should be member of group A implicitly. But in active directory, user's account only has
memberOf: CN=Group_B,OU=security groups,OU=Users,OU=Coll,DC=some,DC=edu
I can then check if Group_B's LDAP entry has any 'memberOf' attribute, so on and so on. If user's LDAP entry has multiple 'memberOf' attributes, I have to check each one to see if each group has any parent groups. Anybody ever had to deal with such a kind of issue and would like to shed some light (better with some code samples) how it should be done effectively? Any ideas would be greatly appreciated.
Thanks,
Bing
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
|
| | 2 answer | Add comment |
|
| bit wise math? Is there a function to easily return the bits? Blackwater Dev 16:30:13 |
| | Is there a php function I can call to pass in a number and get the values returned?
For example, pass in 7 and get 1,2,4 ?
Thanks!
|
| | 8 answers | Add comment |
|