Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by tibberous

  1. I am trying to get Apache to act as a web server on CentOS 5. If I change the Listen line in the httpd.conf file to anything but a local ip, I get the error:

     

    Could not assign the requested address: make_sock: could not bind to address

     

    Is this maybe just a problem because I am using a router? Like, I could go to a colocation, get a static ip, and be good?

  2. Today I woke up to dead site - the DNS service had failed, and after an hour of panicked calling, my hosting company replugged it in or something and fixed it.

     

    I have a server that I am planning to colocate, but I don't know a lot about it, and it takes time. I have to install a server OS, setup my raid card, setup my DNS, ffmpeg, image magick, ect, ect.

     

    Is there maybe a good book or something that would get me up to speed on DNS'es and Servers - at least to the extent that a PHP programmer should know DNS'es and Servers?

  3. Not sure what your saying - you mean store it as 123_120_100.jpg, where the name is id, with, height?

     

    And here is why I hate stored functions:

    CREATE FUNCTION `height`(size int, w int, h int) returns int
    begin
    if (h >= w) then return size;
    else return size * (h / w);
    end if;
    end ;
    

     

    Be sweet if there was a database that used PHP syntax for stored functions.

  4. "There is no direct way to send a fax from within PHP."

     

    That's just coming from a guy on a message board, and I'm guessing incorrect. At worst you might have to use an extension or a shell command, in the same way if you want to convert video you have to use ffmpeg or memcoder.

     

    I didn't say I didn't want to use something in addition to PHP, I just didn't want to use a web service I'd have to pay for.

  5. I have a table, called images. It has a row that stores the height and width of the initial image.

     

    When uploaded, the initial image is resized to 6 different dimensions, keeping aspect. So, if my image was 1000 x 2000, and I select the 200 px version, it would be 100x200.

     

    Do you think I should make a stored procedure, that takes in a size, and then returns the right dimensions? Do something like:

     

    mysql_query("select height(200) as Height, width(200) as Width from images where id='4'"); ?

     

    Is their a better way?

  6. Did you? None of them are particularly helpful, which is why I was hoping to find someone who had done it before.

     

    I did find a service that charges $8.00/month without a per fax cost. It's outbound only, but I still think that might be easier than spending the time to setup a system - especially when you consider that my way would tie up a computer, and possibly our fax lines.

  7. This is all screwed up.

     

    I have two physical servers. The first server is where the domain name is pointed too.

     

    The first server has subdomains that use a records to point to the second server. So, domain.com would be the first server, but control.domain.com is the second server.

     

    On the second server I want to setup dynamic subdomains, without screwing up my existing subdomains. I have A records on both servers - *.domain.com A 72.29.86.138. These *should* be working, but I think the problem might have to do with the second one.

     

    I set my ServerAlias to *.domain.com, and then explicitly created a new A record on the first server. It still didn't work, which would lead me to believe that either the second wildcard isn't working, or that neither are.

     

    I'm not real sure what to do at this point. I don't really know how to narrow down the problem anymore - I might write my webhost for help. Any advice?

  8. Do you know how? I looked at the WHM 11 docs but couldn't find anything about creating a subdomain. Whats worse is that I don't think my dns is setup right.

     

    I setup a record for:

     

    *.trenttompkins.com. A 72.29.86.138

     

    But if I set my ServerAlias to *.trenttompkins.com it only works for subdomains that I have already created.

     

    Am I missing something?

  9. A, generally. For example, if you needed to look up the name of a video in a database, and then let the user download the full movie, then B would be faster. This is also assuming that location is the only thing playing a role in the speed, since a web server in a Tier 3 datacenter in russia can still be faster to a person in New York than a web server sitting on my desk 200 miles away.

     

    Also, not PHP related.

  10. I am trying to create dynamically subdomains. From what I read, there are three ways to do it:

     

    mod_rewrite

    mod_vhost_alias

    PHP, changing the apache config and restarting the server

     

    I'm also thinking their is a forth way. Since my server runs WHM, I can probably create subdomains through WHM command line, though that might just be a wrapper version of method 3.

     

    Now, way three seems like it could be quirky. I already have subdomains, but if I make a CNAME for *.mydomain, that is used before existingsubdomain.mydomain right?

     

    Does anyone know the best way to do this dynamically? I think I'm going to look more at mod_vhost_alias, because that seems to be the one I can find the least about.

  11. Lately it seems like I have had to debug a lot of scripts where I haven't been unable to see the output, for example xml feeds that run into Flash, or uploader's that send a file to Flash, where I haven't been able to see the output.

     

    Generally I just do something like file_put_contents('output.txt', print_r($_REQUEST, true)); or file_put_contents('dump.txt', 'here') but it feel a little... crappy?

     

    Is there a cleaner way to do this? Most annoying part is that I have to create a file, chmod it, and then remember to delete it.

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