Jump to content

wwfc_barmy_army

Members
  • Posts

    320
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

wwfc_barmy_army's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Hello. I have this htaccess file: Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_URI} !\.(exe|jpg|jpeg|png)$ RewriteRule ^([^/]*)$ page.php?slug=$1 [L] I accessed localhost/test/test-here...it works ok, but the slug variable is outputting 'page.php'. So I tried this: RewriteRule ^help/([^/]*)$ page.php?slug=$1 [L] I accessed localhost/test/help/test-here... and it worked and the slug variable was 'test-here'. The htaccess is in the root of the 'test' folder. Any ideas? Thanks.
  2. Thanks for your reply! The .htaccess is in the root dir yes. When I visit the mentioned pages and then check the logs there is nothing (even for my IP), but there are sometimes 10+ of the same 'missing page' for the same IP at exactly the same time. But these pages work fine for me and have done on every machine i've ever tested on! I've visited all pages with firebug running and I received no errors and the odd ajax post. Seems really strange to me, but errors keep appearing in the logs. Any other ideas?
  3. Hopefully this is the right section to post this in. I've been checking through our error logs and I've noticed quite a few like this: [Thu Jul 07 09:36:01 2011] [error] [client ip_here] File does not exist: /home/username/public_html/company-search Now we have a htaccess mod-rewrite on and this part is: RewriteRule ^company-search$ companylist.php RewriteRule ^company-search/$ companylist.php It works fine, and when I go to mydomain.com/company-search it works fine. But this would indicate to me that it isn't working for some people. At it seems to be doing the same on other pages that are similar. Any ideas?
  4. How do I return more than 1 value back from the query if I only wanted to select a distinct product_id? Thanks.
  5. Hello, $sql = "SELECT DISTINCT products.product_id, category_matchup.match_cat_id, products.product_name FROM category_matchup INNER JOIN products ON category_matchup.product_id = products.product_id WHERE match_cat_id IN (1870,1871,1872,1875,1880,1881,1882,1883,1884)"; $result = mysql_query($sql, $connex) or die(mysql_error()); if(mysql_num_rows($result)!=0){ $i = 0; while($row = mysql_fetch_array($result)) { .................. Output etc.................. It works, but despite the distint still being in there it is returning multiple records. I have 2 tables for this Product table and a match up table as 1 product can be in many categories. So an example of the matchup table could be: match_id product_id cat_id 1 12 532 2 12 535 3 12 356 4 12 36 5 12 3436 6 13 3436 7 15 3436 For example if I looked for products in category 3436 AND 36 it will return product ID 12 twice (based on the above example). Can anyone shed any light on this? Thanks.
  6. Hello, I just thought i'd check but i can't seem to find any information anywhere, Can you replace a query like this: SELECT * FROM tablename WHERE name = "name" OR name = "name2" OR name = "name3" with something like; SELECT * FROM tablename WHERE name = "name", "name2", "name3" or some shorthand way of having multiple where conditions on the same column? Thanks.
  7. I think is issue is thats it's trying to use the temp file twice. After the first use does the temp image file get removed? I've put in another upload box for the same image and it works, but ideally I want to do it from 1 upload box.
  8. You are breaking the echo at <a href="?. Try the following: else { echo "<p align='center'> <a href='?file=../example1.html'>Example1</a><br/> <a href='?file=../example2.html'>Example2</a><br/> <br/> <em>Click on the links above to edit the files.</em><br/> <a href='?index.php'>logout</a></p>"; }
  9. Thats just the file that the script is running from. Just didn't want to post my full path to the file thats all
  10. It's over there - http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php The error I get is: The original (none resized image) uploads in seconds.
  11. Sorry I should have explained better. The second image is resized. The First upload ($_FILES['theFile']['tmp_name']) is unrelated.
  12. die("Cannot write to file."); Line 46 - semi-colon on the end of die
×
×
  • 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.