Jump to content

AV1611

Members
  • Posts

    997
  • Joined

  • Last visited

Posts posted by AV1611

  1. I just went down this path and here are the main things I encountered:

     

    1.  You can only create a field that is < 255 Characters long

    2.  You can create a "TSV" file, but give it an ".xls" extension and excel will open it, even with fields > 255, but you get into the whole " " issue if it's a text or number string, and problems if the string also contains a " in it, etc... If you don't ", then you loose leading and trailing "0's" on numbers, which was a problem in my case.

    3.  You can create an ".ods" spreadsheet, and don't have to worry about any of the above, but that only works for OpenOffice, IBM Lotus Symphony, Etc... (Which is fine by me!).  You would still need to open the doc and resave it as .xls.

     

    If you need code sample or whatever post.  Or just google .xls class, many are out there, and they are easy to use.

  2. Does your server allow you to do mail relay?  Many servers only let you send to foreign hosts if the sender is a valid user.  You said you are sending @hotmail.com... I would never allow that on my server... SPAMMERS are getting harder to combat, and mail relay is an often exploited configuration.

  3. Sure. 

     

    if (strlen($row['lots_of_text']) <= 50)

      {

      echo $row['lots_of_text'];}

    else{

      $str =  $row['lots_of_text'];

      $str =  substr($str,0,47);

      $str .= '...';}

     

    Now it will cut it off at 47 chracters and add ... to the end so they know the string is incomplete.  You can even make the ... a hyperlink or put a balloon popup or whatever if they need to see the rest of the string.

  4. Well,

    I got it to work. I change from imagecreate()

    to imagecreatetruecolor()

    and it works.  Even though I am only using 256 colors, I think it gets mad if you call a color more than 256 times... it treats each as a color on the pallet maybe?  Dunno, but either way, that's one to remember...

  5. Same problem.

     

    Box is 255x255 not 255x512

     

    Funny thing is, this is 255x512... is this a bug?

     

    <?php
    header("Content-type: image/png");
    $im = @imagecreate(255,512)
        or die("Cannot Initialize new GD image stream");
    $background_color = imagecolorallocate($im, 255, 255, 255);
    $q=rand(1,3);
    $a=50;
    $b=50;
    $c=50;
    $i=0;
    $color=imagecolorallocate($im,$b,$c,$a);	
    while ($i<=512){
    imageline($im, 0, $i, 254, $i, $color);
    $i++;
    }
    imagepng($im);
    imagedestroy($im);
    ?> 
    

  6. Can anyone tell me why this image quits drawing after 255 lines?

     

    <?php
    header("Content-type: image/png");
    $im = @imagecreate(255, 512)
        or die("Cannot Initialize new GD image stream");
    $background_color = imagecolorallocate($im, 255, 255, 255);
    $q=rand(1,3);
    $a=0;
    $b=0;
    $c=0;
    $i=0;
    
    while($i <= 511){
    if($q==1){$color=imagecolorallocate($im,$b,$c,$a);}	
    if($q==2){$color=imagecolorallocate($im,$a,$b,$c);}	
    if($q==3){$color=imagecolorallocate($im,$c,$a,$b);}	
    imageline($im, 0, $i, 254, $i, $color);
    if($i < 255)
    	{$a++;}
    $i++;
    }
    imagepng($im);
    imagedestroy($im);
    ?> 

  7. I'm not sure if this is the same question, but I think it is, and I too need an answer.

     

    I am under the impression that BASIC auth is sent a 401 error from the server when accessed, and the browser is hardwired to prompt for user name and password and resend the request in a header.

     

    If I understand this right, can I make a request via php/html to a site that includes that header info, so the prompt is not seen by the client?

     

    I think that's the same question posed differently...

     

    Thanks.

  8. had to make this change

     

    from    AllowOverride None

    to        AllowOverride AuthConfig

    in <directory "/var/www/html"> in httpd.conf

     

    What I did before worked, but was the wrong way to do it.

     

    Answer is posted here for Noobs like myself, not for you experts.

  9. If I put this:

     

    AuthUserFile /usr/local/apache/passwd/passwords

    AuthGroupFile /dev/null

    AuthName EnterPassword

    AuthType Basic

     

    Require user realmusername

    in the <directory> section of my httpd.conf file, I get the realm password prompt.

     

    but If I put it in my .htaccess in the /var/www/html it doesn't prompt me for the password???

     

    Can someone tell me why .htaccess isn't being read?

     

  10. Wow, that ain't cheep.

     

    I bought a Toshiba Qosmia

    It has 6600 with 128 onboard memory

    17 wide monitor

    2 gigs ram

    intel wifi (Linux Supported)

    a TON of stuff

    It came with decked out mediacenter 95

    I dualboot it with OpenSuSE and get glxgears at 18000 and run linux 1440x900 with nvidia drivers.

     

    I love it, but it's too big for working site to site, so I want another 14.1 for that. 

     

    BTW: Can anyone tell me where to find a PCI WIFI card that works with Linux RIGHT OUT OF THE BOX???

     

    Thanks.

  11. I have a different spin on making the swith to linux. 

     

    Start with an "easier" linux distro then change when you get some "traction".

     

    Hands down, Fedora is the easiest to cut your teeth on. (MANY people are gonna disagree with that, but It's my opinion)

    Second to that, OpenSuSE is a great starter, as it's VERY powerful and has a "windows" appeal. (Did Vista copy OpenSuSE or vice versa???)

     

    I do not like Ubuntu because I find it's not easy to figure out.  And they DON'T allow you to log in as ROOT - Which makes setting up a new system VERY difficult on someone who doesn't understand linux to begin with.  Logging in as ROOT takes a whole layer of conplexity away. (Don't even flame me for that...I know the risks, but I'm trying to get a new user to learn incrementally, besides the risks are NO greater than windows where every user is an admin by default)

     

    Gentoo and slackware may be the most "geek" distros of linux, and for that reason I suggest a NEW linux user to not mess with them for at least 6 months.  I started with Gentoo and what happened was I couldn't understand the howto's let alone what I was doing.  I got frustrated and quit for a while.   

     

    Fedora get's a lot of bad press, but on the desktop it's still my preferred system, and on my Laptop I like OpenSuSE best.  (BTW 1 week until OpenSuSE 10.3 comes out  :o :o :o )

     

    Wine is coming along... but .NET is still a big problem, so you prolly need to keep you workstation dual boot... just in case.  Many people use VMWare to make a virtual windows install... and that's a good solution as long as you don't do graphic intensive stuff in windows (i.e. Games, etc.)  I suggest you simply install WinXP SP2 and Linux Dual Boot. 

     

    My workstation has Fedora 7 (Preferred), XP(Just in case), and Vista(I gotta learn it :( ).  It runs dual monitors, and everything works fine.  I also mount the xp volume when in Linux.  I don't know if I can mount the Vista volume or now, I'm kinda scared to try...

     

    Well, that's my 2 cents.

  12. Fedora 7 with ISPConfig seems to handle the dozen or so domains I host VERY nicely.  Very easy to install and configure.  Fedora is VERY well supported when used as a LAMP server.  I switched from IIS 2 years ago.  I HATED linux... because I didn't understand it, and though is was HARDER than IIS.  Now that I understand it, I personally feel IIS is just RETARDED (I know, that's gonna get me flamed...)  IIS is very powerful... if you wanna do things the Microsoft way.  I like the way LAMP works.  It's VERY well thought out.  Most of all, it's expandable in a way that let's you change directions. You chart the course of your server, not microsoft.  M$ tells you how to do it, LAMP lets you decide how you want to do it. 

    FTP

    I can't seem to get FTP working on my firewall:

     

    They can use it only if they turn OFF passive

    I assume that means that the state stuff isn't working

    I have

    accept if state is related

    and

    accept if state is established

     

    but that doesn't seem to make it work.

     

    I know that the initial connections are done on port 21, then the port is shifted when it starts to parse the directories.  that's where it fails (LIST).

     

    What am I missing???

  13. I can't seem to get my IPTables rules right to all PASSIVE connections to my FTP.  They have to turn off passive in the client or they can't talk to my ftp.  I have set it to

    ACCEPT if the state is established

    and

    ACCEPT if the state is related

     

    I thought that was all that was needed. 

     

    What am I missing???

  14. Do you want to output a table to screen, or actually output a doc? (.txt, .csv, .xls, etc.)

     

    You can do either or both...

     

    Simply use the strategy that rarebit employed: a simple counter that keeps track of every third event, but don't forget that you will have to put some closes clauses that add what is appropriate depending on the column count when the data runs out.

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