Jump to content

utahcon

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Posts posted by utahcon

  1. I just did a fresh install with php... here is my config from phpinfo()

     

    './configure' '--sysconfdir=/etc' '--datadir=/usr/share/php' '--libdir=/usr/lib' '--includedir=/usr/include' '--with-apxs2=/usr/local/apache2/bin/apxs' '--disable-ipv6' '--with-openssl' '--with-zlib' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl' '--enable-exif' '--with-gd' '--with-gmp' '--with-imap' '--with-imap-ssl' '--with-ldap' '--with-ldap-sasl' '--enable-mbstring' '--with-mcrypt' '--with-mhash' '--with-mssql' '--with-mysqli' '--with-readline' '--enable-soap' '--enable-sockets' '--enable-zip' '--with-pear' '--enable-ftp' '--enable-pcntl' '--with-freetype-dir=/usr/include/freetype2' '--with-png-dir=/usr/include/libpng' '--with-tidy' '--with-oci8=instantclient,/opt/oracle/instantclient/instantclient_11_1' '--with-kerberos'

     

    Somehow I am not sure how, I got PHP to not read my php.ini file. I have checked and double checked for a php.ini in a rouge place, but I don't see any. Just the one in /usr/local/lib

     

    I don't know how to fix this one. Ideas?

  2. I am pulling in a few RSS feeds into my site and I need to be able to sort the array I build by the pubdate of the feeds.

     

    The resulting array looks like this:

     

    Array
    (
        [0] => Array
            (
                [title] => Title of Feed
                [link] => link of feed
                [pubdate] =>  2007-05-04 00:00:00
                [description] =>  Description
            )
    
        [1] => Array
            (
                [title] => Title of Feed
                [link] => link of feed
                [pubdate] =>  2007-06-04 00:00:00
                [description] =>  Description
            )
    
    

     

    I need to be able to sort by $theitems[$i]['pubdate'], how can I do that?

  3. I have a script that I am writing and I ran into a snag with my debug, which if this is a real problem kind sucks for me...

     

    I have two classes I am working with right now, Site and Debug.

     

    In my code I call

     

    $debug = new Debug;

     

    and then later I call

     

    $site = new Site;

     

    Finally in the Site class I want to write to the debug variable debugText so I try: (this is in Site)

     

    $debug->debugText .= 'My new text';

     

    However nothing gets written to the variable

     

    ideas? is it possible to do that?

  4. So I have lighttpd installed just fine.

    I had PHP installed just fine.

    They worked together.

    Then I installed mySQL, and it works.

    I am trying to configure PHP to use mySQL, with

    [code]./configure --with-mysql=/usr/local/mysql/[/code]

    Which is where mySQL is installed, but I am getting this

    [code]checking for specified location of the MySQL UNIX socket... no
    checking for MySQL UNIX socket location... no
    checking for mysql_close in -lmysqlclient... no
    checking for mysql_error in -lmysqlclient... no
    configure: error: mysql configure failed. Please check config.log for more information.[/code]

    I opened config.log and here is what it says

    [code]
    configure:58254: checking for mysql_error in -lmysqlclient
    configure:58273: gcc -o conftest -I/usr/include -g -O2  -Wl,-rpath,/usr/local/mysql//lib -L/usr/local/mysql//lib -L/usr/lib $
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/local/mysql//lib/lib$
    /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status
    configure: failed program was:
    #line 58262 "configure"
    #include "confdefs.h"
    /* Override any gcc2 internal prototype to avoid an error.  */
    /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply.  */
    char mysql_error();

    int main() {
    mysql_error()
    ; return 0; }
    [/code]

    I am not sure how to fix this.
  5. I don't see why this isnt working.

    When I load an image it comes up empty... here is the code

    [code]<body>
    <div>
    Welcome to the FBM loader, provided by Utahcon. Please upload your images only here. I will make another spot for videos and music later.<br><br>
    <form enctype="multipart/form-data" action="samepage.php" method="POST">
    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
    Upload this file: <input name="userfile" type="file" />
    <input type="submit" value="Send File" />
    </form>
    </div>
    <?php
    if($_FILES['userfile']['name']){
    $uploaddir = '/opt/lampp/htdocs/images/users/';
    $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
    echo '<div>';

    if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
    echo "File is valid, and was successfully uploaded.\n";
    } else {
    echo "Possible file upload attack!\n";
    }

    echo 'Here is some more debugging info:';
    print_r($_FILES);
    print "</div>";
    } else {
    echo "<div>";
    print_r($_FILES);
    echo "</div>";
    }
    ?>
    </body>
    [/code]

    Thanks in advance!
  6. [!--quoteo(post=366846:date=Apr 20 2006, 10:54 AM:name=usadarts)--][div class=\'quotetop\']QUOTE(usadarts @ Apr 20 2006, 10:54 AM) [snapback]366846[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    What I need to do is the following:

    Someone enters in a ZIP code and I bring up a list of the 5 closest league in the country to that ZIP code. Is this possible with php or any other programming or is their software that needs to be bought?

    Thanks,
    David
    [/quote]

    You will need to have a list of all the "leagues" as well as the ZipCodes they are in, and a database of locations, preferrably with Longitude and Latitude coordinates. Then you will have to take the given ZipCode and gradiually add distance to the radius of the ZipCode.

    I think the longitude/latitude to miles conversion is something like 62:1.

    The hard part of all of this is the location database.
  7. [!--quoteo(post=366917:date=Apr 20 2006, 01:54 PM:name=timtom3)--][div class=\'quotetop\']QUOTE(timtom3 @ Apr 20 2006, 01:54 PM) [snapback]366917[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Hi My ISP doesn't allow me to use the system command or CRON jobs, I need a tutorial that will create a back up script for the past 7 days on a page load probably that will run once a day if a particular page is visited does anybody know of such a tutorial?
    [/quote]


    Most hosts will provide a contained CRON or schedule task that you can hammer out.

    If that is 100% not an option you can create a scheduled task on your own machine to call a PHP script once a day and run your script.

    Other than doing one of those two there is nothing I know that will solve this problem for you.

    BTW - Which host is this so I can avoid them.
  8. Ok I am looking through some code... so I need to know something.

    I see this in my code

    [code]
    $SESSION['variable']->user->ID
    [/code]

    Is this calling the user ID for the $SESSION['variable']?

    Also what does this do

    [code]
    $_SESSION['variable']->user->ID as $site_ID => $site_info
    [/code]

    Thanks!
  9. [!--quoteo(post=365635:date=Apr 17 2006, 03:05 PM:name=utahcon)--][div class=\'quotetop\']QUOTE(utahcon @ Apr 17 2006, 03:05 PM) [snapback]365635[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    I was wondering if you guys had a link to a decent/great crash course on OOP with PHP 5.

    If not maybe someone can show me where on PHP.net to find info on $this-> etc.

    Thanks!
    [/quote]


    This covered it:
    [a href=\"http://www.osnews.com/story.php?news_id=6788\" target=\"_blank\"]http://www.osnews.com/story.php?news_id=6788[/a]
  10. I was wondering if you guys had a link to a decent/great crash course on OOP with PHP 5.

    If not maybe someone can show me where on PHP.net to find info on $this-> etc.

    Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.