TCH-RobertM
Members-
Posts
1,230 -
Joined
-
Last visited
Everything posted by TCH-RobertM
-
Tacoma Wa Next R
-
sorry had to do it when you beat 350.4 Bills pic show up sticking his tongue out at you saying you cant beat the head guru lol Sorry bill
-
350.4 seems to be the record Boy oh Boy I tell you I came about this close to pulling using GIMP to make it longer lol just could not force myself to do it though
-
Security Question Reguarding Login Form
TCH-RobertM replied to TCH-RobertM's topic in Open Discussion
Your Quite Welcome jandafields , thats one of the things I like best about TCH is the users and Staff seem to be always willing to help others. -
That is pretty Good stuff to know, Thanks for the update I will have to try that myself , Thanks again
-
not sure if you can use something like Sessions to accomplish this, Just a thought though... I am still learning about php so sorry if this is not in line with what you ar etrying to accomplish
-
Teamwork always a great thing......... Rock Sign
-
TCH-Raul thanks for the information on this. TangentIdea , to get around this issue how about just add a link into the MySql Database referencing a file located in a folder ? might be a way around trying to load an entire BLOB into the database.
-
Security Question Reguarding Login Form
TCH-RobertM replied to TCH-RobertM's topic in Open Discussion
Thanks for some of the thoughts guys, Madmanmcp I probably did not state everything that was going through my mind originally, I needed a more robust way of controlling users access to certian pages on the site based upon there id. I guess in a way, a sort of CMS (content management system) Having to password protect directories certainly would be one solution that I think would work for a few users. I am more interested with the learning process and the flaws associated with implementing such a process. I do thank you and should have been more clear in what I was after... One of my many shortcomings that I will have to try to work on. btrfld Thank you for the piece of information reguarding Sessions. This is something that I did more research on and have been playing with pretty much all day. while researching I found a Tutorial that I happened to find extremely useful as it broke down the actual steps and explained it pretty well for a newbie such as myself Here is the link if anyone is interested. Managing Users with PHP Sessions and MySQL I am sure there are pitfalls to any type of security implementation and I will try to find better ways of doing this going forward. Thank you both for your thoughts This TCH FAMILY FORUM is by far the best arena I have experienced for users trying to help other users out. I hope that I can be helpful to you in the future. If you have any questions please feel free to ask me Take care Robert Rock Sign -
Hi everyone, Hope all is well with you. I have a pretty general question that could produce complex responses so please bare with me. Fist let me try to explain what it is I am wanting to try and then let you know what I think is a solution. Now, prior to me coding this up I would like to ask for some general concerns and pitfalls I might encounter and or any scenarios that might cause a break in my project. so here goes.. I have my website up ( basically using it as a Learning site ) I am currently teaching myself all the programming that I am using , PHP,CSS,(x)HTML,MySQL I think that about covers what I am using currently. What I would like to do is have those users come to my site to have open access to most of the pages. There are some pages though that I would like to have Username Password protected. ONLY Authorized users can access those pages. The way I currently have the site set up I am thinking of using a PHP MySql solution for login authentication. Once the user is Authenticated then on the Rightside of my page links will become available that Normal users will not see. I have created the form portion of this login that can or will call an authenication php file once the user is authenticated I think I can test that with the if(isset($_POST ..........user valididated. What I dont want is for spiders, non authorized users to gain access to those links and or content on those pages. Should I keep the pages in a non-public folder below the www folder ? would this cause problems for authorized users accessing them ? what kind of open issues might I expect. how easy would it be for someone to get to the pages bypassing the authentication login? any thoughts would be greatly appreciated Thanks Robert
-
next is ? ............ hm fictictios land I would have to guess Never Never Land next is I
-
Also did you try adding this into your htaccess file: php_value upload_max_filesize 20M
-
if you put the following code on a page and upload it to your server and run it you will see that the Max file size for upload using php is set to upload_max_filesize 2M 2M ><?php phpinfo(); ?> what makes you think that the error message your seeing is from MySQL ? did you print out the mysql_error() ?
-
One of the quick searches I just did references the following, Note that MAX_FILE_SIZE must be set to the maximum file size that you will allow users to upload. Also note that PHP's configuration limits this to 2 megs - no file greater than that may be uploaded with PHP I am sure there is a work around for this I am just not sure if this is your problem or not.. have you tried uploading files less than 2 meg ?
-
Uploading Files Via Http Using A Php Script
TCH-RobertM replied to mangarevolution's topic in Scripting Talk
First thing is did you make sure that the directory you are uploading to has the permissions set to 777 Chmod 777 is read write and execute permissions and is needed if users are to upload files. here is a link that I was having problems with as well upload files discussion -
That is a great quote I am going to have to foward that to all the Sales people from my previous company who just happen to LOVE Selling Vaporware....all that stuff that we did not have YET but could be developed in record time no matter what the difficulty or costs....Gotta Love Sales
-
Yes Thank you Bruce, I knew there had to be an explanation,
-
Do You Block Socket Connections To Outside Hosts?
TCH-RobertM replied to agusus's topic in CPanel and Site Maintenance
wouldn't that require shell access to run ? if so I dont believe that TCH allows that on shared servers. I just finished reading something about that a minute ago which is why I am replying if I am incorrect please excuse my ignorance -
Don that was one of the things I am going to put into place next, as well as password protect the directory so that only family members and people I authorize will be capable of uploading them.. One of the major concerns I have is that if a person uploads a file that may contain a virus...... this is somthing I need to research as well any thoughts ?
-
ok after a quick test I have found that 777 was the only way I could get this to work I tried 666 I tried 766 and I tried 776 These combinations did not work. I am not sure why the execute bit needs to be set for writing to a directory, but for the purpose of uploading the file without problems 777 was the only solution that worked for me psst jandafields thats only because I am a newcomer that I beat you LOL
-
My understanding of Permissions is that if a File is 777 which stand for read write and execute for everyone if the file was 666 than the file permisions would be Read and Write for everyone no need to have execute permisions on a directory that has only pictures. I am not sure if the execute bit needs to be set but I would think it does not will play with it later and see
-
ok here is what I did to get everything to work correctly Step 1 was I created an Upload directory where I wanted files to be placed. Chmod that directory to 777 or 666 depending on your preference. I chose 777 for now Step 2 was I put the following code on the page where I wanted the user to upload files from ><h2>File Upload Form</h2> <form enctype="multipart/form-data" method="post" action="upload2.php"> Send this file: <input name="userfile" type="file" /><br /> <input type="submit" value="Send File" /> </form> Then I created the upload2.php file with the following code Note you will have to change the {userid} or the entire uploaddir to whatever you need. ><?php $uploaddir = '/home/{userid}/public_html/UPLoaded_FILES/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File {$_FILES['userfile']['name']} was successfully uploaded.\n"; } else { echo "Upload Failed!\n"; } ?> Everything works smooth now Thank you all.
-
Ok just so all of you know what I am finding out, I have narrowed it down to when uploading the file you must specify a file name in the Directory your trying to move it to. I am working on that and will publish my code once I have it working.
-
I have created the Directory /home/rmulher/public_html/UPLoaded_FILES/ and it is chmod 777 I Do not see any other reasons why this is not working other than I will have to look into the .htaccess file and see fi that helps. I have not had any time last night to look at that hopefully that will shed some light... if there are any other reasons that a problem could exist please let me know Thank you again everyone for looking and helping me with this
-
Hi Thomas, Yes I have I am not sure I want that kind of overhead though yet.... I also would not atomate the process until I viewed the actual pictures.... the generate code script would be run periodically by me after I approved pictures I just cant seem to get past the permissions problem I think I ahve checked everything on my side and only thing I Can come up with is maybe I need to create a .htaccess and make settings in there ..... I am not sure though
