gdfhghjdfghgfhf Posted April 15, 2008 Share Posted April 15, 2008 i have this basic upload script which will upload an image inside "images/" folder. It is very simple, and works with only one file the problem is that it will work only with JPEG files If i try to upload with a GIF image, the result will be a black image could anyone help me to make it work with gif files? <form action="<?php echo $_server['php-self']; ?>" method="post" enctype="multipart/form-data" id="something" class="uniForm"> <?php include("bands.php"); ?><br> <input name="new_image" id="new_image" size="30" type="file" class="fileUpload" /> <br> <button name="submit" type="submit" class="submitButton">AJOUTER L'IMAGE</button> </form> <?php $band = $_POST['band']; if(isset($_POST['submit'])){ if (isset ($_FILES['new_image'])){ $imagenamz = $_FILES['new_image']['name']; /* $numz = time(); $nums = date('dmy'); $num1 = "$nums" . $numz; $band = $_POST['band']; echo $band; echo "<hr>"; $imagename = "$band" . $num1; echo $imagename; */ echo "L'image a été ajouté dans l'album photos de <b>$band</b><hr><br>"; $originalname = $_FILES['new_image']['name']; $date = date('dmy'); $imagename = "$band" . "_" . $date . "_" . $originalname; echo $imagename; $source = $_FILES['new_image']['tmp_name']; $target = "images/".$imagename; move_uploaded_file($source, $target); $imagepath = $imagename; $save = "images/" . $imagepath; //This is the new file you saving $file = "images/" . $imagepath; //This is the original file list($width, $height) = getimagesize($file) ; $modwidth = 800; $diff = $width / $modwidth; $modheight = $height / $diff; $tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; $save = "images/sml_" . $imagepath; //This is the new file you saving $file = "images/" . $imagepath; //This is the original file list($width, $height) = getimagesize($file) ; $modwidth = 150; $diff = $width / $modwidth; $modheight = $height / $diff; $tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; echo "<img src='images/".$imagepath."'><br>"; echo "Thumbnail: <img src='images/sml_".$imagepath."'>"; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/ Share on other sites More sharing options...
bobinindia Posted April 15, 2008 Share Posted April 15, 2008 What version of the gd library is shown in phpinfo() GIF wasn't supported earlier i believe. Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-517449 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 15, 2008 Author Share Posted April 15, 2008 gd GD Support enabled GD Version bundled (2.0.28 compatible) GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled i think 2.0 is a recent version?? Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-517457 Share on other sites More sharing options...
bobinindia Posted April 15, 2008 Share Posted April 15, 2008 that is not it then. you will have to wait for a better mind than mine. Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-517462 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 15, 2008 Author Share Posted April 15, 2008 i'm also having another problem: the script includes a function to resize the main image if it exceeds a certain width i have set it to 800 $modwidth = 800; if works fine but my problem is when the width is less than 800 : the image will be resized to 800px width anyway, thus enlarging it, and loosing quality with big nasty pixels instead of a fluid image Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-517473 Share on other sites More sharing options...
bobinindia Posted April 15, 2008 Share Posted April 15, 2008 <?php $size = getimagesize($yourimage); $uploadx = $size[0]; $uploady = $size[1]; if (($uploadx > 800) || ($uploady > 800)) { //execute your resizing code } else{ //don't } ?> Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-517526 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 16, 2008 Author Share Posted April 16, 2008 thanks a lot! now could anyone help me with the gifs Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518183 Share on other sites More sharing options...
Daniel0 Posted April 16, 2008 Share Posted April 16, 2008 $image = imagecreatefromjpeg($file) ; If you run that on a GIF file then it'll obviously break. Use a different function depending on whether it JPEG, GIF or PNG. Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518214 Share on other sites More sharing options...
schme16 Posted April 16, 2008 Share Posted April 16, 2008 I'll elaborate on Daniel0's explanation: $image = imagecreatefromjpeg($file); is jpeg specific, what you want is gif right? that would be: $image = imagecreatefromgif($file); and png would be: $image = imagecreatefrompng($file); what I use is a switch that tests the image for its image type, then uses the right script for the determined type. list($width, $height, $type, $attr) = getimagesize('dir/to/image.gif'); the variable $type is what you will be looking for, its a numeric value and goes as follows: 2 = jpeg 3 = png 4 = gif Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518240 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 16, 2008 Author Share Posted April 16, 2008 thanks for the explanations, i think this is leading somewhere hehe following your instructions i tryed with this code list($width, $height, $type, $attr) = getimagesize('db/img/images/".$imagepath."'); if ($type == '2') { $image = imagecreatefromjpeg($file) ; } if ($type == '4') { $image = imagecreatefromgif($file) ; } but now the upload wont work, even with jpg the image will be all black sorry for bothering again... but i'm still a newbie Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518286 Share on other sites More sharing options...
bobinindia Posted April 16, 2008 Share Posted April 16, 2008 if you upload a large image and try to do some image functions on it you need to change the max amount of memory a script can use in the phpini. Default is 8M. I had to change to 64M to cover my problems. Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518311 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 16, 2008 Author Share Posted April 16, 2008 where do i see the current memory allowed in phpinfo? PHP Logo PHP Version 4.4.6 System Linux server.supersonicserver.com 2.6.18-8.1.15.el5.028stab049.1 #1 SMP Thu Nov 8 16:23:12 MSK 2007 i686 Build Date Jun 27 2007 20:02:12 Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pgsql=/usr' '--enable-sockets' '--enable-track-vars' '--with-xmlrpc' '--with-zip' '--with-zlib' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini PHP API 20020918 PHP Extension 20020429 Zend Extension 20050606 Debug Build no Zend Memory Manager enabled Thread Safety disabled Registered PHP Streams php, http, ftp, https, ftps, compress.zlib Zend logo This program makes use of the Zend Scripting Language Engine: Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies PHP Credits Configuration PHP Core Directive Local Value Master Value allow_call_time_pass_reference Off Off allow_url_fopen On On always_populate_raw_post_data Off Off arg_separator.input & & arg_separator.output & & asp_tags Off Off auto_append_file no value no value auto_prepend_file no value no value browscap no value no value default_charset no value no value default_mimetype text/html text/html define_syslog_variables Off Off disable_classes no value no value disable_functions no value no value display_errors Off Off display_startup_errors Off Off doc_root no value no value docref_ext no value no value docref_root no value no value enable_dl On On error_append_string no value no value error_log no value no value error_prepend_string no value no value error_reporting 2039 2047 expose_php On On extension_dir /usr/local/lib/php/extensions/no-debug-non-zts-20020429 /usr/local/lib/php/extensions/no-debug-non-zts-20020429 file_uploads On On gpc_order GPC GPC highlight.bg #FFFFFF #FFFFFF highlight.comment #FF8000 #FF8000 highlight.default #0000BB #0000BB highlight.html #000000 #000000 highlight.keyword #007700 #007700 highlight.string #DD0000 #DD0000 html_errors On On ignore_repeated_errors Off Off ignore_repeated_source Off Off ignore_user_abort Off Off implicit_flush Off Off include_path .:/usr/local/lib/php .:/usr/local/lib/php log_errors On On log_errors_max_len 1024 1024 magic_quotes_gpc Off Off magic_quotes_runtime Off Off magic_quotes_sybase Off Off max_execution_time 30 30 max_input_time 60 60 open_basedir no value no value output_buffering 4096 4096 output_handler no value no value post_max_size 8M 8M precision 14 14 register_argc_argv Off Off register_globals Off Off report_memleaks On On safe_mode Off Off safe_mode_exec_dir no value no value safe_mode_gid Off Off safe_mode_include_dir no value no value sendmail_from no value no value sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i serialize_precision 100 100 short_open_tag On On SMTP localhost localhost smtp_port 25 25 sql.safe_mode Off Off track_errors Off Off unserialize_callback_func no value no value upload_max_filesize 2M 2M upload_tmp_dir no value no value user_dir no value no value variables_order GPCS GPCS xmlrpc_error_number 0 0 xmlrpc_errors Off Off y2k_compliance On On apache APACHE_INCLUDE no value APACHE_TARGET no value Apache Version Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.6 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a Apache Release 10337100 Apache API Version 19990320 Hostname:Port quebecunderground.net:80 User/Group nobody(99)/99 Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100 Timeouts Connection: 300 - Keep-Alive: 15 Server Root /usr/local/apache Loaded Modules mod_limitipconn, mod_auth_passthrough, mod_log_bytes, mod_bwlimited, mod_php4, mod_frontpage, mod_ssl, mod_setenvif, mod_so, mod_expires, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core Directive Local Value Master Value child_terminate 0 0 engine 1 1 last_modified 0 0 xbithack 0 0 Apache Environment Variable Value DOCUMENT_ROOT /home/qcanarco/public_html HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7 HTTP_ACCEPT_ENCODING gzip,deflate HTTP_ACCEPT_LANGUAGE fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3 HTTP_CONNECTION keep-alive HTTP_COOKIE bblastvisit=1208118498; bblastactivity=0; bbsessionhash=cea77ae4a6258bb6a598938d0d664b63; bbcpsession=17a79fdd5411164a6affe8dda932ad55; bbuserid=1; bbpassword=577dd33023d5a94e58ccc3d333b6f0da HTTP_HOST quebecunderground.net HTTP_KEEP_ALIVE 300 HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin REDIRECT_QUERY_STRING vbseourl=db/img/phpinfo.php REDIRECT_STATUS 200 REDIRECT_URL /db/img/phpinfo.php REMOTE_ADDR 216.246.226.227 REMOTE_PORT 52760 SCRIPT_FILENAME /home/qcanarco/public_html/vbseo.php SERVER_ADDR 208.110.80.27 SERVER_ADMIN [email protected] SERVER_NAME quebecunderground.net SERVER_PORT 80 SERVER_SIGNATURE <ADDRESS>Apache/1.3.37 Server at quebecunderground.net Port 80</ADDRESS> SERVER_SOFTWARE Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.6 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a GATEWAY_INTERFACE CGI/1.1 SERVER_PROTOCOL HTTP/1.1 REQUEST_METHOD GET QUERY_STRING vbseourl=db/img/phpinfo.php REQUEST_URI /db/img/phpinfo.php SCRIPT_NAME /vbseo.php HTTP Headers Information HTTP Request Headers HTTP Request GET /db/img/phpinfo.php HTTP/1.1 Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding gzip,deflate Accept-Language fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3 Connection keep-alive Cookie bblastvisit=1208118498; bblastactivity=0; bbsessionhash=cea77ae4a6258bb6a598938d0d664b63; bbcpsession=17a79fdd5411164a6affe8dda932ad55; bbuserid=1; bbpassword=577dd33023d5a94e58ccc3d333b6f0da Host quebecunderground.net Keep-Alive 300 User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 HTTP Response Headers X-Powered-By PHP/4.4.6 Keep-Alive timeout=15, max=96 Connection Keep-Alive Transfer-Encoding chunked Content-Type text/html bcmath BCMath support enabled calendar Calendar support enabled ctype ctype functions enabled curl CURL support enabled CURL Information libcurl/7.15.3 OpenSSL/0.9.7a zlib/1.2.1.2 ftp FTP support enabled gd GD Support enabled GD Version bundled (2.0.28 compatible) GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled imap IMAP c-Client Version 2004 mbstring Multibyte Support enabled Japanese support enabled Simplified chinese support enabled Traditional chinese support enabled Korean support enabled Russian support enabled Multibyte (japanese) regex support enabled mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. Directive Local Value Master Value mbstring.detect_order no value no value mbstring.encoding_translation Off Off mbstring.func_overload 0 0 mbstring.http_input pass pass mbstring.http_output pass pass mbstring.internal_encoding no value no value mbstring.language neutral neutral mbstring.substitute_character no value no value mcrypt mcrypt support enabled version >= 2.4.x Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes cbc cfb ctr ecb ncfb nofb ofb stream Directive Local Value Master Value mcrypt.algorithms_dir no value no value mcrypt.modes_dir no value no value mhash MHASH support Enabled MHASH API Version 20020524 mysql MySQL Support enabled Active Persistent Links 1 Active Links 1 Client API version 4.1.22 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib -lmysqlclient Directive Local Value Master Value mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off openssl OpenSSL support enabled OpenSSL Version OpenSSL 0.9.7a Feb 19 2003 overload User-Space Object Overloading Support enabled pcre PCRE (Perl Compatible Regular Expressions) Support enabled PCRE Library Version 7.0 18-Dec-2006 pgsql PostgreSQL Support enabled PostgreSQL(libpq) Version 7.4.17 Multibyte character support enabled SSL support enabled Active Persistent Links 0 Active Links 0 Directive Local Value Master Value pgsql.allow_persistent On On pgsql.auto_reset_persistent Off Off pgsql.ignore_notice Off Off pgsql.log_notice Off Off pgsql.max_links Unlimited Unlimited pgsql.max_persistent Unlimited Unlimited posix Revision $Revision: 1.51.2.4.2.3 $ session Session Support enabled Registered save handlers files user Directive Local Value Master Value session.auto_start Off Off session.bug_compat_42 Off Off session.bug_compat_warn On On session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On session.use_only_cookies Off Off session.use_trans_sid Off Off sockets Sockets Support enabled standard Regex Library Bundled library enabled Dynamic Library Support enabled Path to sendmail /usr/sbin/sendmail -t -i Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.quiet_eval 0 0 assert.warning 1 1 auto_detect_line_endings 0 0 default_socket_timeout 60 60 safe_mode_allowed_env_vars PHP_ PHP_ safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry user_agent no value no value tokenizer Tokenizer Support enabled xml XML Support active XML Namespace Support active EXPAT Version 1.95.6 xmlrpc core library version xmlrpc-epi v. 0.51 php extension version 0.51 author Dan Libby homepage http://xmlrpc-epi.sourceforge.net open sourced by Epinions.com zip Zip support enabled zlib ZLib Support enabled Compiled Version 1.2.1.2 Linked Version 1.2.1.2 Directive Local Value Master Value zlib.output_compression Off Off zlib.output_compression_level -1 -1 zlib.output_handler no value no value Additional Modules Module Name Environment Variable Value SELINUX_INIT YES CONSOLE /dev/null TERM linux INIT_VERSION sysvinit-2.85 PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin RUNLEVEL 3 runlevel 3 PWD / PREVLEVEL N previous N HOME / SHLVL 2 _ /usr/local/apache/bin/httpd PHP Variables Variable Value PHP_SELF /db/img/phpinfo.php _REQUEST["bblastvisit"] 1208118498 _REQUEST["bblastactivity"] 0 _REQUEST["bbsessionhash"] cea77ae4a6258bb6a598938d0d664b63 _REQUEST["bbcpsession"] 17a79fdd5411164a6affe8dda932ad55 _REQUEST["bbuserid"] 1 _REQUEST["bbpassword"] 577dd33023d5a94e58ccc3d333b6f0da _COOKIE["bblastvisit"] 1208118498 _COOKIE["bblastactivity"] 0 _COOKIE["bbsessionhash"] cea77ae4a6258bb6a598938d0d664b63 _COOKIE["bbcpsession"] 17a79fdd5411164a6affe8dda932ad55 _COOKIE["bbuserid"] 1 _COOKIE["bbpassword"] 577dd33023d5a94e58ccc3d333b6f0da _SERVER["DOCUMENT_ROOT"] /home/qcanarco/public_html _SERVER["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 _SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7 _SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate _SERVER["HTTP_ACCEPT_LANGUAGE"] fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3 _SERVER["HTTP_CONNECTION"] keep-alive _SERVER["HTTP_COOKIE"] bblastvisit=1208118498; bblastactivity=0; bbsessionhash=cea77ae4a6258bb6a598938d0d664b63; bbcpsession=17a79fdd5411164a6affe8dda932ad55; bbuserid=1; bbpassword=577dd33023d5a94e58ccc3d333b6f0da _SERVER["HTTP_HOST"] quebecunderground.net _SERVER["HTTP_KEEP_ALIVE"] 300 _SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 _SERVER["PATH"] /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin _SERVER["REDIRECT_STATUS"] 200 _SERVER["REMOTE_ADDR"] 216.246.226.227 _SERVER["REMOTE_PORT"] 52760 _SERVER["SCRIPT_FILENAME"] /home/qcanarco/public_html/dbimgphpinfo.php _SERVER["SERVER_ADDR"] 208.110.80.27 _SERVER["SERVER_ADMIN"] [email protected] _SERVER["SERVER_NAME"] quebecunderground.net _SERVER["SERVER_PORT"] 80 _SERVER["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.37 Server at quebecunderground.net Port 80</ADDRESS> _SERVER["SERVER_SOFTWARE"] Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.6 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a _SERVER["GATEWAY_INTERFACE"] CGI/1.1 _SERVER["SERVER_PROTOCOL"] HTTP/1.1 _SERVER["REQUEST_METHOD"] GET _SERVER["QUERY_STRING"] vbseourl=db/img/phpinfo.php _SERVER["REQUEST_URI"] /db/img/phpinfo.php _SERVER["SCRIPT_NAME"] /db/img/phpinfo.php _SERVER["PATH_TRANSLATED"] /home/qcanarco/public_html/dbimgphpinfo.php _SERVER["PHP_SELF"] /db/img/phpinfo.php _SERVER["vbseo_fn"] phpinfo.php _SERVER["VBSEO_URI"] /db/img/phpinfo.php _SERVER["PATH_INFO"] /db/img/phpinfo.php _SERVER["argv"] Array ( [0] => ) _ENV["REQUEST_URI"] /db/img/phpinfo.php _ENV["SCRIPT_NAME"] /db/img/phpinfo.php _ENV["PHP_SELF"] /db/img/phpinfo.php _ENV["PATH_INFO"] /db/img/phpinfo.php _ENV["SCRIPT_FILENAME"] /home/qcanarco/public_html/dbimgphpinfo.php _ENV["PATH_TRANSLATED"] /home/qcanarco/public_html/dbimgphpinfo.php PHP License This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact [email protected]. Modified by Daniel0 to use a code tag instead of a quote tag so it takes up less space. Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518348 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 16, 2008 Author Share Posted April 16, 2008 btw, my image is 10kb so i boubt this is the problem Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518350 Share on other sites More sharing options...
rameshfaj Posted April 16, 2008 Share Posted April 16, 2008 I think for the size u can check in the configuration file-php.ini and manage it. Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518390 Share on other sites More sharing options...
bobinindia Posted April 16, 2008 Share Posted April 16, 2008 php4 and php5 show different results via phpinfo() if you open the phpini file and do a Find for memory it is the first result Anyway it won't be the problem for 10k images Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518408 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 16, 2008 Author Share Posted April 16, 2008 hmm i dont have direct access to the server - only ftp or cpanel - so i cant have access to that php.ini file anyway im pretty sure this isnt the problem since i am uploading 10k images bump! Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518922 Share on other sites More sharing options...
BlueSkyIS Posted April 16, 2008 Share Posted April 16, 2008 here is a great class for uploading/changing images http://www.phpfreaks.com/forums/index.php/topic,164304.0.html Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-518931 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 18, 2008 Author Share Posted April 18, 2008 my script is already fine... and now i know what function to use for gifs, it's probably just an error with my the way i use it or something.... could anyone please just help me with that? i don't want to start over with another script Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-520059 Share on other sites More sharing options...
gdfhghjdfghgfhf Posted April 19, 2008 Author Share Posted April 19, 2008 i still need help i'm desperate Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-521369 Share on other sites More sharing options...
schme16 Posted April 20, 2008 Share Posted April 20, 2008 Contact me at [email protected], and I will fix the code for you, free of charge. Quote Link to comment https://forums.phpfreaks.com/topic/101165-upload-a-gif-image-inside-a-folder/#findComment-521919 Share on other sites More sharing options...
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.