Jump to content

tr4nc3

Members
  • Posts

    47
  • Joined

  • Last visited

tr4nc3's Achievements

Contributor

Contributor (5/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. I'm not sure if this is really the correct place to post this, but I'll give it a shot.. I noticed the release of Gallery v2 posted today on /. and decided to give it a go by installing the minimal version. The installation process looks to be very good, but I've paused at step 3. With our reseller account I would like to try and setup a "Multisite installation" of Gallery 2. This is a quote from the install script's step 3... With our reseller account, on a shared server, can we install the codebase at our main website, and host the gallery install for any number of the websites we resell to. This would save on disk space by requiring only one 12-18 mB copy of Gallery 2 to be installed. On the sites we host/manage, 4 small files, a database, and a few tables, etc, is all that would be required to setup a gallery. The only problem seems to be that files running under our reseller account that reside in the path... /home/mywebsite/public_html/gallery2 ...cannot access files in another accounts path. E.g.: /home/foobar/public_html/gallery2 Would we have to be on a dedicated server to be able to do this? Any thoughts on how we could go about setting up a multiple site install? The only alternative that comes to mind is to setup subdomains at our main website for each website we host, that will be using the gallery script. Or, we could upload multiple installations of Gallery 2 to most/some of the accounts we host/manage, and in a way, we'd really be wasting disk space. Would using the subdomain idea from above be the best way for us to go, for now, since we're on a shared server? I’d really appreciate any advice on this topic. Thank you very much TCH, Mike J.
  2. Can anybody tell me why my "User Defined Mime Types" in cPanel keep on disappearing about once a month????? This has exposed database passwords to the net twice now. I guess I should have the passwords in an included file, but really, my defined types should stay defined and shouldn't just disappear. Btw, I'm setting a type of: "application/x-httpd-php" for "rss"
  3. Thanks Don! It's funny, the same commands that didn't work last night, are working today.
  4. I'm attempting to resize images using Imagemagick and PHP. Anyone know what the path to convert is? Here is a sample of a command I've tried with both system() and exec() convert -geometry 100 x 100 temp/thumb_pic.jpg temp/thumb_pic.jpg I've also tried.. /usr/local/bin/convert -geometry 100 x 100 temp/thumb_pic.jpg temp/thumb_pic.jpg system() returns in error for me. I can't seem to find any information on TCH about the whereabouts of ImageMagick. help? Thanks, mike
  5. your welcome.. Happy to hear you like it. Make sure to look over the sourceForge fourms for this script. It gets really tricky after you process the upload and try to do a header redirect, sessions, or cookies. It's worth it though.. lol cheers
  6. Thanks Don. I actually had tried that program first before setting out on my journey installing mega upload. It has an upload limit of 500k so it won't work very good for my purposes. (I'm having admin users upload clients flash (*.FLA) sites to our server. And they can be up to 10 megs.) I managed to get the 1.35 version of Mega Upload to work with no problems at all. I guess in the most recent 'experimental' version (1.42) the script doesn't POST back data to the PHP script. It instead sends GET variables, but mean time PHP deletes the temporary uploaded POST data.. lol It's actually a very nice script and I plan on upgrading my other scripts that have upload functions to include this nice script. It has the potential to be high on resources so I'll be taking that into consideration when implementing it of course. I searched google for probably a half hour and had tried the java applet before deciding to go with the complicated Perl/PHP solution. But in the end it was worth it. note to self: change "Kbps" to "kB/sec"..
  7. HA! Well, if I'd listen to the author... I'm always trying to use the newest version of anything.. It works without a hitch in 1.35. Big thanks to TCH-Robert and dsdemmin because I think they were trying to help me. Here is a link to 1.35 if your still interested in this script. http://easynews.dl.sourceforge.net/sourcef...oad-1.35.tar.gz /smacks self for not trying the 'stable' version before asking for help at TCH.
  8. Ok.. I'm really close to giving up on this one. I've been trying to install what supposedly is a simple script to install for the past 3 hours. It uses a combination of Perl and PHP to show a progress bar during a file upload. The files are being created in the temp directory that I set, but they are not being copied/moved after the upload is complete. I have a strong feeling that the CGI script can't POST form data back to the PHP script. Because I check $_FILES['file'], and 'tmp_name' and they are blank. The progress bar works perfect. If I could only get the rest of the script to work. Anybody have experience with this script? Or anybody willing to give it a shot at trying to install it on TCH? Takes about 2 minutes to set it up. LOL I've checked cPanel and I'm pretty sure we have all the required Perl Modules. (CGI, Fcntl and File) You can find the script at http://www.raditha.com/php/progress.php Thanks in advance, Mike
  9. Ohh yeah you wanted just the pages and not all the files. Well this PHP script will give you the count of all the .html, .htm, and .php files in your site. ><? function direcho($path){ global $a; if($dir=opendir($path)){ while(false!==($file=readdir($dir))){ if(is_dir($path.$file)){ if($file!='.'&&$file!='..'){ direcho($path.$file);}}else{ if(strstr($file,".htm") || strstr($file,".php")){ $a++;} }}closedir($dir);} return $a;} echo direcho('./'); ?>
  10. Put this php script in the root dir of your site and run it. It will return the total number of files. ><? function direcho($path){global $a;if($dir=opendir($path)){while(false!==($file=readdir($dir))){if(is_dir($path.$file)){if($file!='.'&&$file!='..'){direcho($path.$file);}}else{$a++;}}closedir($dir);}return $a;} echo direcho('./'); ?>
  11. Wow, I was starting to think I'm the only one using CuteFTP Pro. I've used a lot of others and CFTP PRO is by far the best in my opinion. One of my favorite (and most used features) is the Folder Monitor. (Or transfer engine.) It is a feature that sits in the system tray and monitors a folder for change every 5 or X seconds. Once it detects a change, it's automatically connects to the FTP acct. you have it setup for and uploads the changed files. This allows me to be more productive since I don't ever have to manually upload something. I just wait 5 seconds and it's there. Sometimes it will upload my temp files and renamed files.. (because it doesn't end up deleting files... which is probably a good thing don't you think?) So I just use the synchronize feature of CFTP or Dreamweaver to 'clean' the folder, when I've decided it's time. I used to use a program called 'Homepage Upper' that had the same functionality of the folder monitor. But it kept on crashing on me since I upgraded to WinXP. I stopped using it, then it took me a couple years before I set out to find another good util that will monitor folders. CuteFTP Pro does that and SOOO much more. A little complicated at first, but it is truly easy to use once you've learned the basic interface. I doubt I'll ever use another ftp app... CUTE PRO R0XX! and so does TCH! Rock Sign
  12. Does it happen to be new memory that you just installed? It might be a sign of faulty memory. http://www.memtest.org Also maybe, "re-seating" the memory might help. (Uninstall/reInstall) That's about all I can suggest..
  13. I looked over that link. So I guess it is just a behavior of HTTP. Which is weird because I hadn't experienced this problem until just recently. But it's good that I found and learned about this now because I'll know not to do the same thing in the future. The code I posted works great. It just appends the PHPSESSID to the end of the URL. So once your in the members area your set.. I guess as long as you don't do anymore header redirection once your inside. Which I just thought of.. and my application happens to do a header redirect after every form is submitted. I checked and I get booted once I submit the form. LOL! So I got some more work ahead of me once I wake up.. I'm also going to test out session_write_close().. One of the messages in the bug listing mentioned that using s_w_c() fixed the problem for them. >I've also had a similar problem of session variables not being passed following a call to header(). I am running PHP 4.0.15 on an XP m/c. The following worked for me, by placing a session_write_close() before the call to header, followed by and exit(): session_write_close(); header("Location: $strPage"); exit(); I hope this will be of use to some. But he's running on WinXP. I'll find out if it applies to us here at TCH. Thanks for the link! I've bookmarked it. I didn't even think about looking there.
  14. I was using a system of logging on users with sessions. The login form would submit to login.php that would lookup the password in the DB and register a session if the PW matched. If it registered a session it would then preform a header redirect to the homepage of the member area. Well this system worked fine ever since I implemented it 2 months ago. But just today I noticed that it was no longer working. My session variables were not being stored. I ended up bugging the guys at the help desk about it because I thought it must have something to do with the server side of things. (Since my code had previously worked for the past 2 months.) Turns out, it actually did have something to do with the server side of things. They updated PHP. (And before posting this thread I searched for PHP UPDATE and PHP UPDATED and only the first query came up with one result. Which was someone asking how often PHP is updated. No announcements that PHP was updated were found.) I guess with this update sessions variables are not kept through a header redirect. So I am posting this message to warn everyone who might be using a similar structure of programming. I was redirecting with the common.. >header("Location: /members/index.php"); But now I have updated/upgraded my code to redirect in this fashion... >session_redirect('/members/index.php'); function session_redirect ($url = "") { function _safe_set (&$var_true, $var_false = "") { if (!isset ($var_true)) { $var_true = $var_false; } } $parse_url = parse_url ($url); _safe_set ($parse_url["scheme"], "http"); _safe_set ($parse_url["host"], $_SERVER['HTTP_HOST']); _safe_set ($parse_url["path"], ""); _safe_set ($parse_url["query"], ""); _safe_set ($parse_url["fragment"], ""); if (substr ($parse_url["path"], 0, 1) != "/") { $parse_url["path"] = dirname ($_SERVER['PHP_SELF']) . "/" . $parse_url["path"]; } if ($parse_url["query"] != "") { $parse_url["query"] = $parse_url["query"] . "&"; } $parse_url["query"] = "?" . $parse_url["query"] . session_name () . "=" . strip_tags (session_id ()); if ($parse_url["fragment"] != "") { $parse_url["fragment"] = "#" . $parse_url["fragment"]; } $url = $parse_url["scheme"] . "://" . $parse_url["host"] . $parse_url["path"] . $parse_url["query"] . $parse_url["fragment"]; session_write_close (); header ("Location: " . $url); exit; } This might save somebody the hours that me, and the help-desk team had to go through trying to figure out what this problem was. My apologies to the help-desk team for bringing a scripting issue in their direction.
×
×
  • Create New...