Jump to content

floridaflatlander

Members
  • Posts

    671
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by floridaflatlander

  1. OKay

     

    I was looking at http://php.net/manual/en/function.imagecreatefromjpeg.php and noticed a lot of the problems came from cannon cameras so I tried photos from another camea and the code worked like a charm.

     

    Now all I got to do his find out how to get it to work with all cameras. I guess I am a php "Irregular" cause right now I'm going for a walk.

     

    Thanks for the help ChemicalBliss, maybe I can get this ironed out later.

     

    SJ

  2. I checked my php.ini and xwampp has a setting if 128m for memory_limit.  And even though memory_limit is set to 128m I added "ini_set("memory_limit", "30M");" anyway and I still got the same message.

     

    Like I said in my first post I can up large load images if I don't use  imagecreatefromjpeg() so memoy_limit shouldn't be the problem, I think.

     

    Thanks

    SJ

  3. I Can't resize large images with imagecreatefromjpeg()

     

    I can load small 38kb images fine, when they get up 780+- or 1.3 mb +-  (with a width of 2500px * x) I get the below error

     

    I also can upload the same pics in another file with out resizing(using imagecreatefromjpeg())  them and the script works fine.

     

    my max file upload size with xampp is 128mb / php5

     

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 191 extraneous bytes before marker 0xd9 in C:\xampp\htdocs\ed\phpsol\ch08\work\includes\create_thumb.inc.php on line 35

     

    Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'C:\xampp\tmp\php9596.tmp' is not a valid JPEG file in C:\xampp\htdocs\ed\phpsol\ch08\work\includes\create_thumb.inc.php on line 35

     

    I'm basicly using a switch

    switch($type) {

          case 1:

            $source = @ imagecreatefromgif($original);

        if (!$source) {

          $result = 'Cannot process GIF files. Please use JPEG or PNG.';

          }

        break;

          case 2:

            $source = imagecreatefromjpeg($original); <---- LINE 35 where $original is $original = $_FILES['image']['tmp_name'];

        break;

  4. Also look it in IE8 and click the compatibility mode button, it's near your refreash button and see what happens.

     

    I think borders work better when you go <table class="main"></table>. I think.

     

    then go something like

     

    .main {

      border: 1px #000000 solid;

    }

  5. Try cyberrobot's idea first, he has good eyes I didn't see the double colon yesterday.

     

    You can also try  <h1 style="margin: 0; padding: 0; text-align:center;">Newsletter</h1>  if you have a problem with inheritence.

     

    But this will make your code bulky in the long run if you use it a lot, your's should work once you remove the colon, use firebug to check for inheritence.

  6. h1 has margin and padding around it anyway so that needs to be set to 0;

     

    I think you have

    h1 with margin & padding

    <br /> break 1 with margin & padding, maybe, I can't remember

    <br /> break 2 with margin & padding, maybe

    text here  with margin & padding

    <br /> with margin & padding

    <br /> with margin & padding

    text here  with margin & padding

    </div>

     

    Can you remove some breaks and playwith it ?

     

    Also use Firefox's Firebug, it helps a lot and tells you what and where the margin & padding is

  7. PS I hope that info in your connection isn't your real pw and db. If it is you need to change it ASAP or yesterday as one of my old bosses used to say.

     

    Anyway go to the free lancing board if your in a hurry or take your time and play with it.

  8. If you are on a your own computer search your php.ini file and find and set the value to on, like display_errors = on

     

    If you are on a public host go to your control panel and set it to on but be aware that anyone that goes to your site can see your errors and info while it is on.

     

    Also

    where is your database connection?

    if they are signing up for the first time what are they inserting into?

    I see several semicolons missing.

     

    Turning your diplay errors on will be a God send.

     

     

  9. I like coppermine, in fact I like it a lot. If you use it make sure you look at the docs and search for your problem first before posting on the forum, its just the nice thing to do.

     

    It took me a little while to learn all the buttons but once I did I like it. You can bridge it with about a dozen different forums and use the pics else where in a site once you know the path names.

     

    Or you can build one, a book called PHP Solutions has a good one with step by step instructions, the first edtion is for sale for cheap on Amazon. The new one is geared more towards Objects and classes.

  10. I have a  test sql query like the one below that works fine

     

    SELECT columns FROM table2, smf_members WHERE table2.id_member = smf_members.id_member AND smf_members.id_group = '9' ORDER BY  member_name;

     

    However smf has group membership in a column called id_group and  a column called additional_groups which holds CSVs.

     

    Can I write a SELECT query and change  smf_members.id_group = '9' to query both the id_group column and the additional CSVs column for a group #.

     

    I need this to print out a table using while loop.

  11. You have more than one "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />" ? That's your problem?

     

    I have something a little like yours, mine is basically

     

    include the switch, switch then defines $css then

     

    <link rel="stylesheet" type="text/css" href="../css/<?php echo $css; ?>" />

  12. It's

    -http://www.website.com/folder/index.php <- your main page for the folder (if you have one)

    -http://www.website.com/folder/page1.php

    -http://www.website.com/folder/page2.php and so on

     

    You (or at least I do) build these types with a get statement and guery

    -http://www.website.com/index.php?p=1

    -http://www.website.com/index.php?p=2

     

    PS as cyberrobot said, pages like -http://www.website.com/index.php?p=1 pull info from the database

     

  13. When this happens to me it's because I didn't use an opening tag and the code was turned into text.

     

    Under welcome I saw this code with no opening php tags, 

    if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    ID, ‘image-link’, true); ?>

     

    I also see you have over 800 post so you probably already know this.

  14. Do you have your form set to where it will only submit when all the varliables are set?

    If so maybe something like $var = ""; will work when it is placed at the end of your code. It would be like $var = 1; the script starts running enters the data in the dtabase, then $var gets redifined to $var = ""; just before the closing php tag (?>), this way when your script tries to run again the $var is not defined and the script wont run. Or you can do a check for double entry.

×
×
  • 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.