vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [RELEASE vb2.0+] vB Photo Upload (https://vborg.vbsupport.ru/showthread.php?t=27475)

BradC 09-07-2001 10:54 PM

Not being an ass... but wajones got it to work, ToraTora! got it to work, and I have got it to work.. just fine.

That error usually happens when the right folder combination is not set. That message is pulled out of an if statement, which looks into the database for the image name.. like "1_photo.jpg" then after that it will go to a function that will check the path to the image folder, to see if there is a file that the name "1_photo.jpg" if it finds it, it goes to another function which displays it. If it can't find it, it gives you that error.

So there has to be a directory problem, cause it is updating to the database just fine, but not the server. So when you upload a photo and it displays that, check the very bottom of the page for an error. Also make sure that you have the uploaded folder set to 777.

So it should work... if you are having this problems PLEASE POST THAT YOU ARE!...

--- as a test check your server to see if there is anything uploaded into the folder on the server.

ALSO.. if you are trying to upload a .gif file, it will not be possible unless you uncomment that gif code, and comment the other line. Which I tried my best to explain in the comments and other files.

maverick1236 09-07-2001 11:23 PM

no errors at bottom of page--just the "not found" error

BradC 09-08-2001 05:52 AM

ok... please download the new version... I was running through it with Sarge.. and we got it to work for him..

so just make sure that you have the correct files and folder paths set in the variables and it should rock and roll..

JohnV 09-08-2001 04:52 PM

Greetings All:

For those of you that are having problems getting the file to upload properly, here's a quick fix:

Find:
exec("cp $picture $path/$chacha");

Replace With:
copy("$picture", "$path/$chacha");

That should take care of the problem!

BradC 09-08-2001 04:58 PM

I am no expert... but I know my works pretty well. But thanks this way might help for others using maybe a different version of php.

I got my way straight out of the php manual. So I would hope it would work, and it does for me and a few others. :)

RobAC 09-08-2001 06:00 PM

Brad,

Couple other problems: In upload.php the following parameters do not show up in: $welcome =

$max_height = "200"; /* Max Image Height */
$max_width = "200"; /* Max Image Width */
$Size_Restrictions = "10000"; /* image size limit in bytes */
$Width_Restrictions = "200"; /* your width limit */
$Height_Restrictions = "200"; /* your height limit

grumpy 09-08-2001 06:35 PM

Thanks! I've installed it on my test forum and it works perfectly. Can't wait to put it to use!

BradC 09-08-2001 06:41 PM

That is very interesting... cause it used to work.. now today it don't.. what in the world.

-- update

I have tried different combinations... with no luck yet.

The best thing I can say to do.. is to take those variables out of that welcome line and just put in the info you want.. like 430 for height and width etc.. that way it will show up for now. :)

JohnV 09-08-2001 07:19 PM

Greetings

The way you had it before relied on an external program, which was called as a system function. The method I have above uses php's build in copy function.

So, anyone using windows nt, 2000, etc. etc. or any other OS that doesn't have the cp function built in, will be able to use the method above.

You might want to change it in your base code as well, since calling external system functions from PHP can lead to security problems on some OSs (buffer over flows, escape characters, etc. etc.)

BradC 09-08-2001 08:26 PM

JohnV,

thanks for the heads up... that helps a lot to know others can help try to perfect the code for flawless installations for everyone :)

--- Also..

thanks to JohnV I updated the zip file with the changes. I went ahead and commented out the old way, and added the new way. So if you have problems with the new way... just look for that copy function.. and comment that line out and use the other line.


All times are GMT. The time now is 09:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01185 seconds
  • Memory Usage 1,734KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete