OT: Whatsa diff? PHP

between this -
if (!$foo) {
and this -
if (!$foo && false) {
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================

I did too, smartass! 8oP
I just want to repeat and make sure I understood. Honestly,
that sounds
like you should just remove the code block, then, instead of
dealing with
it. If it doesn't do anything, why have it compile?
i've had too strange of a week. did you see that problem
posted today?
crazy crazy crazy. i'm repeating things back to everybody
lately, just to
make sure.
"Murray *ACE*" <[email protected]> wrote
in message
news:[email protected]...
> It's weird - but I actually READ what they put on the
page! 8)
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.dreamweavermx-templates.com
- Template Triage!
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
>
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
> ==================
>
>
> "crash" <[email protected]> wrote in message
> news:[email protected]...
>> So it's like it puts that code in no matter what,
and just toggle's that
>> "option" if you wish to authenticate by levels?
>>
>> that does seem strange. thanks for explanation -
thanks murry for the
>> quesiton! :O)
>>
>>
>> "David Powers" <[email protected]> wrote in
message
>> news:[email protected]...
>>> Murray *ACE* wrote:
>>>> between this -
>>>>
>>>> if (!$foo) {
>>>>
>>>> and this -
>>>>
>>>> if (!$foo && false) {
>>>
>>> I suspect you have been looking at some
Dreamweaver code (in the User
>>> Authentication server behavior). It's puzzled me
for some time, but I
>>> think the && false simply prevents the
conditional from ever running.
>>>
>>> In the case of the Log In User SB, &&
false is added if you don't want
>>> to set entry according to access levels. If you
do want access levels,
>>> it's set to && true.
>>>
>>> It's a strange way of coding it. If someone else
has a better
>>> explanation, I'd love to hear it.
>>>
>>> --
>>> David Powers
>>> Adobe Community Expert
>>> Author, "Foundation PHP for Dreamweaver 8"
(friends of ED)
>>>
http://foundationphp.com/
>>
>>
>
>

Similar Messages

  • Process dumps core, when started by SMF - fine when manually started

    Hi.
    h2. Explanation
    I compiled [Nagios 3.2.0|http://www.nagios.org/] manually, and created a SMF manifest and method file, based on the [OpenCSW supplied files for Nagios|http://www.opencsw.org/packages/nagios]. The method file is based on [what the Nagios guys supply|http://pastebin.ca/1577792] , but [changed a little|http://pastebin.ca/diff.php?id1=1577792&id2=1577793] .
    When I enable the "application/nagios" service, it right away goes into maintenance state. In the /var/svc/log/application-nagios:default.log log file, there's consequently then this:
    + exit 0
    [ Sep 24 13:17:10 Method "start" exited with status 0 ]
    [ Sep 24 13:17:11 Stopping because process dumped core. ]
    [ Sep 24 13:17:11 Executing stop method ("/opt/local/nagios-3.2.0/method/nagios stop") ]
    + test -r /lib/svc/share/smf_include.sh
    [...]It died, because of "*Stopping because process dumped core.*"
    If you have a look at the method file, you'll find that I dump the environment with env to a file. When I login as root and set the environment variables to exactly those values and remove any other additional variables, I can run the method / init script just fine; the nagios process doesn't core dump.
    h2. Question
    Why does the process dump core, when it's run by SMF?
    Additional questoin:Where's the core dump? I did a "find / -name core" and found nothing. I also changed coreadm:
    --($ ~)-- LC_ALL=C coreadm
         global core file pattern: /var/core/core.%f.%pAfter a reboot, there's nothing in /var/core (the directory exists).
    I'm on Solaris 10 5/09 Sparc.
    h2. Files
    *[svccfg export nagios|http://pastebin.ca/1577787]*
    *[Method file /opt/local/nagios-3.2.0/method/nagios|http://pastebin.ca/1577793]*

    There's no such directory as "/var/crash":
    --($ ~)-- ls -lad /var/c*
    drwxr-xr-x    4 root     sys             4 Sep 21 14:03 /var/cache
    drwxr-xr-x    2 root     sys             7 Sep 21 13:32 /var/cc-ccr
    drwxr-xr-x    2 root     root            2 Sep 24 13:14 /var/core
    drwxr-xr-x    2 root     sys             3 Sep 21 14:03 /var/cronGranted, since when I posted that question and now, I booted the NGZ numerous times. But in a default installation of Solaris 10, that directory isn't removed during shutdown/boot, if it exist. At least it exists on my other servers, even if it is empty (eg. like that, on a different server:
    --($ ~)-- ls -laR /var/crash/
    /var/crash/:
    total 3
    drwxr-xr-x    3 root     root          512 Mai 19  2006 .
    drwxr-xr-x   56 root     sys          1024 Dez  7  2008 ..
    drwxrwx---    2 root     adm           512 Sep 22  2008 winds06
    /var/crash/winds06:
    total 2
    drwxrwx---    2 root     adm           512 Sep 22  2008 .
    drwxr-xr-x    3 root     root          512 Mai 19  2006 ..So, I'd say that the coredump has never been stored in /var/crash.
    Anyway - isn't /var/crash just used for crashdumps, when the whole machine goes down? According to [man filesystem(5)|http://docs.sun.com/app/docs/doc/816-5175/filesystem-5?a=view] , it is &#8594; "+Default depository for kernel crash dumps.+"
    If coredumps aren't in /var/crash, aren't named "core*" and aren't stored in the directory specified by coreadm, where are they?
    Converse: If no coredump is created, why does Solaris "speak" about a coredump being created?

  • Website on my Mac with Sqlite database

    I'm attempting to build a prototype website on my Mac with a Sqlite database but how do I set up php to communicate with Sqlite.
    I"m running OS 10.4.11 and Sqlite 3. I've set the sharing option to activate Apache which works with a small webpage, but I cannot determine if php is even installed on this machine. I've  put a phpinfo statement in the webpage which produces no output.

    I've installed PHP 5 in the last month on my Tiger 10.4.11.
    Here is the link to the instructions I used.  See link to install package on this page.
    http://maestric.com/doc/mac/upgrade_php5_tiger
    I don't think you have to do any of the stuff recommended on that page.
    If you want to get error messages in php, you do need to modify the php.ini.
    Here is the diff output of the changes that I made.  Confusing to read, I know. First set is new; second set is old etc.
    mac $ cd /usr/local/php5/lib
    mac $ pwd
    /usr/local/php5/lib
    mac $ diff php.ini php.ini.original
    2,4d1
    < ;
    < ; path:
    < ; /usr/local/php5/lib/php.ini
    375,376c372
    < ; -----Changed-->
    < display_errors = On
    > display_errors = Off
    381,382c377
    < ; -----Changed-->
    < display_startup_errors = On
    > display_startup_errors = Off
    427c422
    < error_prepend_string = "<font color=ff0000>"
    > ;error_prepend_string = "<font color=ff0000>"
    430c425
    < error_append_string = "</font>"
    > ;error_append_string = "</font>"
    432d426
    < ; -----Changed-->
    434,435c428
    < ; /usr/local/php5/lib/php.ini
    < error_log = PHPLog
    > ;error_log = filename
    438c431
    < error_log = syslog
    > ;error_log = syslog
    601,603c594
    < ; -----Changed-->
    < upload_tmp_dir = /usr/local/php5/uploads
    <
    > ;upload_tmp_dir =
    mac $
    Robert

  • In terms of efficiency and expandability, how does iPlanet Portal software differ from a portal written in PHP and PERL?

     

    In my opinion the fact that the portal uses primarily JAVA, lends itself to quite a bit of expandability. I think it will be quite difficult for a portal written in PHP (Such as PHP Nuke) to share user session and state information accross multiple machines/instances. The iPlanet portal server has been designed to accomodate this, through the use of specialised session services. The threading model in Java also lends itself to greater efficiency when executing multiple tasks, whereas a portal based on PERL, would have to start a new process everytime a service is requested, which can then become VERY resource intensive.
    In terms of expandability, the fact that it is contaned inside a JAVA VM will allow you to develop and deploy alot of custom developed applications for your portal. There is also quite a good portal API for the iPlanet portal server that will allow you to tap into the Logging,Session,Profile and Authentication services provided by the portal.
    Hope this helps!

  • What is diff b/w reuse_alv_grid_display and reuse_alv_grid_display_lvc

    Hi everbody,
    what is diff b/w reuse_alv_grid_display and reuse_alv_grid_display_lvc.
    can u give a dteils on it .
    Regards,
    Priya

    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV? http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV? http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV? http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Check this for basic concepts of OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Tabstrip
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
    Editable ALV
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
    Tree
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
    http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    http://www.sap-img.com/abap/what-is-alv-programming.htm
    http://www.sap-img.com/abap-function.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
    http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
    http://www.sap-img.com/abap-function.htm

  • Safari with Windows Media Player cannot use PHP as filename/src/url

    I'm running Windows XP Pro SP2 with Windows Media Player 11
    and Safari 3 public beta. In addition to being the absolute
    slowest browser among MSIE, Firefox, Netscape, and Opera, the
    Safari browser has two annoying WMP defects.
    1) Even with WMP 11 installed, the code below for embedding
    can use either the classid for WMP v6.4 or v7+ but Safari
    (or rather it's plugin) always displays a v6.4 looking UI.
    All other browsers display the media player using the v11 UI
    2) Safari will not download the movie if the "filename" param
    is a web url (e.g. getmovie.php?select=1234 ) rather than the
    precise name of the movie file itself (e.g. "movie.wmv"). The
    other browsers may differ in use of the param name="xxxx", where
    xxxx is "filename" or "src" or "url" or "data" ... but Safari
    will not work using any of these.
    Has anyone successfully embedded a WMP object that uses the
    URL as a PHP page (or other server-side script) ? I have already
    my server-side PHP code that works perfectly for MSIE, Firefox,
    Netscape, and opera. Safari is the only problem browser.
    ------------------------CODE------------
    //Media Player v6.4
    // CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95
    //Media Player v7,9,10,11
    // CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6
    <object id="MediaPlayer"
    classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    type="application/x-oleobject"
    height="300" width="300"
    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab #Version=6,4,5,715"
    standby="Loading Microsoft Windows Media Player components...">
    <param name="url" value="http://www.yourdomain.com/movie.wmv">
    <!-- For other browsers * Windows Media Player -->
    <!--[if !IE]> <-->
    <object type="application/x-mplayer2" height="300" width="300">
    <param name="filename" value="http://www.yourdomain.com/movie.wmv">
    </object>
    <!--> <![endif]-->
    </object>

    I have run into several issues pointing to what you are describing...
    I fixed my Safari by installing the WMP plugin. I am able to view visualizations embedded into a webpage, one of which I created...I am able to view videos and so on.. Before I installed the plugin, All that would load is a place holder which looked like the old WMP and would not function properly. However this is what is displayed beside the media which is embedded.
    I think that I got the plugin by going to the download page for Safari and looking for plugins. Funny thing was that the plugin that I installed was the one for Firefox on its site that nobody every installs because Firefox gets the plugin if you already have WMP11 installed. Anyway this should solve your problem...with most..
    I have noticed just now that PHP served links or applications which launch in their own window and are protected by PHP script do work but still display a lack of functionality showing the Version 6.4 that you are speaking of. I checked it out using the KDGE Live Stream which opens another window, and displays version 11 properly ( in other browsers ), the link which is served is also protected and will close any media player that tries to play it on its own. It soley depends on the script which is coded into the page or window for the player. I can see this method as useful for a corporation as large and well advertised as ClearChannel Productions, because of the lack of bandwidth and cost to the company. Several sources do this and it winds up being an issue for the website administrator and designers to take care of, or update the script, or the person who has written the plugin, which could be from a number of resource; this particular instance would be the author of the WMP Plugin for Firefox.
    For any other purpose though the plugin I mentioned above should get rid of ( MOST ) of that problem.
    http://www.apple.com/safari/download/plugins.html
    Message was edited by: heath28m
    This is also a good link for sources and coding issues when embedding WMP.. Hope some of this helps..http://www.codingforums.com/showthread.php?t=50666&page=39
    Message was edited by: heath28m

  • Local net ssh failure Tiger (PHP MYSQL Apache Dreamweaver)

    I can't be sure, but I think this problem started with the latest security update. I'm 80% done with my first web application using PHP and Mysql in dreamweaver when I began getting an unknown error from dreamweaver when attempting to connect to my DB on my testing server. After 2 days of debugging and re-installing apps I finally wiped the testing server (G4 400 Cube memory topped out 120GB HD, down to the metal) reinstalled Tiger, fully patched, edited the httpd.conf file to enable php 4.4.1. Installed Mysql 4.1 (which was the last general distribution with a packaged install) and the server works fine, so I created myself as a user in mysql @localhost & @localmachinename to replicate root user. Navicat was up and running in no time, so I re-populated my server from my backup. Then I jumped over to my design workstation (G5 2Ghz Dual, 2GB Ram, 250GB HD) only to find navicat can't login to the mysql server because ssh wont connect to the G4. After much testing I discovered ALL of my macs will attach only to external addresses. My linux box, external linux boxes, even windows boxes emulating ssh will attach internally or extenally, the macs won't talk to anything in the local network 10.0.x What the ****! My project is now past due and I'm stuck because I can no longer ssh from any macs to internal machines mac or otherwise. PLEASE HELP!!! is there an SSH pakage so I can re-install? I couldn't find a mac ssh package on apple or ssh.org, Will that even make a difference? Can I uninstall the security update? Can anyone suggest a workaround?
    My network
    *10.0.1.2 Ganymede (Mandrivia 10 server and Gateway)
    *10.0.1.6 Artemis (G5 10.4.7) Web/Video
    *10.0.1.10 Miletus (G4 10.4.7) Web Testing
    *10.0.1.5 Venus (G4 10.4.7) Photo editing
    *10.0.1.4 Hero (G3 ibook 10.4.7) office work
    *10.0.1.7 Hermes (iMac 10.4.7) iLife
    *10.0.1.3 Apollo (Wintendo XP) Web Testing/The Sims
    Here are several ssh logs.
    mac to mac (FAIL)
    Artemis:~ phil$ ssh -vv 10.0.1.10
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 10.0.1.10 [10.0.1.10] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 1.99, remote software version OpenSSH_4.2
    debug1: match: OpenSSH_4.2 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    Write failed: Broken pipe
    Artemis:~ phil$
    Mac to linux internal (FAIL)
    Artemis:~ phil$ ssh -vv 10.0.1.2
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 10.0.1.2 [10.0.1.2] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: match: OpenSSH_4.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    Write failed: Broken pipe
    mac to linux external (Success)
    Artemis:~ phil$ ssh -vv 69.253.x.x
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 69.253.x.x [69.253.x.x] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: match: OpenSSH_4.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    debug2: dhgenkey: priv key bits set: 130/256
    debug2: bits set: 514/1024
    debug1: SSH2MSG_KEX_DH_GEXINIT sent
    debug1: expecting SSH2MSG_KEX_DH_GEXREPLY
    debug1: Host '69.253.239.85' is known and matches the RSA host key.
    debug1: Found key in /Users/phil/.ssh/known_hosts:3
    debug2: bits set: 516/1024
    debug1: sshrsaverify: signature correct
    debug2: kexderivekeys
    debug2: set_newkeys: mode 1
    debug1: SSH2MSGNEWKEYS sent
    debug1: expecting SSH2MSGNEWKEYS
    debug2: set_newkeys: mode 0
    debug1: SSH2MSGNEWKEYS received
    debug1: SSH2MSG_SERVICEREQUEST sent
    debug2: service_accept: ssh-userauth
    debug1: SSH2MSG_SERVICEACCEPT received
    debug2: key: /Users/phil/.ssh/identity (0x0)
    debug2: key: /Users/phil/.ssh/id_rsa (0x0)
    debug2: key: /Users/phil/.ssh/id_dsa (0x0)
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Trying private key: /Users/phil/.ssh/identity
    debug1: Trying private key: /Users/phil/.ssh/id_rsa
    debug1: Trying private key: /Users/phil/.ssh/id_dsa
    debug2: we did not send a packet, disable method
    debug1: Next authentication method: keyboard-interactive
    debug2: userauth_kbdint
    debug2: we sent a keyboard-interactive packet, wait for reply
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug2: we did not send a packet, disable method
    debug1: Next authentication method: password
    [email protected]'s password:
    debug2: we sent a password packet, wait for reply
    debug1: Authentication succeeded (password).
    debug1: channel 0: new [client-session]
    debug2: channel 0: send open
    debug1: Entering interactive session.
    debug2: callback start
    debug2: clientsession2setup: id 0
    debug2: channel 0: request pty-req confirm 0
    debug2: channel 0: request shell confirm 0
    debug2: fd 3 setting TCP_NODELAY
    debug2: callback done
    debug2: channel 0: open confirm rwindow 0 rmax 32768
    debug2: channel 0: rcvd adjust 131072
    Last login: Tue Aug 15 12:56:42 2006 from artemis.ganymedia.net
    [phil@ganymede ~]$
    G5 Dual 2G   Mac OS X (10.4.7)  

    Mac comes with a fully functioning Apache web server with all the scripting languages (except VB). You need to enable them in the configuration file.
    You need some light weight UNIX administration skills to do this. Use the system restore disk to set the password for the root account.
    Open a terminal screen from the Utilities folder in Applications. Type "su", press return, then enter the root password you set using the system restore disk.
    Make a backup copy of the Apache configuration file with the following command (type this in with no mistakes and press the return key).
    cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.copy
    Enter the following to open the Apache configuration (type this in with no mistakes and hit the return key).
    /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/httpd/httpd.conf &
    Locate and remove the # comment symbol from the following lines and save the file in /etc/httpd/httpd.conf.
    #LoadModule php4_module libexec/httpd/libphp4.so
    #AddModule mod_php4.c
    Exit the TextEdit application and quit out of the terminal application.
    Put the following web page into a file named greetings.php inside the folder Library/WebServer/Documents.
    <html>
    <head>
    <title>Experiment</title>
    </head>
    <?php
    echo "Greetings";
    ?>
    </body>
    </html>
    Once you have made these changes, you can reboot to activate the changes.
    Put the following into your browser to test the configuration.
    http://localhost/greetings.php
    You should see "Greetings" on a web page titled "Experiment".
    MySQL is a separate server that you need to download and configure to complete your web server.
    I hope this helps.
    Best regards - Greg

  • When I repair disk permissions I get the following:Repairing permissions for "MacIntosh HD" Determining correct file permissions. Permissions differ on ./Library/Widgets, should be drwxr-xr-x , they are drwxrwxr-x  Owner and group corrected on ./Library/W

    Repairing permissions for “MacIntosh HD”
    Determining correct file permissions.
    Permissions differ on ./Library/Widgets, should be drwxr-xr-x , they are drwxrwxr-x
    Owner and group corrected on ./Library/Widgets
    Permissions corrected on ./Library/Widgets
    Permissions differ on ./System/Library/User Template, should be drwx------ , they are drwxr-xr-x
    Owner and group corrected on ./System/Library/User Template
    Permissions corrected on ./System/Library/User Template
    Group differs on ./usr/bin/fetchmail, should be 0, group is 6
    Permissions differ on ./usr/bin/fetchmail, should be -rwxr-xr-x , they are -rwxr-sr-x
    Owner and group corrected on ./usr/bin/fetchmail
    Permissions corrected on ./usr/bin/fetchmail
    Permissions differ on ./usr/lib/php/build/Makefile.global, should be -r--r--r-- , they are -r-xr-xr-x
    Owner and group corrected on ./usr/lib/php/build/Makefile.global
    Permissions corrected on ./usr/lib/php/build/Makefile.global
    Permissions differ on ./usr/lib/php/build/acinclude.m4, should be -r--r--r-- , they are -r-xr-xr-x
    Owner and group corrected on ./usr/lib/php/build/acinclude.m4
    Permissions corrected on ./usr/lib/php/build/acinclude.m4
    Permissions differ on ./usr/lib/php/build/mkdep.awk, should be -r--r--r-- , they are -r-xr-xr-x
    Owner and group corrected on ./usr/lib/php/build/mkdep.awk
    Permissions corrected on ./usr/lib/php/build/mkdep.awk
    Permissions differ on ./usr/lib/php/build/phpize.m4, should be -r--r--r-- , they are -r-xr-xr-x
    Owner and group corrected on ./usr/lib/php/build/phpize.m4
    Permissions corrected on ./usr/lib/php/build/phpize.m4
    Permissions differ on ./usr/lib/php/build/scan_makefile_in.awk, should be -r--r--r-- , they are -r-xr-xr-x
    Owner and group corrected on ./usr/lib/php/build/scan_makefile_in.awk
    Permissions corrected on ./usr/lib/php/build/scan_makefile_in.awk
    Permissions differ on ./usr/lib/system/libmathCommon.A.dylib, should be -r-xr-xr-x , they are -rwxr-xr-x
    Owner and group corrected on ./usr/lib/system/libmathCommon.A.dylib
    Permissions corrected on ./usr/lib/system/libmathCommon.A.dylib
    Permissions differ on ./usr/libexec/dumpemacs, should be -r-sr-xr-x , they are -r-xr-xr-x
    Owner and group corrected on ./usr/libexec/dumpemacs
    Permissions corrected on ./usr/libexec/dumpemacs
    Permissions repair complete
    The privileges have been verified or repaired on the selected volume
    Then I sometimes get the brown screen that states,You must re-start your computer.
    I have already zeroed out the hard drive and re-installed Panther and the upgrade Tiger disc.
    I repair permissions using the Tiger disc upgrade.
    Can anyone help me with this??

    > I repair permissions using the Tiger disc upgrade.
    One thing to note...  When running Repair Disk Permissions, it is best to run it while started up normally, from your normal startup disk, not from a Mac OS X installation disc.  The only time you should run it while started up from an installation disc is if some problem is preventing you from starting up normally. OTOH, Repair Disk can only be used when starting up from a different disk (such as an installation disc).
    So, I would start up normally, run Disk Utility, and use Repair Disk Permissions on your normal startup disk.
    NOTE:  Repair Disk Permissions often gives alerts messages that can be ignored.  They are more "informational," not serious errors.
    http://support.apple.com/kb/TS1448
    You should still run it periodically.  When you run it, what needs to be repaired has been repaired; consider the rest of it an FYI.  I've never experience a problem, where a Repair Disk Permissions message actually caused a problem.  But, if you ever get an error while running Repair Disk (or Verify Disk), that is usually a serious problem.

  • "Permissions Differ on "usr/lib/ruby" ?!

    I'm using Leopard. After a recent startup problem with a Macbook I ran Disk Utilities, Verify Disk Permissions, and got the following message:
    "Permissions differ on "usr/lib/ruby", should be lrwxr-xr-x, they are drwxr-xr-x."
    1) What does this mean?
    2) Is it a serious security issue (i.e. malware)?
    3) What do I do about it?
    Thanks
    Message was edited by: Cowfreek

    ============================================================================
    "If you use the menu item "Go" and select the "Go to folder..." option, you can type in:
    /usr/lib
    and check to see if ruby is an alias or an actual folder. It should appear as an alias in the Finder,"
    ============================================================================
    Ok, did that so I'll give you an long list of stuff I found, if you have the patience to go through it all.
    Finder > Go > Go to folder > /usr/lib. There are 4 Ruby aliases (with arrow symbol) there: "libruby.1.dylib" , "libsvnswigruby-1.dylib" , "libsvnswigruby-1.0.dylib" and "libsvnswigruby-1.0.0.0.dylib".
    AND, yes, there is also an ACTUAL RUBY FOLDER (blue, no arrow) in usr/lib.
    This Ruby folder breaks down into the following subfolders: (Finder>Library>)Ruby Folder (blue)> site_ruby > 1.8 > osx and powerpc-darwin 8.0 (two folders). In this "osx" folder there are 9 .rb files called active_record.rb, addressbook.rb, appkit.rb, cocoa.rb, coredate.rb, foundation.rb, NMOSXDockHelper.rb, qtkit.rb and webkit.rb. In the powerpc-darwin8.0 folder is a rubycocoa.bundle icon (like a lego brick).
    The followinig actual folders (blue, no arrow)) are also present in usr/lib: dtrace, groff, java, mecab, openmpi, pam, php, pkgconfig, podcastproducer, sa, samba, sas12, sqlite3, system, and zsh.
    =================================================================
    "and the original folder is supposed to be in
    "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby"
    You might also check that location to see if the ruby folder is there."
    ==============================================================================
    Yes, it's also in this location. There are 2 main Ruby folders (blue, nop arrow) in System/ Library/Frameworks: one called 'RubyCocoa.framework', the other Ruby.framework. Ruby.framework > 1.8 > usr > (here there are three more folders 'bin' , 'lib' and 'share') lib > ruby. Here, in this ruby folder are aliases (site_ruby' and 'user_gems' as well as actual folders called 'gems' and 1.8. In 1.8 there are further subfolders named bigdecimal, cgi, date, digest and such which are NOT in the Ruby folder in usr/lib.
    ============================================================================
    I have no idea whether anything in the Mac OS actually uses ruby stuff or not. Ruby is a programming language, and Ruby on Rails is used in web development.
    Francine
    Francine
    Schwieder
    ================================================================================
    By the way, I performed the Safari 3.1 update, Garageband Update 4.1.2 , iPhoto Update 7.1.2 , and Airport Utility 5.3.1 update two days before this all happened. I rebooted after the updates were fully installed, used the macbook (starting and rebooting 2 or 3 times duringthe course of the day, after which everything seemed fine). Two days later when I tried to start the Macbook I got a very long blue screen (in excess of 7-8 minutes) and had to try starting several times before I could log on. Then I ran the disk utility and got the Ruby permissions message. I've performed all the disk repair stuff and the message remains.
    I searched the Internet and could find no other examples of this happening. So, questions remain:
    1. Is there ANY possible way this could be malware, spyware, etc.?
    2. Any ideas as to how this change could have happened on my system?
    Thanks!
    Message was edited by: Cowfreek

  • PHP and Mail

    I wanted to share with the community a work around we have developed for using the mail function within PHP when compiled with NSAPI (Iplanet SunOne).
    Quick summary of the problem.
    Description:
    mail() stops working a few minutes after Sunone 6 web server starts,
    which makes this look like a resource problem...
    Config line: "./configure --with-mysql=/usr/local/mysql
    --with-nsapi=/home/netscape/servers --enable-track-vars --enable-libgcc
    --with-ldap"
    Note that mail() does work briefly after web server is restarted so it
    doesn't seem to be a configuration problem.
    Reproduce code:
    <?php
    mail("[email protected]", "Test Subject", "Test Body");
    ?>
    Expected result:
    expect to receive an email
    Actual result:
    no email received
    I get no php or system errors but the following error shows up in the
    IPlanet logs:
    "trying to GET /is/sys
    net/test/email.php, php4_execute reports: PHP Warning: mail(): Could
    not execute
    mail delivery program '/usr/lib/sendmail -t'"
    Solution:
    Here's a solution that appears to work for us so far. It might be nice
    if the php developers would consider a --with-sfio parameter in
    configure that took care of this. Our exec command is still broken so
    I'll probably have to do this same type of thing for that.
    1. install sfio from AT*T
    2. setenv LIBS "-L/usr/local/lib/sfio -lsfio"
    3. modify ext/standard/mail.c
    4. modify /usr/local/include/sfio/sfio.h so references to other sfio
    header files are absolute paths (if I use -I/usr/local/include/sfio to
    find the files it produces errors for files other than mail.c)
    5. run configure and compile as normal
    here's a diff or my code and the original mail.c:
    diff mail.c mail.c.orig
    23c23
    < #include </usr/local/include/sfio/sfio.h>
    #include <stdio.h>177c177
    < Sfio_t *sendmail=NULL;
    FILE *sendmail;215c215
    < sendmail = sfpopen(sendmail, sendmail_cmd, "w");
    sendmail = popen(sendmail_cmd, "w");224c224
    < sfclose(sendmail);
    pclose(sendmail);228,229c228,229
    < sfprintf(sendmail, "To: %s\n", to);
    < sfprintf(sendmail, "Subject: %s\n", subject);
    fprintf(sendmail, "To: %s\n", to);
    fprintf(sendmail, "Subject: %s\n", subject);231c231
    < sfprintf(sendmail, "%s\n", headers);
    fprintf(sendmail, "%s\n", headers);233,234c233,234
    < sfprintf(sendmail, "\n%s\n", message);
    < ret = sfclose(sendmail);
    fprintf(sendmail, "\n%s\n", message);
    ret = pclose(sendmail);This information has also been posted on the PHP forum at
    http://bugs.php.net/bug.php?id=28748
    We had a heck of a time finding much information about the exec and mail not working on Solaris so we wanted to share this with everyone. Hope it helps someone out!
    Cheers,
    Ken and David
    Kalamazoo College

    If you want to send through your mail server you will only need SMTP for sending. You can however also send through your ISP's mail server.
    As far as security goes: The most common issue is not PHP's mail function, but the web forms used to call it. If you go for one of the most common Forum SW, you should probably be OK.

  • OpenSUSE 11.1 (x86_64) Apache2 PHP Oracle !oci_connect

    Hi all,
    can't connect to an oracle instance oci_connect()
    Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories in /srv/www/htdocs/ora/index.php on line 3
    System:
    openSUSE 11.1 (x86_64)
    PHP Version 5.2.11
    OCI 1.4.0 Alpha $Revision: 1.269.2.16.2.38.2.32 $
    Compile-time ORACLE_HOME: opt/oracle/product/10.2.0/db_1
    Libraries Used: -Wl,-rpath,/opt/oracle/product/10.2.0/db_1/lib -L/opt/oracle/product/10.2.0/db_1/lib -lclntsh
    set | grep ora
    ORACLE_BASE=/opt/oracle
    ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
    ORA_ASM_HOME=/opt/oracle/product/10gR2/asm
    ORA_CRS_HOME=/opt/oracle/product/10gR2/crs
    PATH=/home/user/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/novell/ncl/bin:/opt/oracle/product/10.2.0/db_1/bin
                   decorate diff-filter=
    Does anyone has an ideer why the connection can't established.
    Best regards
    Till

    sorry....
    Workaround: add the apache user to the oracle group. This only occurs
    in 5.2.1. Previous versions of PHP which I've tried (5.0.3 and 5.1.0)
    did not have this problem. Obviously this is a security issue as the
    apache user now has a lot more things it can use to wreak havoc.

  • Flex Diff Algorithm

    A guy named Paul Butler made a diff algorithm for PHP.  It compares two strings, and shows you the differences between the strings.  The original PHP code is here:
    http://github.com/paulgb/simplediff/blob/5bfe1d2a8f967c7901ace50f04ac2d9308ed3169/simpledi ff.php
    I have translated it into Flex, and given it an Air wrapper  (the two primary functions, diff and HTMLdiff should work fine in any flex app, but the wrapper requires AIR since it uses an HTML container).  Just putting this out there, as it is kind of cool and may be useful to some folks.  The code is pretty ugly, so if anyone wants to clean it up, please do so and repost (the comments were meant to help me translate from PHP to actionscript):
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="300" width="400" viewSourceURL="srcview/index.html">
        <mx:Label x="10" y="10" text="Old:"/>
        <mx:TextArea x="10" y="36" width="194" height="110" id="oldbox" text="This is the original text before any changes have been made."/>
        <mx:Label x="212" y="10" text="New:"/>
        <mx:TextArea x="212" y="36" width="176" height="110" id="newbox" text="This is the new text after all the changes were made."/>
        <mx:HTML right="10" left="10" top="180" bottom="10" id="result"/>
        <mx:Button x="347" y="8" label="Go" click="go()"/>
        <mx:Script>
            <![CDATA[
                public function diff($old:Array, $new:Array):Array{
                    var $matrix:Array = new Array();
                    var $maxlen:uint;
                    var $omax:uint;
                    var $nmax:uint;
                    var $return:Array = new Array();
                    var $subreturn:Array = new Array();
                    //The next two lines imitate foreach($old as $oindex => $ovalue){
                    for (var $oindexstring:String in $old){
                        var $oindex:uint = uint($oindexstring);
                        var $ovalue:String = $old[$oindex];
                    //The next lines imitate $nkeys = array_keys($new, $ovalue);   
                        var $nkeys:Array = new Array();
                        for (var $nkey:String in $new){
                            if ($new[$nkey] == $ovalue){
                                $nkeys.push($nkey);
                    //The next line imitates foreach($nkeys as $nindex){
                        for each (var $nindex:uint in $nkeys){
                            //The next line imitates $matrix[$oindex][$nindex] = isset($matrix[$oindex - 1][$nindex -1]) ? $matrix[$oindex - 1][$nindex - 1] + 1 : 1;
                            if ($matrix.hasOwnProperty(String($oindex-1))){
                                if ($matrix[$oindex-1].hasOwnProperty(String($nindex-1))){
                                    if ($matrix.hasOwnProperty(String($oindex))){
                                        $matrix[$oindex][$nindex] = $matrix[$oindex - 1][$nindex - 1] + 1;
                                    } else {
                                        $matrix[$oindex] = new Array();
                                        $matrix[$oindex][$nindex] = $matrix[$oindex - 1][$nindex - 1] + 1;
                                } else {
                                    if ($matrix.hasOwnProperty(String($oindex))){
                                        $matrix[$oindex][$nindex] = 1;
                                    } else {
                                        $matrix[$oindex] = new Array();
                                        $matrix[$oindex][$nindex] = 1;
                            } else {
                                if ($matrix.hasOwnProperty(String($oindex))){
                                    $matrix[$oindex][$nindex] = 1;
                                } else {
                                    $matrix[$oindex] = new Array();
                                    $matrix[$oindex][$nindex] = 1;
                            if ($matrix[$oindex][$nindex] > $maxlen){
                                $maxlen = $matrix[$oindex][$nindex];
                                $omax = $oindex + 1 - $maxlen;
                                $nmax = $nindex + 1 - $maxlen;
                    if($maxlen == 0){
                        $subreturn["d"] = $old;
                        $subreturn["i"] = $new;
                        $return.push($subreturn);
                        return $return;
                    } else {
                        //Next line is diff(array_slice($old, 0, $omax), array_slice($new, 0, $nmax));
                        $subreturn = diff($old.slice(0, $omax), $new.slice(0, $nmax));
                        $return = $return.concat($subreturn);
                        //Next line imitates array_slice($new, $nmax, $maxlen)
                        $subreturn = $new.slice($nmax, $nmax + $maxlen);
                        $return = $return.concat($subreturn);
                        //Next line is diff(array_slice($old, $omax + $maxlen), array_slice($new, $nmax + $maxlen))
                        $subreturn = diff($old.slice($omax + $maxlen), $new.slice($nmax + $maxlen));
                        $return = $return.concat($subreturn);
                        return $return;
                public function go():void{
                    result.htmlText = htmlDiff(oldbox.text, newbox.text);
                public function htmlDiff($old:String, $new:String):String{
                    var $ret:String = "";
                    var $diff:Array = diff($old.split(" "), $new.split(" "));
                    for each(var $k:Object in $diff){
                        if($k.constructor == Array){
                            //$ret += (!empty($k['d'])?"<del>".implode(' ',$k['d'])."</del> ":'').
                            if ($k['d'] == undefined || $k['d'].length == 0){
                                $ret += "";
                            } else {
                                $ret += "<del style=\"color: red ; text-decoration: line-through\" >"+$k["d"].join(" ")+"</del> ";
                            //(!empty($k['i'])?"<ins>".implode(' ',$k['i'])."</ins> ":'');
                            if ($k['i'] == undefined || $k['i'].length == 0){
                                $ret += "";
                            } else {
                                $ret += "<ins style=\"color: blue ; text-decoration: underline\" >"+$k["i"].join(" ")+"</ins> "
                        } else {
                            $ret += $k + ' ';
                    return "<html><body>"+$ret+"</body></html>";
            ]]>
        </mx:Script>
        <mx:Label x="10" y="154" text="Diff Result:"/>
    </mx:WindowedApplication>

    Spend a good time with all the Java building blocks, especially OOP, data structures, collections etc. Ask more specific questions if you encounter problem.
    Also have a look at open source java diff library such as: http://code.google.com/p/java-diff-utils, go through their source code, see if you can find something useful

  • [SOLVED] warning: directory permissions differ on var/log/wicd/

    Hi,
    I've seen several posts about this but I couldn't really figure out what's the appropriate action. Well, anyway I get the following error message when doing a pacman -Syu
    warning: directory permissions differ on var/log/wicd/
    filesystem: 1363 package: 755
    Is it a bug? Should I change the filepermission of the directory, and if so to what?
    Last edited by OMGitsUGOD (2009-09-18 10:38:32)

    This is sort of related,
    http://bbs.archlinux.org/viewtopic.php?pid=432588
    or at least thats the post at the end has the same file permisions as I have in /var/log/wicd.
    $ ls -la /var/log/ | grep wicd
    d-wxrw--wt 2 root root 4096 2009-08-27 07:58 wicd
    I'm pretty bad at this stuff, but isn't this rather 1361 than 1363, or am I totally wrong? And why not allow theowner to read the file?
    Last edited by OMGitsUGOD (2009-09-17 08:43:32)

  • GDM update: directory permissions differ on /var/log/gdm/

    Hello,
    Running Arch 64Bits kernel 3.9.9-1 with systemd and i got the following warning during a gdm update today:
    (1/6) upgrading libgdm [######################] 100%
    (2/6) upgrading gdm [######################] 100%
    warning: directory permissions differ on /var/log/gdm/
    filesystem: 711 package: 1770
    Why would gdm need some 1770 permissions for log files? Looks pretty suspicious to me, especially the sticky bit thing. What did i miss?
    PS: BTW the update is successful (it's a warning afterall, not an error)
    Thanks
    EDIT:
    Looks like the opposite situation than 3 years ago:
    https://bbs.archlinux.org/viewtopic.php?id=94681
    https://bugs.archlinux.org/task/19294
    EDIT2: here's what i have in /var/log:
    msytux666 var # ls -la
    total 64
    drwxr-xr-x 14 root root 4096 Jul 6 15:34 .
    drwxr-xr-x 20 root root 4096 Jul 16 20:24 ..
    -rwxrwxrwx 1 root root 4192 Jun 19 11:27 .com.zerog.registry.xml
    drwxr-xr-x 7 root root 4096 Jul 7 00:07 abs
    drwxr-xr-x 8 root root 4096 Jun 16 17:28 cache
    drwxr-xr-x 3 root root 4096 Jun 17 19:07 db
    drwxr-xr-x 2 root root 4096 May 31 20:40 empty
    drwxrwxr-x 2 root games 4096 May 31 20:40 games
    drwx--x--x 2 gdm gdm 4096 Jun 15 14:23 gdm
    drwxr-xr-x 26 root root 4096 Jul 16 01:13 lib
    drwxr-xr-x 2 root root 4096 May 31 20:40 local
    lrwxrwxrwx 1 root root 11 May 31 20:40 lock -> ../run/lock
    drwxr-xr-x 6 root root 4096 Jul 18 00:33 log
    lrwxrwxrwx 1 root root 10 May 31 20:40 mail -> spool/mail
    drwxr-xr-x 2 root root 4096 May 31 20:40 opt
    lrwxrwxrwx 1 root root 6 May 31 20:40 run -> ../run
    drwxr-xr-x 6 root root 4096 Jun 16 17:28 spool
    drwxrwxrwt 8 root root 4096 Jul 18 00:33 tmp
    gdm is owned by gdm, so why would it needs 1770 permissions?
    EDIT3:
    After further research i appear the way gdm is installed may matter.
    Well i installed gdm through pacman and always update it with pacman as well. Never manually compiled/make_install'd it nor used abs for it.
    Last edited by BGK (2013-07-19 21:37:13)

    Okay I'm confused ...
    Commit:https://projects.archlinux.org/svntogit … 92c38d536d
    @@ -68,8 +68,7 @@ package_gdm() {
    cd $pkgbase-$pkgver
    make DESTDIR="$pkgdir" install
    - chmod 1770 "$pkgdir/var/log/gdm"
    - chmod 700 "$pkgdir/var/lib/gdm/.config/dconf"
    + chmod 711 "$pkgdir/var/log/gdm"
    rm -r "$pkgdir/var/run" "$pkgdir/var/gdm"
    ### Split libgdm
    so that takes away the 1770 permissions, and replaces them with 711. 
    @@ -5,6 +5,7 @@ post_install() {
    getent passwd gdm > /dev/null 2>&1 || usr/sbin/useradd -c 'Gnome Display Manager' -u 120 -g gdm -d /var/lib/gdm -s /sbin/nologin gdm
    passwd -l gdm > /dev/null
    chown -R gdm:gdm /var/lib/gdm > /dev/null
    + chown root:gdm /var/log/gdm > /dev/null
    glib-compile-schemas /usr/share/glib-2.0/schemas
    gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
    however:
    chown root:gdm /var/log/gdm > /dev/null
    .. is where I get confused.  This command makes root and the group gdm the new owners of /var/log/gdm, or did I go wrong somewhere?

  • Different md5 in phpMyAdmin and in mySql client (and PHP)

    I have trouble with md5 function - mySql in command line and PHP returns one value, phpMyAdmin another. I have current packaged - PHP 5.2.9-3, mysql 5.1.34-1 and phpmyadmin  3.1.5-1. I searched web for possible reason, only one I found was different encoding, but I doubt that binary representation of string 'aaa' differ between any common encoding (at my machine 8859-1, 8859-2,utf-8). Please, could somebody post here result what is result at your system of
    SELECT MD5('aaa');
    from command line mysql client and from phpmyadmin ?
    Last edited by stabele (2009-05-23 18:58:56)

    they are identical for both:
    Variable_name Value
    character_set_client utf8
    character_set_connection utf8
    character_set_database latin1
    character_set_filesystem binary
    character_set_results utf8
    character_set_server latin1
    character_set_system utf8
    character_sets_dir /usr/share/mysql/charsets/

Maybe you are looking for