Jump to content

powerspike

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Posts posted by powerspike

  1.  

    <form action="site.com/bannanas/3">

     

    but i'm going to guess that isn't what you want....

     

     

    If you want it to redirect based on what the user has submitted into the form, the submit form will need to submit the data, and the script that processes it will need to use a

    header("Location: http://site.com/bannanas/3/");
    

    and do it - remember that mod rewrite can't process data.... it's not a scripting language.

  2. you'll find people usally do it the other way around, redirect no trailing slash to a trailing slash, some web servers do that automaticly as well, so you might want to think about doing it's it that way

     

    not sure if this would work or not, but you can give it a go

     

    RewriteRule (.*)/$ $1 [L]

     

     

  3. a hackisk way to get it done, would be to get the amount rows in the table, like "select row_id from table where order by row_id DESC limit 0,1";

     

    then do a "select * from table where row_id = " . rand(0,$row_id) . "' limit 0,1";

    ($row_id would be the row_id from the first query).

     

    As i said, it's a hackish way, i'm quite sure there is a better way to do it thou.

     

    PS, this assumes you have a row_id and it's in some type of order.

     

  4. Unable to connect

     

    Firefox will usually tell if you if i can't find a server or connect to it, that error message to me would indicate there might be an issue with apache (or something blocking port 80 traffic).

     

    Your zone file looks good (no issues) but maybe you want to point your mx record to "mail" - just make it a little neater (warning: personal preference)

     

     

    One last thing, find out what ip address is the main address of apache, the www record is pointing to .88, it might be wrong (looking at you have 55,56,88,89) but apache might not be setup to use 88 & 89 so wouldn't be accepting connections on those ip addresses.

     

     

  5. This to me seems like a couple of questions in one, but I'll try and answer the best I can.

     

    1) if you are coding projects in sub directorys, that you'll need to either use the full path to the images folder, ie http://www.domain.com/project1/images/img.png. Or if you link to the image in your html like images/bob.png, it'll try and load "images/bob.png" using your current folder as the base.

     

     

    2) You might want into looking into using virtual hosts and sub domains if you want it to act like a real website I.e bob.domain.com - project 1, joe.domain.com - project 2.

     

     

    I'm not sure if this helps you or not.

     

     

     

  6. i believe the way reload works, is that it checks if all the files are the same, where as if you goto the url again (re-visiting - not reloading) it doesn't check "static" files. I have seen this as well, personally i don't worry about it at all.

     

  7. it is not set . it is using the system's default tmp directory. i have even tried by setting it but, nothing is working.

     

    try setting it to /tmp (if linux) or if windows try creating a folder in c:\ called tmp, and make sure that the "everyone" user has full read/write access to it.

     

    Also put a file in your document root which contains the contents of <?=phpinfo()?>, and load it in your browser, and make sure that your php.ini file is showing (it should be in the first panel), if it's not showing, it's not loading a php.ini file.

  8. INSERT INTO downloads (title, category) VALUES ('$title', '$category', '$date')

     

    you are basicly trying to insert three bits of data into two fields.

     

    you'll need to change the (title,category) to (title,category,time) where "time" is the name of your time/date field.

     

  9. if your doing match up's on tables, it might be creating a temporary table for the query (which would explain the time) index rank and id  in both tables and see if that helps alot, also remove any unneed indexs on both tables, as that'll slow things down as well

     

    A.rank = B.rank (in the slow query) ... if they are both indexed you might find it gets alot quicker for you.

     

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