Jump to content

TweezerMan

Members
  • Posts

    1,763
  • Joined

  • Last visited

Everything posted by TweezerMan

  1. Welcome to the forums, Squash!
  2. Welcome to the forums, KKeiran!
  3. Welcome to the forums, Ronnie!
  4. I don't believe using an MTInclude tag to include the file will work as you hope. The MTInclude tag inserts a complete copy of the included file where the tag appears in your template. In order for any change in the included file to be reflected on all of your category archive pages (such as the Recent Comments when someone posts a new comment), you would *still* have to rebuild your entire site. Using a PHP or SSI include instead of the MTInclude tag would solve this issue. PHP and SSI includes do not include a copy of the included file; rather, they include the original file at the time the web page is being served to the browser. When a change is made to the included file (such as a new comment), as soon as the included file is rebuilt, the change would be visible immediately on every page without the need to rebuild your entire site.
  5. Welcome to the forums, Loren! If you want to know for sure who requested all of the pages, I'd suggest downloading and examining the access logs for your sites.
  6. Welcome to the forums, Johnny!
  7. It is not what I would call "very secure", but many users consider it "secure enough" for their purposes.
  8. I tested the code on a test weblog I have, and MT does output entries, but it will only display the last 8 entries in the context of the Date-Based Archive the code appears in. For example, if you're using monthly archives, the archive page for June, 2005 would only show the last 8 entries made during the month of June. You might want to consider using the solution I suggested for your category and recent comment sidebar listings in your other topic. By putting your code in an Index template, it would not be evaluated in the date context of a Date-Based archive template and thus would always show your most recent entries.
  9. Categories: It's hard to know for certain without seeing the code and templates you're using. I would guess that the difference in display on various category pages is due to the code for the sidebar actually being present in the Category Archive template. When you add new entries, MT only rebuilds what it considers to be the relevant weblog pages. In order for every category page to display the correct category listing, links, and post counts, MT would need to rebuild every category's archive page whenever an entry is created or edited, and MT does not do this. (MT would need to do the equivalent of a "Rebuild Site" every time you posted a new entry.) I would suggest creating a new Index template for your sidebar, place just the template code for your sidebar in it, then include this new Index template's output file in every template where you want the sidebar to appear. As MT rebuilds all Index templates when an entry is created or edited, the category list will always be current, correct, and up to date, and because the one file would be included on every page where you display the sidebar, all pages will display the same. Recent Comments: I believe this issue is cause by the same problem as above, except for comments instead of entries. In order for the Recent Comments to be updated on every page, MT would need to rebuild all Category Archive pages every time a new comment was submitted. (Making MT perform the equivalent of a "Rebuild Site" every time a new comment was submitted would bring most servers to their knees.) If you follow my suggestion above and make your sidebar an Index template that can be included in your weblog pages, this should also fix the issue you're seeing with the Recent Comments in your sidebar. Hope this helps...
  10. I'm guessing you turned off the register_globals setting by putting the following in the .htaccess file in your /public_html directory: >php_flag register_globals off Create an .htaccess file in the directory where you installed zen-cart. Remove the above directive from the .htaccess file in the /public_html directory, and place it in the .htaccess file that is in your zen-cart installation directory. This will turn off register_globals just for zen-cart, and leave them enabled for os-commerce (and the rest of your web site). Hope this helps...
  11. mod_security by itself won't 'break' any script, as mod_security doesn't interact with any script you might have on the server. What mod_security does is act as a sort of 'firewall' to the web server. All web page requests pass through mod_security, and mod_security examines the request according to the rules it is configured with. Based on these rules, the request is either rejected immediately (and the web server never sees the request at all), or the request is allowed, and mod_security passes the request along to Apache. If mod_security is improperly configured, you can end up blocking access to not only your scripts but your web site as a whole. mod_security is a powerful tool, and it can easily block more than what you intend if you're not careful in setting up mod_security's rules. This is where you would have an issue with mod_security and some script you have installed such as phpBB. For users like you who have a dedicated server, I would recommend installing and using mod_security if you have a need for it. I've used mod_security in the past on my shared hosting account here at TCH (blocking comment and trackback spammers on my Movable Type weblog), and it was *very* effective. The most important thing in implementing mod_security filtering is to understand the rules you add to mod_security. Don't grab a list of 100 rules from some other web site and just drop them into your server without looking at and understanding what they do. Hope this helps...
  12. Depending on what's exactly in the .htaccess file in your public_html directory, the 'images' directory you want to create may already have hotlink protection. When a web page is requested, the web server begins at the public_html directory and reads the .htaccess file there, then proceeds to read the .htaccess file in every subdirectory leading to the actual file that was requested. A directive specified in a subdirectory will take precedence over that same directive specified in a parent directory. That's about all there is to it!
  13. Welcome to the forums, Android!
  14. From the MySQL documentation on LOAD DATA INFILE: When using phpMyAdmin, the 'client' end of the connection is the TCH server, as phpMyAdmin runs on the TCH server. You'd need to upload the file to the server, then run the LOAD DATA INFILE query specifying a server path to the file (/home/cpanelName/someDir/computer.txt). To run a LOAD DATA INFILE query and be able to specify a file on your machine, you'd need to have a MySQL client running on your machine (such as phpMyAdmin installed on locally on your web server, or MySQL Query Browser), plus enable remote MySQL access on your account.
  15. Welcome to the forums, Dan!
  16. Welcome to the forums, pcaldredbann!
  17. Welcome to the forums, drumwri!
  18. Try adding the following settings to your .htaccess file: >php_flag session.use_only_cookies on php_flag session.use_trans_sid off
  19. If all of the .jpg|.jpeg file names in the target subdirectory had spaces in them, that would definitely explain the empty archive files you were getting before. The '-z' option should have given you a true gzip file (a compressed tar archive) instead of just a plain tar file (an archive that is more or less one file concatenated after the other). Since you're putting .jpg files in the archive (which are already compressed), I don't know that you'd get hardly any space advantage from creating a .tar.gz file as opposed to a .tar file. I'd still use the '-z' option just to be consistent though, as I've memorized the options that I use all the time with tar: '-cvzf' to make a tar, and '-xvzf' to extract one.
  20. I would have thought adding the '-z' to your tar command would have more effect on your problem than the '2>&1'. All the '2>&1' does is redirect any error messages (STDERR) to where your PHP script can capture them in the $output variable (STDOUT). I guess you have file names with spaces in them, huh? Glad to hear you finally got it working!
  21. It looks to me like your issue could be due to the fact you're not using the '-z' option with the tar command. Without it, tar does not make a gzip file for you (you get just a plain tar file). I was able to use the following command successfully in a PHP script on my account: >$cmd = "tar -cvzf backup.tar.gz `find './images' -iregex '.*\.\(jpg\|jpeg\)$' -maxdepth 1` 2>&1"; If you want to see text output from the command to see what it's doing or any text error messages, add the following code to your script: >echo '<pre>', implode("\n", $output), '</pre>'; The only issue I had with the above code is that it will not archive file names that have spaces in them. I imagine there is a way to deal with this - I didn't try to find out how as I don't know if it would even be an issue for you. Hope this helps...
  22. Welcome to the forums, credence!
  23. These are all commands that are run from a shell prompt. You would not be able to run these commands directly on the server, as TCH does not provide shell access. Rather than deleting and recreating your database, you might want to run a query to drop all of the database tables instead. This would leave your database intact and you would not have to create it again. This command creates a database. You would have to do this from the "MySQL Databases" page in CPanel (you cannot create a database in phpMyAdmin). You can use phpMyAdmin to import and run queries stored in a file such as this. On the left side of the phpMyAdmin page, click the middle icon ("SQL") to open a query popup window. There is a "Import Files" tab in this popup window where you can specify a file to be uploaded and imported into your MySQL database. This command would need to be run as a LOAD DATA INFILE query in phpMyAdmin. Hope this helps...
  24. Not on your TCH account, no. As I mentioned above, this is not allowed. Even if it was, server-side java is not available on TCH servers.
  25. Some things I'd probably check: 1) Make sure the PCs are in the same workgroup. On a WinXP machine, right click on "My Computer", click "Properties", then click on the "Computer Name" tab. Click the "Change" button - the workgroup is set in this window. On a Win98 machine, I believe you need to go into Control Panel -> Networking, then click the "Identification" tab and set the computer's workgroup there. It doesn't matter what the name of the workgroup is (other than it needs to be a valid one) - all the computers just need to be in the same one. 2) Make sure the PCs are on the same local subnet. What this means is that each PCs local IP address on your local network should be within one range of IP addresses that is valid for a local (and non-routable) network. For example, my home PCs are on a local network of the 192.168.0.x range of IP addresses. If you've let your PCs get their IP addresses automatically, they could use IP addresses in another range, such as 172.168.x.x. 3) Windows XP has a decent troubleshooting wizard. To get to the file/printer sharing troubleshooter: Click Start -> Help and Support, then click the "Fixing a problem" link on the left near the bottom of the window, then click the "Networking Problems" link on the left, then click "File and Printer Troubleshooter" on the right. Go through the troubleshooting wizard and see if you have the network components installed and set up the way the wizard thinks you should. 4) Make sure that the PC firewalls are configured to allow file sharing to and from the other machines on your local network. A firewall blocking file and printer sharing on either PC will usually prevent both PCs from seeing each other on the network. How to do this depends on what firewall software you're using on each PC (if any). I'm using ZoneAlarm on my PCs, and I had to set up each computer on my network as a trusted IP address before file/printer sharing would work on my network. 5) Have patience and time to work on this. Even if you get all of the issues resolved, Windows can take up to 12 minutes before it re-polls the network to see if there's any new computers on it. Personally, I'd suspect #4 (a firewall issue) first, but you need to rule out the other things first so you're not spinning your wheels tinkering with the firewalls. Hope this helps...
×
×
  • Create New...