Djkanna Posted May 13, 2010 Posted May 13, 2010 (edited) Removed, may be back. Edited November 10, 2012 by Djkanna Quote
Joshua Posted May 13, 2010 Posted May 13, 2010 I was actually surprised as you were on the upload pic form. I designed a php/photo gallery site for a family member who is a photographer and had to enable a simple upload form for new pictures. Google tuts ftw ^_^ They also came in handy for using jquery/ajax with the new slideshow i made....It's amazing....I thought I knew html pretty well to have something as basic as an upload form throw me for a loop lol...... Nice Mod (: Quote
Zero-Affect Posted May 13, 2010 Posted May 13, 2010 Wow in all my time i've never seen try catch before, lol research time:P Quote
Djkanna Posted May 13, 2010 Author Posted May 13, 2010 I was actually surprised as you were on the upload pic form. I designed a php/photo gallery site for a family member who is a photographer and had to enable a simple upload form for new pictures. Google tuts ftw ^_^ They also came in handy for using jquery/ajax with the new slideshow i made....It's amazing....I thought I knew html pretty well to have something as basic as an upload form throw me for a loop lol...... Nice Mod (: Yeah it was extremely strange but hey at least now I know something about them :O and thank you. Wow in all my time i've never seen try catch before, lol research time:P Yeah I was a little um what's the word to use it because not many people here that work with MCCodes uses try {} catch(){} ... It's pretty nice and using PHP exceptions (which I'm about to read another tutorial on :O Quote
Renkia Posted May 13, 2010 Posted May 13, 2010 Yep. This is a mod I know DJ could easily make. Great work mate! Quote
Djkanna Posted May 13, 2010 Author Posted May 13, 2010 Yep. This is a mod I know DJ could easily make. Great work mate! Thank you Renkia :) Quote
Guest Drizzle Posted May 13, 2010 Posted May 13, 2010 Isn't it possible to insert code in the middle of a gif pic and make it still useable? I read that somewhere. Anyway just to be safe maybe chmod the folder for pics so its not executable. Quote
Brad Posted May 16, 2010 Posted May 16, 2010 Bug That when i uploaded the inmage and it is a .gif Warning: move_uploaded_file(userdps/test.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/street/public_html/preferences.php on line 142 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpM0sNGG' to 'userdps/test.gif' in /home/street/public_html/preferences.php on line 142 Success; Your Display picture has been changed Fatal error: Call to undefined function Error() in /home/street/public_html/preferences.php on line 21 Then i went on view users and it come up with Warning: getimagesize(userdps/test.gif) [function.getimagesize]: failed to open stream: No such file or directory in /home/street/public_html/viewuser.php on line 101 Error: Picture cannot be displayed Quote
Brad Posted May 16, 2010 Posted May 16, 2010 i did that is got rid of something but still. this when i upload it Warning: preg_match() [function.preg-match]: Unknown modifier 't' in /home/street/public_html/preferences.php on line 125 Error: That is not an image! Fatal error: Call to undefined function Error() in /home/street/public_html/preferences.php on line 21 And this when i look on my user after i uploaded it Warning: getimagesize(userdps/test.gif) [function.getimagesize]: failed to open stream: No such file or directory in /home/street/public_html/viewuser.php on line 101 Error: Picture cannot be displayed Quote
rulerofzu Posted May 16, 2010 Posted May 16, 2010 TBH there is nothing to fix in the code that has been posted as Ive tested it and it works fine. So the problem lies elesewhere. Your either not running on PHP5 in which case that code will not work or You didnt place it in your code correctly or You have incorrect permissions on your site/server for the directory. PHP upload could have been disabled perhaps. Quote
Djkanna Posted May 16, 2010 Author Posted May 16, 2010 i did that is got rid of something but still. this when i upload it Warning: preg_match() [function.preg-match]: Unknown modifier 't' in /home/street/public_html/preferences.php on line 125 Error: That is not an image! Fatal error: Call to undefined function Error() in /home/street/public_html/preferences.php on line 21 And this when i look on my user after i uploaded it Warning: getimagesize(userdps/test.gif) [function.getimagesize]: failed to open stream: No such file or directory in /home/street/public_html/viewuser.php on line 101 Error: Picture cannot be displayed First one! I've got no clue as I don't use t as a modifier within the preg_match(). Second one! Make sure you have made a folder called userdps and chmoded it to 777. No idea how called to undefiened function Error() came about :S Quote
corruptcity || skalman Posted May 18, 2010 Posted May 18, 2010 im getting a problem after you upload a pic it doesnt give any of the messages just goes back to the pref main menu and it doesnt upload the pic yes ive got the userdps fodler and chmodded it Quote
rulerofzu Posted May 18, 2010 Posted May 18, 2010 Sounds like your having a problem with the case so its loading the default. Have you got something above the switch? $GET['action'] = isset($_GET['action']... etc Quote
corruptcity || skalman Posted May 18, 2010 Posted May 18, 2010 yeah as its magictallguy's preferences page Quote
rulerofzu Posted May 18, 2010 Posted May 18, 2010 Well its what you have in that line thats causing you to load the default. Take a look at the case for this mod. How is it different from the other cases :D Quote
corruptcity || skalman Posted May 18, 2010 Posted May 18, 2010 ok i will do once ive had a short break to rest my eyes Quote
corruptcity || skalman Posted May 19, 2010 Posted May 19, 2010 yeah i got it working now zu. thanks for the help Quote
Djkanna Posted May 19, 2010 Author Posted May 19, 2010 Do not give him it if it's an active game, you know his curiosity will lead him to try to see if he can upload something that is not an image ;) Note: (I will add this to the front page) This has not been tested thoroughly please do your own testing if you find anything that can potentially cause a threat we will fix it I hope. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.