1. Newbie question

    Date: 09/18/06     Keywords: no keywords

    I am creating a form for my employer, and the person I'm working with sent me an email with this request: 

    For second presenter and third presenter can you please design a way to not have this information present unless the user specifies there will be more than one presenter? Maybe there can be a way to add a click button for the user to click to add information about the second presenter. 

    I have no idea how to accomplish this. Any ideas? Thank you so much!

    Source: http://community.livejournal.com/php/496016.html

  2. Non-latin charsets

    Date: 09/15/06     Keywords: spam

    In a Spanish portal we have, we are getting a lot of email and comments spam written in Chinese that comes out as glibberish. I've been trying to find a way to block it by blocking messages not written in latin charsets but I can't find exactly how. Do you have any idea, please? The problem is getting out of hand.

    Many thanks in advance.

    Source: http://community.livejournal.com/php/494864.html

  3. Plural Standards

    Date: 09/13/06     Keywords: php

    What's the approriate way to do plurals in PHP with/without a template system?

    For example, you have the variable $num, and you want to echo out You have $num peaches. Or something. Right now I do:
    echo 'You have ' . $num . ' peach' . ($num!=1 ? 'es' : '') . '.';
    but I can imagine that's not the proper way to do things.

    Sure, it's not a problem for most of us, but I'm considering switching to a template program of sorts soon, and wonder if there is a standard we should be following

    Source: http://community.livejournal.com/php/494731.html

  4. Open for debate

    Date: 09/13/06     Keywords: php, browser

    I've gotten into a syntax argument with a friend/coworker of mind over the code style I use.  To be exact, how I format strings to be printed to the browser.

    In my defense, I argue that the below is better for the longer term because it's easier to change/add to the formated string this way.

    And he argues that it will slow PHP down having to


    function inputString($myID, $myValue)
            {
                $output = '<'
                        . 'input type="text"'
                        . 'size="120"'
                        . 'maxlength="254"'
                        . "id=\"$\"$myID"
                        . "value=\"$myValue\""
                        . '>';
                return $output;           
            }

    Yes this is pretty petty but we got nothing else to do but bitch at each other right now.

    His version is to have it all on one line.

    Source: http://community.livejournal.com/php/494566.html

  5. open source Email class/system

    Date: 09/08/06     Keywords: css, html, web, spam

         Instead of trying to roll my own solution, anyone know of a reliable IMAP/POP mail reader to be used in the back end of a website.  What I am doing is dedicating a email account on the server to receiving incoming articles.  On the command of the web Admin or a crontab script, the email's would be parsed/validated, with emails not from another account on the website being ignored, and then checking for something like "@PASSWORD='password'" on the first line.  If thats passes, any embedded, attached img's would be parsed into jpg/png, the email body would be copied into a .htm file, and then authorized by the web admin.

    The reason for doing this is that a lot of the content writers are clueless about HTML/CSS so I want to make it really easy for them to be able to publish articles onto the website using something simple like a email client as a WYSIWYG editor.   I am going to use a fairly long email account name to try and avoid random spam and put in filter to reject any email that doesn't originate from the same server.  Otherwise I am putting the KCEditor in the admin section as a another way of writing up articles.

    Source: http://community.livejournal.com/php/493721.html

  6. Possible job opening in DC area

    Date: 09/07/06     Keywords: cms, php, css, sql, java, postgresql, web

    My employers are in the process of opening up a PHP position in the DC area. The position in question is on a team responsible for developing sites, a CMS and other web tools for several magazines, some of which are relatively high-profile.

    At present, I don't have any details regarding salary, etc -- but as far as I can tell, this would be a permanent position, and they do pay well, treat their employees well, and they are growing at what I think is a sustainable clip.

    Skills I know we'll be looking for:
    PHP (5+, some OO preferred, Zend Framework a plus)
    PostgreSQL
    CSS
    Javascript (we'll be using the jQuery library)
    DBA skills a big plus
    Red Hat skills a plus

    This is just a heads-up for the moment -- I'll put the actual job-posting here when it is approved, but for now if you're in the area and are looking for an opportunity, now would be a good time to dust off the old resume and update it.

    Source: http://community.livejournal.com/php/493370.html

  7. IDE recommendations

    Date: 09/07/06     Keywords: php, web, linux, google

    Hello everyone, I was thinking about starting a new web app to teach myself php. I was wondering if anyone had a good recommendation for a php IDE for Linux. Code completion, coloring, symbolic debugger are a must. I don't necessarily mind if I have to pay for one, as long as it is worth the money. I've googled and found many, but I wanted to ask the community for personal preferences...

    Anyone have any good suggestions?

    Source: http://community.livejournal.com/php/493156.html

  8. A fluffy little question

    Date: 09/07/06     Keywords: php, google

    Unlike many of my past posts, this post is purely about how I want something to look without trying to implement it in a clunky, conditional manner.

    Plus, I'm sure I've seen this before (though it's possible it wasn't in PHP).

    What function, if any, will put the appropriate...suffix, I guess...on a numeric input?

    For Example: Putting the st on 1st or the nd on 2nd.

    Small Disclaimer: I know I could look this up myself. I'm perfectly capable of searching php.net or google.com, but the fact is...I'm not entirely sure what this is called. "Suffix" was the closest I could even remotely come. So along with possibly giving me the answer to my question...letting me know the name of what I'm asking about would be helpful as well. :D

    Source: http://community.livejournal.com/php/492964.html

  9. Anyone else use traps?

    Date: 09/07/06     Keywords: html, security

        Maybe I am nutts or excessive when it comes to security, but I've been noticing that no one else leaves traps and alarms when dealing with user input from the client.  What I mean by traps is the below:

    ...


    ...

    The first thing I check before validating input is this debugOn variable... if it's anything else besides "off", all of the input is serialized and logged with the offending client IP to a suspect log which is then checked every 10 minutes by a cron Job.  If the suspectLogger cronjob counts more then 3 events against a IP, that addressed is blocked or redirected to a static html page.

    Another good one is when I am passing ID via get/post from one page to the next.  If on the next validation the record ID doesn't match the stored IP address and their domain isn't aol.com or doesn't have the word proxy in it somewhere, a suspect event is logged and they're redirected back to the originating form with a message saying there is a mismatch between their IP address and record number.

    So far every idea I've come up with that I thought was original, someone thought of five years ago or has been unfeasible, so I wonder why no one else does this, it was pretty easy to setup.

    Source: http://community.livejournal.com/php/492648.html

  10. Cross-Posted from Digg

    Date: 09/06/06     Keywords: html

    Before I call it a night, I figured this might be useful for someone on here. It's a fairly well thought out discussion on patterns, what they are and why they can be beneficial for developing complex applications.
    http://martinfowler.com/articles/writingPatterns.html

    Source: http://community.livejournal.com/php/492304.html

  11. Is this worth it?

    Date: 09/05/06     Keywords: php

    Zend Certified Engineer
    http://www.zend.com/education/zend_php_certification

    Debating adding more certifications to my resume. I have a big chunk of my MGIB military scholarship left over to pay for it, so there would be no out of pocket expenses on my part... just curious if it will be atleast educationally redeeming and something to help me stand out more in the market.

    Source: http://community.livejournal.com/php/492225.html

  12. Forced variable declaration?

    Date: 09/05/06     Keywords: php

    Is there a way to force the PHP environment to require declarations of variable's prior to their use? I've been making some stupid mistakes/bugs in my code and I want to make a stricter environment to keep myself in line.

    Source: http://community.livejournal.com/php/491737.html

  13. One apache server, one document root per virtual host, multiple/conditional PHP environments

    Date: 09/05/06     Keywords: php, html, web, apache

    This is a very simple trick I came up with for my test environment at home.  It's used with Apache 2.* with the virtual host module loaded in httpd.conf and a virtualhost.conf file included at the end.

    The trick is this:

    Say you have your virtual host sites in this directory structure.

    /websites/users/myDomain.com/public_html/

    At
    /websites/
    create two junctions/links to /websites/users/
    /websites/php4 -> /websites/users/
    /websites/php5 -> /websites/users/

    Now use the following conf file.


    ScriptAlias /php4/ "d:/wamp/php4/"
    ScriptAlias /php5/ "d:/wamp/php5/"


        Options Indexes FollowSymLinks
        AllowOverride all
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    #Tell php where to find INI settings
        SetEnv PHPRC "d:/wamp/php4"
    #Tell Apache to process this mime with this CGI parser
        Action application/x-httpd-php "/php4/php.exe"    


     Options Indexes FollowSymLinks
     AllowOverride all
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
    #Tell php where to find INI settings
        SetEnv PHPRC "d:/wamp/php5"
    #Tell Apache to process this mime files with this CGI parser
        Action application/x-httpd-php "/php5/php-cgi.exe"

    #Tell's apache files of this type are php mime type

    AddType application/x-httpd-php .php .phtml .php3
    #if a broswer calls the server with http://php(4||5).myDomain.com it parses out to
    #d:/website/php(4||5)/myDomain.com/public_html/

    VirtualDocumentRoot "d:/website/%1/%2/public_html/"



    So now when you setup your hosts or local DNS server, you can run the same website/application in either environment by
    changing out the subdomain.  And further more, there is no way to mistake what environment your in or the need to have multiple copies of websites.
    Best of all, you can make other junction/links and Directory statements in Apache so you could test your site on just about every version of PHP there is.

    So
    http://php4.myWebsite.com/ would run the website with php4
    http://php5.myWebsite.com/ would run the website with php5


    I tested this out on XP 64, but because the idea is universal, it should work on *nix environments as well.  I made a project log of setting this up along with phpDocumentor and subversion, so if anyone is interested just contact me.

    Source: http://community.livejournal.com/php/491339.html

  14. PHP math-y goodness?

    Date: 09/02/06     Keywords: php

    I'm writing a little php app for which I'll need to be able to create a trendline from a set of data. Does anyone know of a free (preferably open source) library that can do such a thing in PHP?

    Also, does anyone know of a library that I can use to work with matrices (the math kind) in PHP?
    EDIT: I just ran across PEAR::Matrix. Have any of you used this with success (or not)?

    Source: http://community.livejournal.com/php/491204.html

  15. Scary stuff

    Date: 09/01/06     Keywords: php

    I found this in a open source package, which I won't disclose. Amazingly enough, in the phpDoc comments, the author was proud of this and boasting of their l33t skills. It horrified me.

    function myFunction($myObject, ... other params)
    {
    ...Code code Code
    //WTF?
    $this &= $myObject;
    }

    I can kind of see how someone would even think of using this, but it still scares me.

    Source: http://community.livejournal.com/php/490770.html

  16. Hmm

    Date: 08/31/06     Keywords: php

    Anyone else have problems with 1.3 release of phpDoc? I broke the mantra of "if its not broken, don't fix it" and updated to 1.3 this morning and now phpDoc has been very, very buggy. Its almost like they didn't even test this thing before marking it as a release/stable version.

    Update:
    I rolled back to RC3 and its working again, but only using command line, which isn't so bad.

    Source: http://community.livejournal.com/php/490740.html

  17. & operator

    Date: 08/30/06     Keywords: no keywords

    Hey everybody -

    I know what the & operator does - it makes a variable passed by reference. So when you do

    function (&$arg) {
        $arg = !$arg;
    }
    EDIT
    I think that's the worst function I've ever written. Try running it. Everything is null.

    pretend I did this instead:
    function foo(&$arg) {
        $arg++;
    }

    /EDIT

    $arg is changed to logical false incremented in the scope that you called the function from. I've seen this syntax a lot lately - and I'm trying to figure out what the meaning is:
    function & ($arg) {
        //statements
    }
    What does this to to the function? what does it do the the value of $arg?

    Thanks!


    ~d

    Source: http://community.livejournal.com/php/490217.html

  18. godaddy.com == useless

    Date: 08/29/06     Keywords: php, software, database, sql, hosting

    With their refusal to upgrade to php5 and let you install any kind of third party software they have effectively rendered themselves useless to me. With that said, does anyone know of any good hosting providers with ssh access? I'm wanting to use smarty, and play around with the Zend framework so I need php5. Also need some databases, I don't know if the free sql databases were just a godaddy thing or not, I hope not. thanks.

    Source: http://community.livejournal.com/php/489542.html

  19. Hmmm

    Date: 08/28/06     Keywords: google

       Anyone else notice that a lot of major servers seem to be straining under load in the last couple days.  My ISP through put dropped down to 15k from its normal average of 1.5megabit so I didn't notice right away but its getting kind of weird.  I've gotten a lot of temporary 500 errors on sourceforge.net, google.com, wikipedia, youtube.com, and a couple other major sites that I know use clustering.  Maybe I am just seeing things, but it looks like emergency maintenance is being done on the public/production servers which is unheard of to me...especially for the eggheads at google.

    Source: http://community.livejournal.com/php/489460.html

  20. PHP LiveJournal client

    Date: 08/28/06     Keywords: php, xml, database

    I'm planning to write a cross-posting module fo Drupal. The idea is that when a member on the Drupal site updates her blog, the entry is cross-posted to her livejournal. The database structure and interaction I can handle, but I'm a little confused about what to do for the client code.

    My plan is to use the XML-RPC interface to Livejournal, and code the client in PHP. I could use the base interface, but I'm wondering if anyone has written a library that might speed up my development. Does anyone have any suggestions?

    Source: http://community.livejournal.com/php/489173.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home