Jump to content

mpiekarski

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by mpiekarski

  1. That would mean that likely, those files were created by apache, provided it is running as the httpd user and group. If it is running as that user and group, then it would create the files as that user and group as well. It may be necessary to have your hosting provider remove these
  2. If I recall correctly, I was having issues getting cross-browsers with IE6 and 7 vs Firefox, safari, etc.. Most everything worked for firefox and safari but odd issues arose with iex. The issue was without saying to display:block, then the elements inside of the div became mis-aligned vs with it. I has just started to do this out of habit at this point. As far as the height and width, I specified them just as an example so the div didn't take up the whole page.
  3. Yes, I was suggesting with a terminal / ssh connection. If it is plesk or cPanel, I believe both of those software titles include a browser-based terminal. Honestly, the downside to accounts like that is security. Since the world of security is ever-changing, there is always someone looking to find a new way to compromise someone else's site. If you are unable to connect using the terminal, or if this is overly complicated for you, it may be in your best interest to forward this thread to the support at your hosting company. I am assuming your user does not own those files or they are marked immutable, both of which would prevent you editing / deleting them.
  4. Hello, Locate your php.ini (easiest way would be to create a .php file with the following contents and then visit it in a browser: <?php phpinfo(); ?> Then, locate that php.ini file and set the following directives (if they are not set): error_reporting = E_ALL & ~E_NOTICE This should clear up your problems. That will hide all of your notices and coding warnings. Keep in mind that it is not suggested to display default errors on production websites. Instead, it is suggested to simply log them. Please try visiting the following URL to gather more information on php.ini and all of the features and directives that are able to be modified / customized. http://us.php.net/manual/en/ini.list.php. Please keep in mind: Before you modify your php.ini file, ALWAYS MAKE A BACKUP. Also, within IIS, whenever you change php.ini, if you want the changes to take effect then you have to restart iis. The easiest way to perform that operation is to go to: 1. Start 2. Click Run 3. (Without the quotes) Type "iisreset" 4. Click OK 5. A black box will pop up reporting that it is stopping and starting a few services. Once IIS is back up and running, the box will close again on its own.
  5. Hello, It is currently working fine after I just checked it, anyway. Would it be possible for you to reply and notify me / anyone else that is curious what exactly was wrong / what the fix was. I was suspecting that it was a DNS problem. I see that both addresses now point to the same IP though.
  6. Hello, The last commenter is correct. However, some browsers may not show this properly unless you are specifying display:block;. So, as an example: <style type="text/css"> #object { height: 100px; width: 650px; display: block; margin: 0 auto 0 auto; /* To ensure that you have proper padding still */ padding: 2px 4px 2px 4px; /* Just for visibility */ background-color: black; color:white; border: red dashed 2px; } </style> <div id="object"> X X X X X X X </div> I put this up here. Let me know if you have any questions!
  7. Hi, * I am assuming that this is a linux server? If so, you can try to `cd` into the directory where you see all those html files. Then run the following command: lsattr -R 2>/dev/null | egrep -v '\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|^$' Please paste the output from the above command back to me. * Are all of these files .html files within their own directory? Is each named something like index.html? * When you say it is a shared account... Do you mean it is shared as in you are on a server with a single account and a bunch of other strangers? Or do you mean it is a Virtualized server on shared hardware If it is the former, try running the following after you `cd` to the directory as I requested above and run the following command: find . -type f -ls | egrep -vs "`id -un`" If you get any output from that command, then the files are owned by a user other than yours. As such, you probably will not be able to modify those files. Once I have more information from you, I can likely further assist you.
  8. Honestly, If you are using PHP on a server, I suggest using suPHP / suExec. And if you want to go really paranoid about it, use it under a chroot jail as mentioned. suPHP Information: www.suphp.org/ http://www.markgrenham.com/articles/howto_lighttpd_and_suphp http://www.itc.virginia.edu/server/web/php/suphp.html http://howtoforge.com/install-suphp-on-various-linux-distributions-for-use-with-ispconfig-2.2.20-and-above Chroot Information: What is a Chroot? http://www.rootprompt.org/article.php3?article=10883 http://www.cyberciti.biz/tips/ultimate-lighttpd-webserver-security.html If you are anything like me, when researching how to do something, no single how-to or About is going to suffice. Thats why I am just linking to several different sites. Essentially, suPHP forces php to run as a particular user and ONLY that user (this can be done per-vhost so ONLY the user owning that vhost can access the php files for that site). Added protection would be implementing a chroot jail. Implementing a chroot jail for your web server will isolate the service to a particular location on the filesystem. The service may be able to access files below its spot on the file system but will typically not be able to get above its location. (ex. if you hate lighttpd chrooted to /vhosts/mydomain.tld, it will be able to access /vhosts/mydomain.tld/www-data/images but it will not be able to access /vhosts/myotherdomain.tld).
  9. Well, I guess some of it is preference. Enterprises tend to stick to RHEL because of the Enterprise Support that comes along with it. RHEL also does not usually release with Edge packages. Most everything is stable and tested. Red Hat as a whole has a finicky standardizing system but it really works out when you need to be stable and can not risk installing an update that is going to destroy everything. With Debian especially, their packages are always behind. Also, Debian-based distros use .deb packages with aptitude / apt for a package manager (or dpkg to install straight debs). Ubuntu is Debian-based. RedHat stuff uses RPM. RPM Files are similar to .debs. They also use a different package manager called either up2date or yum. Yum replaced up2date and is a bit easier to use / more robust (so to speak). CentOS is almost an exact duplicate of RHEL but it is free. Gentoo uses the portage system. Personally, I think Gentoo is amazing. Albeit, I have wanted to kill myself in the past when I messed up a keyword or use flag... Or decided to emerge -eav world not realising how long it would take... But it is AMAZING for learning. It is also really good for all-around functionality. Where it lacks, some may say, is the compiling. Unlike RedHat / Debian stuff, when you choose to install a package with Gentoo, it downloads the source code for each package and compiles it according to your configuration settings. This can take a LONG time if you don't have a very fast box / don't have DistCC mirrors in your network I learned most everything I know about Linux from using Gentoo. Given, I also use Fedora, RHEL, CentOS and Ubuntu everyday, so I have gotten somewhat well-rounded over time I use Ubuntu on my laptop because it is simple and packages install almost instantly. However, it lacks the performance / tweakability (without manually installing everything) that gentoo has. For that reason, my personal servers all run Gentoo. I also have some virtual development servers that I use just for coding and messing around with different projects. Because these are just essentially scratch boxes and performance doesn't really matter to me, I run CentOS 5 on them. If you are reading this thread and are becoming interested, Go download them all! heh Download Ubuntu (8.04, not 8.10) , CentOS5, Gentoo, Backtrack 3 (Great Live CD / USB), Knoppix, Slackware, Debian, Mint and Suse and give them all a try. Sure, you can pick 1 and just run with it... but you will be limited in ability and likely be missing out in the long run. Note: If you decide to try a linux flavor mentioned in here... or even one not mentioned... if you absolutely HATE the one you try... try another. Linux is like beer: The more you try the more fun you have
  10. Hi, First of all let me start by saying that I don't want to come off the wrong way. I am not a database or even a php "expert" but I do use both fairly often. However, in my trials and tribulations with PHP, I think I see a few things that could use some help here: I noticed that you are using the old PHP MySQL Class. Not that this is necessarily a horrible thing, but MySQLI and PDO::MySQL you will likely find MUCH faster, easier to write and just over-all cleaner than the old versions. I am more of an Object Oriented guy myself. If procedural coding is your thing, great. Otherwise, check out http://www.php.net/mysqli and http://www.php.net/pdo::mysql. Additionally, I think you should also brush up on your SQL Syntax. If you are doing a select based on the output of another query, a Join is your saviour. A few simple sites that I used to get a hang of simply MySQL Stuff such as joins were: http://www.geekgirls.com/menu_databases.htm http://www.tutorialspoint.com/mysql/mysql-using-joins.htm http://www.simple-talk.com/sql/database-administration/ten-common-database-design-mistakes/ http://dev.mysql.com/doc/refman/5.0/en/join.html A tip you want to think of when making a database-powered application, is balance. You don't want to do anything extra with your web server than you have to. A join will take care of sorting out all of your results and plugging them into parent query. This way, you will add balance between the web server running php and the database server running MySQL. Think of a join like using the ` ((BackTick)) characters on the linux command line. It is the same concept... For example: mpiekarski@doakes:~$ uname -r 2.6.27-11-generic mpiekarski@doakes:~$ echo "/lib/modules/`uname -r`/kernel/drivers" /lib/modules/2.6.27-11-generic/kernel/drivers mpiekarski@doakes:~$ ls "/lib/modules/`uname -r`/kernel/drivers" acpi char firmware infiniband mfd pcmcia telephony ata clocksource gpio input misc power uio atm cpufreq gpu isdn mmc rtc usb auxdisplay crypto hid leds mtd scsi video block dca hwmon md net serial virtio bluetooth dma i2c media parport spi w1 cdrom edac ieee1394 message pci ssb watchdog As you can see above, I used `uname -r` to plugin my currently loaded kernel version while listing some of the modules for that kernel. Without getting into too big of a rant on Joins, I think that is your ticket. See the links I provided above for more details. I hope my explanation shows you why a Join statement might be more appropriate. I also hope you give MySQLi A try. I 100% suggest it over the old php_mysql. Let me know if you have any questions or if I was in any way unclear. Thanks!
  11. For Gentoo, there is the Gentoo Handbook (see: http://www.gentoo.org/doc/en/handbook/index.xml ). This actually covers a ton of non-gentoo commands as well. There are some really common commands as well as some obscure ones in there. Doing a quick Google search for "Bash Reference" gave some good hits: http://www.gnu.org/software/bash/manual/bashref.html (Bash being 'bourne again shell') http://tldp.org/LDP/abs/html/ also goes over bash scripting. You don't necessarily have to write scripts to start with. However guides like those REALLY help! You will find, by going through people's bash scripts, there are many ways to do the same thing. http://tldp.org/guides.html Has a ton of guides as well. From Beginner level things to Advanced stuff. It is a large variety here and can be a great resource. I am sure just about anyone that reads this has seen and/or read an Oreilly book or 2. Well, Oreilly also has an AWESOME website with just about ALL of their tech books available for reading. http://my.safaribooksonline.com/?portal=oreilly is the link. If you look on there, you can sign up for a free trial. After the trial is up, it is very affordable for what you get out of it. Pricing information is on the site. I think this is the very BEST resource for us IT Guys and Gals out there. Oreilly has published hundreds of linux books for both beginners and experts. This is a GREAT place to start... Not just for Linux but anything for IT. Also remember that Ubuntu's forums carry a HUGE following / Community. http://ubuntuforums.org/
  12. For the new-to-linux I suggest Ubuntu 8.04 as well for a quick start. However, keep in mind Ubuntu is a distro meant for fast-to-install packages not necessarily for getting the full understanding of what you are doing. In a sense, Ubuntu is the Windows / Mac of the linux world. It is great for a liveCD (as is Backtrack3 [[see: remote-exploit.org]]). Backtrack is based off of slackware and comes bundled with several different window managers and tons of common security related, as well as generic apps everyone will use at one point or another. It is great for live and rescue discs. For someone that is new, or just an avid ubuntu or fedora user that wants to get a better understanding of lower-level and manually configuring of linux environments, I highly suggest trying Gentoo. Of all the distros out there, Gentoo is my personal favorite. It was the first distro I installed and within a month or two of using Gentoo, I was very familiar linux as a whole. The community is HUGE (as is Ubuntu community). The forums for both ubuntu and Gentoo are also great (so are the phpfreaks forums ) Most enterprises use RHEL or CentOS ... they are essentially the same thing. Built for servers, binary distros... CentOS is pretty much the free version of RHEL. They are both RPM based using either yum or up2date (depends on version... 5+ use yum out of the box). If you want to familiarize yourself with environments you might see in future jobs, go for CentOS5 as well. VMware might help add some flexibility to testing and trying diffferent flavors. This is one of the best parts, as you can try over and over until you find one that clicks. Like I said, I prefer Gentoo, whereas some people say I am a moron for even using it as it is all done manually. Its up to you. Fedora is okay, but it is not really my favorite. If I am to use RedHat based I will use CentOS5. It is all about trying and practice. Linux is great, but Windows isn't as bad as everyone makes it sound. I prefer linux but Windows still has its uses as well. It is a matter of judging what you are going to be doing and knowing what suits it best. Sorry for the ramble. Hope my post helps
  13. Hello, This last comment will likely work but is not necessarily optimized and can take much longer to run than an otherwise optimized command would. What I mean exactly is that will attempt to find any files and folders and recursively force the deletion of them if their mod date is over 10 days. find /proj/tmp/ -mindepth 1 -type f -mtime +10 -iname "sess_*" -exec rm -f {} \; That is just an example. However, by searching for files by type (f for file, d for directory) you can cut your time in half. In addition to that, the more specific you get, the faster it should go (provided you have some sort of journaled file system like ext3). By using more flags, such as iname you can get even more specific. (I used it with "sess_*" just as an example to find old php session files.). Finally, I used the -exec to run whatever you want on the output. In short: When it comes to the find command - the more specific you get, the better your result. Also, the -exec will do the same thing you are trying to do with xargs. The issue with using xargs rm -rf is that you may hit files with spaces or invalid characters in it. Using something like: xargs -0 rm -rf should escape them. However, there is no point in using the pipe if you can use -exec. (Note: the {} represents what would otherwise be returned to stdout from find [[ie. your files you are finding ]] and you have to end a -exec with an escaped semicolon [[ \; ]] )
×
×
  • 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.