Jump to content

Mini File host Image upload problem


Recommended Posts

So ive been trying to use mini file host a free uploading program that seems to have alot of bugs, Im not that savvy in php but I got the upload to accually increase for max file size and a bunch of errors in the php... tho I have gotten myself stck when it came to the image uploading...

 

I get an error on various lines depending on what file type I upload in the basic.php

 

a link to my site it here

zyse.ath.cx

its crap I know

click the file upload beta link and try to upload an image... on the server it IS uploading a pic but providing no links no thumbnails and so forth just the php error of

 

 

Fatal error: Call to undefined function: imagecreatefromjpeg() in C:\Program Files\YellowTip\Htdocs\uploadtest\basic.php on line 49

 

which is

this set of commands

 

function createthumb($name,$filename,$new_w,$new_h){

$system=explode('.',$name);

if (preg_match('/jpg|jpeg|JPG/',$system[1])){

$src_img=imagecreatefromjpeg($name);

}

if (preg_match('/png|PNG/',$system[1])){

$src_img=imagecreatefrompng($name);

}

if (preg_match('/bmp|BMP/',$system[1])){

$src_img=imagecreatefrombmp($name);

}

if (preg_match('/gif|GIF/',$system[1])){

$src_img=imagecreatefromgif($name);

}

 

 

lines vary on file type

 

to look at the php file itself download the file

 

zyse.ath.cx/basic.rar

 

I cannot for the life of me figure out how to get it to work. :facewall:

 

Let me know what you think.

Link to comment
Share on other sites

Make sure you have enabled the GD extension for PHP. Open you php.ini file look for

;extension=php_gd2.dll

Remove the semi-colon (;) from the start of the line. Save the php.ini and restart your HTTP server (eg Apache, IIS etc).

 

NOTE: Make sure you have setup the extension_dir directive to point to PHP's extension folder. For example if PHP is installed in C:/php then extension_dir needs to be set like

extension_dir = "C:/php/ext"

Link to comment
Share on other sites

Make sure you have enabled the GD extension for PHP. Open you php.ini file look for

;extension=php_gd2.dll

Remove the semi-colon (;) from the start of the line. Save the php.ini and restart your HTTP server (eg Apache, IIS etc).

 

NOTE: Make sure you have setup the extension_dir directive to point to PHP's extension folder. For example if PHP is installed in C:/php then extension_dir needs to be set like

extension_dir = "C:/php/ext"

 

I have done that but the library files are not installed with yellowtip 2.0

I need a way to install them.

 

I have the line uncommented andwhatnot,

any idea how I can install them?

Link to comment
Share on other sites

Whats yellowtip?

yellow tip is like wamp and xammp its a webserver with php and sql.

 

Unfortunatly when I try any otehr program I get an unexpected $end

pointing at the end of file.

 

Zyse.ath.cx/uploadtest/

 

thats what it looks like, but uploading pics isnt working because of the missing GD library, I tried pointing it to xammp php extensions but it refuses to see them. I tried installing php 5.2 and pointing it there but again refuses to read them, saying file is not found.

Link to comment
Share on other sites

ITS FIXED!!!!

using this webpage

http://museum.php.net/win32/

downloading the previous version that yellow tip was using 4.3.6

extracting the extension folder

(you have to use same version of dll's as the php version)

on the

extensions_dir

I HAD to put c:\program files\yellowtip/extensions/

Had to put the / instead of the \.

uncommented the php_gd2.dll

 

AND IT WORKS!

 

If you want to help me test upload a pic to http://zyse.ath.cx/uploadtest/

 

Thanks for helping tho!

 

Lord Zyse

Link to comment
Share on other sites

Reason I havent upgraded to php 5, is because I get so many errors from stuff im trying to run or was previously running.

 

ive tried the latest

xammp

wamp

and many others and none of them would run minifilehost or half of my php besides the simple stuff.

I generally get unexpected $end.

 

But again I thank you for trying to asist me I did in fact get it to work. using 4.3.6

Link to comment
Share on other sites

Yellowtip is extemely outdated you should use WAMP or XAMPP.

 

The reason you got errors hte last time with WAMP/XAMPP is becuase the script you're using uses tags such as <? ?> or <?= ?> which are called short tags. By default these are disabled. However they can be enabled by editing the php.ini and enabling a setting called short_open_tag

Link to comment
Share on other sites

I had enabled the short tags but it still didnt work, accually and I think this is funny, I was manually upgrading the php when we had d a power surge, I didnt finish , as my computer restarted it booted up normally, and the instalation was finished and working, I now have the latest apache and php for my yellowtip server, but thank you again for your assistance.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.