GD Image Error After Php Upgrade.
I've just recently upgraded to PHP Version 5.2.3 from 4.4.7 and noticed a problem with one of my GD images. It should use verdana.ttf for the text using the code below
imagettftext($image, $fontSize, 0, $margin, 73, $black, $font, $tickerText);
But for some reason the text is messed up... and ideas why?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Upgrade To PHP 4.2.2 From 4.2.0 Mysql Error
I'm running PHP 4.2.0 on Suse Linux. I compiled PHP with : ./configure --with-mysql --enable-trans-sid --with-sybase=/usr/local/freetds --with-apxs=/usr/local/apache/bin/apxs When I compiled 4.2.2 it compiles and installs fine, and I checked this with phpinfo(). However my scripts using MySQL can no longer connect.
Error With Streaming Png And A Upgrade To PHP4.3.4
I had a very simple gallery for photos on my site. The gallery was coded by an old friend I don't have contact anymore. I don't know much about PHP, so I used his code and everything was fine until I upgraded my PHP. I wanted to start learning PHP/mySQL so I upgraded from 4.1.2 to 4.3.4, and now the gallery doesn't work any more. I have tried to fix and still am going to, but I have seen some errors in his code that should have caused an errors before but didn't. This doesn't make sense to me. It now creates output like this. notice: notice: warning here is the streamed PNG file. and then it repeats the same notices and warning over again. So what I want to know is there away to get this to work now without fixing the code, as it will take me a while to get good enough to understand and fix it all. I'm still going to try and fix it, it fun to learn, but it sort of suxs that it doesn't work anymore.
Why I Sart Getting 'Fatal Error: Allowed Memory Size...' After Php Upgrade?
The hosting company I have one account (and several Add Domains) upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I start getting the error message: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 122880 bytes) in... on domains they use Gallery2 or are CMS (Joomla or Drupal) based....
404 Error -> Image Substitution
I have a 404 error handler that can redirect when a url is mistyped or when a page has moved. I would like to have the same control for images. For example: photo/1234-Kitchen.jpg is now located at: photo/1234/Kitchen.jpg If the image is referenced by the wrong url the familar image icon with the 'X' in it appears. I can trap the error in my 404 handler and figure out the correct location of the image, but I have been unable to send the correct image to the calling browser.
404 Error -> Image Substitution
I have a 404 error handler that can redirect when a url is mistyped or when a page has moved. I would like to have the same control for images. For example: photo/1234-Kitchen.jpg is now located at: photo/1234/Kitchen.jpg If the image is referenced by the wrong url the familar image icon with the 'X' in it appears. I can trap the error in my 404 handler and figure out the correct location of the image, but I have been unable to send the correct image to the calling browser.
Image Resizing Error
I have a simple script that resizes a JPG image and it seems that when the resolution (not the weight!) of the image is greater than 2000 x 1500, I get an annoying server error 500. At first I thought it could be a memory allocation error, but I tested an image at 3MB with a resolution of 300 x 300 and it works. Whereas the SAME image at 2200 x 1700 at 600KB fails. How can this be? Is there a way to resize an image without using imagecreatefromjpeg? Code:
Image Cannot Be Displayed, Because It Contains Error ...
the script that show image is: <?php include('dbinfo.inc.php'); mysql_connect($localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT file,filesize,filetype FROM user WHERE id=1;"; $result=mysql_query($query); mysql_close(); $file=mysql_result($result,0,"file"); $filesize=mysql_result($result,0,"filesize"); $filetype=mysql_result($result,0,"filetype"); header('Content-Type: '.$filetype); header("Content-Disposition: attachement "); print $file; ?> it's work fine execpt it show the image as a attachement (Save as... window), so Apache, mysql, php seem to work fine. the problem is only on http header of image i think. i want the image directly so, i use this: <?php include('dbinfo.inc.php'); mysql_connect($localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT file,filesize,filetype FROM user WHERE id=1;"; $result=mysql_query($query); mysql_close(); $file=mysql_result($result,0,"file"); $filesize=mysql_result($result,0,"filesize"); $filetype=mysql_result($result,0,"filetype"); header('Content-Type: '.$filetype); print $file; ?> it's don't work, firefox gave me "The image http://ip:8080/viewimage.php cannot be displayed, because it contains error." IE show me nothing at all. any one have a idea ? ---------------------------------------------------- Windows NT 5.1 build 2600 (XP Professional English) Apache 2.0.54, running as a server PHP Version 5.0.4 running as module MySQL 4.1.7 (a dll from php) Firefox english 1.0.4 Internet Explorer 6
Error In Converting GIF Image To Black & White
I have a doubt in php.I wrote a php program to convert colour Images to balck & white.It is working fine with JPEG files and PNG files.When it comes to GIF files I am not getting the colour Image.I think I found the reason of getting error.But I am not able to solve it I am pasting the code which I wrote The reason I think is when I am extracting the RGB value from the image,R and G will be zero everytime.But I am getting the value of B. As a Result I am getting a Black Box instead of Black and white Image $file = 'logo2.gif' header('Content-type: image/gif'); $imgtype = "gif"; list($width, $height) = getimagesize($file); $source = imagecreatefromgif($file); $bwimage= imagecreate($width, $height); for ($c=0;$c<256;$c++) { $palette[$c] = imagecolorallocate($bwimage,$c,$c,$c); } function yiq($r,$g,$b) { return (($r*0.299)+($g*0.587)+($b*0.114)); } for ($y=0;$y<$height;$y++) { for ($x=0;$x<$width;$x++) { $rgb = imagecolorat($source,$x,$y); $r = ($rgb >16) & 0xFF;//error is here I am getting a value of zero for $r and $g $g = ($rgb >8) & 0xFF;//error getting the value zero everytime $b = $rgb & 0xFF;//Here I am getting value $gs = yiq($r,$g,$b); imagesetpixel($bwimage,$x,$y,$palette[$gs]); } } imagegif($bwimage);
Error:: Uploading Image Via HTML Form Using PHP4.2.0
I have encountered a *Strange*problem in my HTML form since upgraded from PHP4.0.5 to 4.2.0. I have a HTML form to upload an image file to the server. It works fine with PHP 4.0.5. However, since using PHP 4.2.0, I found that if including (enctype="multipart/form-data") in the <form> tag, all the <input> fields placed after the <file> field in the HTML form is missing from the $HTTP_POST_VARS array. Here is a testing script I used, could illustrate the problem much clearly.
Getimagesize() Not Working ... Image Exists, Error Says It Doesnt :(
I am using the latest version of PHP and GD (reinstalled both today - march 29 2005) and am using GD to create thumbnails on the fly. I am having no issues with GD, however, I am now trying to retrieve the width and height of other images withought ANY sucess ... I am recieving the same error repeatedly : "... failed to open stream: No such file or directory ..." I am replacing spaces with '%20' as PHP.net suggests, and have parsed local and full paths (which all work when entered into a browser) with no success. here is my code : $image=str_replace(' ','%20',$_GET["image"]); $imageinfo = getimagesize($image); $w=$imageinfo[0]; $h=$imageinfo[1];
Upgrade To Php 4.3.2
I am currently running php 4.2.1 on FreeBSD. How would I go about upgrading this to version 4.3.2.
How To Upgrade From 4.1.0 To 4.2.2
Can anyone help by giving dead simple step by step instructions for me to upgrade from 4.1.0 to 4.2.2? I am running on Windows ME and using Apache and MySQL.
Should I Upgrade To PHP 4.3.1 ?
I am currently running PHP 4.2.3. I want to install the gdLib and I want to do this as quickly and painless as possible. Should I upgrade to 4.3.1 (i.e. does this have the gdlib included in it) or should I try and install the gdLib with 4.2.3 (from which i can tell is a difficult process)?
Upgrade Help Please
Which is the correct newsgroup to post questions on upgrading RedHat 9.0 to the latest PHP?
PHP & MySQL Upgrade
I am looking to upgrade my versions of PHP & MySQL on my server. I am wondering what websites you would recommend that are easy to fallow and with step by step instructions on how to upgrade both of these. Also how to keep all of the extions or even install more extions for PHP.
MySQL Upgrade
While I know that this forum isnt the primary place for this, I cant seem to get any answers from the people in the MySQL forum (not enough expertise or time I suppose), so since many PHP people use MySQL maybe you guys have tackled this one already. Basically I want to move from MySQL 3.23.56 to 4.0. I can find the various routines to run to fix the data in the databases. But my question is more fundamental. Once I get the 4.0 release, do I just install it via the setup, or do I need to UNinstall 3.23.56 first? Current environment: WinXP Pro, IIS, PHP 4.3.1.
Php5 Upgrade
I've been asked to upgrade an existing older linux/apache/mysql/php installation to php5. I'd rather not mess with the other components if I don't have to - just php5. Can I do that? I can get around the command line ok, but haven't done alot of configuration. The install instructions at http://www.php.net/manual/en/install.unix.php include steps on compiling apache -- do I really need to do that?
Upgrade PHP With GD Support
My current php version is 4.3.3My current GD version is 2.0.15I want to upgrade GD to 2.0.28. How to upgrade it.
Upgrade To 4.3.10 Issues?
I got an email from my web host stating that they are going to upgrade their PHP on the server from 4.3.8 to 4.3.10. Are there any known problems with this upgrade that need to be addressed in the PHP scripts I use? I'm sure there will always be some small glitches in an upgrade like this but I'm looking for any info on the scale of any "register globals = off" type changes.
Upgrade Php Version On Red Hat 7.1
I've got a server running Red Hat 7.1 with the default installation of php/apache. This version of php doesn't have a lot of the default functions I need like mysql and odbc support. The php rpms for Red Hat 7.3 have the options I need. Can I just install these rpms on Red Hat 7.1? I tried doing this and it told me some libraries I need are not present. Would installing these libraries cause any problems? If anyone knows of the best way for me to add these options for php that I need, please let me know.
How Do You Upgrade Php On Linux?
I need to upgrade php 4.3.7 to version 5.0.0 on slackware linux. Do I need to uninstall 4.3.7 first or will installing 5.0.0 just overwrite the 4.3.7 version? I'm running Apache with php.
Division By Zero After PHP-Upgrade
I have following problem after my hoster updated to PHP 5.2.1. I'm not really sure from what Version the update was done, but it was definetly something like 5.x.x. Locally I run XAMPP w/ PHP 4.4.4 and my script runs just fine. These are the two lines which generate the error. $return = $sbox0[$b0] + $sbox1[$b1] % pow(2,32) ; $return = ($return ^ $sbox2[$b2]) + $sbox3[$b3] % pow(2,32); It doesn't matter what is stored in the sboxes since the error has to be from the modulo. I tested if pow(2,32) would generate a zero, but it doesn't. So that can't be the problem.
Upgrade From PHP Version 4.2.2 To 4.3.10
I am currently running PHP Version 4.2.2 on Red Hat Linux release 9 (Shrike) with Apache/2.0.40 (Red Hat Linux) I would like to upgrade to the latest version of PHP (4.3.10 ?). PHP was pre-installed as RPM version, I would like to know where i can find an RPM upgrade... What are the steps to take, will original php.ini be overwritten, do i need to change Apache confg files.
Does Upgrade Cause Slowdown?
I am a webmaster of a website and the server maintianers upgraded from php 4 to php 5.At around the same time my site slowed down.Does a php upgrade cause a site to slow down? Is there any way in which I can find out why my site slowed down?...
How To Upgrade PHP Via FreeBSD Port?
I'm currently running PHP 4.05 on FreeBSD 4.3. I installed PHP via the ports collection, and now I want to upgrade to 4.06. What would be the best method for accomplishing this? On a test server with the same configuration I deleted the /usr/ports/www/mod_php4/work directory and did a make install. when i ran phpinfo() it said that it was version 4.06, but I don't know if that was really the right way to do it.
PHP 4.3.4 Upgrade ... Need Help With Drop Downs
I upgraded from PHP 4.1.2 to 4.3.4 (Mac OS X 10.2.8), and then had to adjust all of my form scripts to retrieve the POST variables explicitly (because 4.3.4 requires this). I did this like the following: <input type=text name=myinputbox> <input type=submit name=submit value=submit> ------- $myinputbox = $_POST[''myinputbox]; $submit = $_POST['submit']; That works just fine, and the variable data is available for use elsewhere in the script. Radio buttons and textareas also work in this way. However, my problem is that <SELECT> drop down menus apparently DO NOT work in this way. This renders my form useless without this ability. If you can post a reply code for retrieving the <SELECT> POST variable to the following code, I would appreciate it. <SELECT name="MENU"> <option>option1</option> <option>option2</option> <option>option3</option> </SELECT> I assumed it would be this (but didn't work): $MENU = $_POST['MENU']; Hope I am clear with my explanation.
Script Problem With Upgrade To PHP 4.3.1
I have tried this script on PHP 4.2.3 and it works. then I upgraded to 4.3.1 and it doesn't work. I believe its because the variable use the null function and that was removed in 4.3.1 Can anybody tell me how I cn get this working? Also the variable declration might hve changed. PHP Code:
MSSQL Problem After Upgrade To 4.3.10
My hosting company upgraded yesterday to pHp 4.3.10. Since then, all my INSERT/UPDATE/DELET query on our MS-SQL database seem to fail. No specific error message is returned by mssql_get_last_message(). The SELECT statements work fine. If I test on my local server running 4.3.9 the application behaves properly.
Upgrade PHP4.3.7RC1 To 4.3.9
I want to upgrade, but can anyone tell me if it is an good idea tot install the newer version on top of the old one? Ore can i aspect than problems whit my configuration?
Upgrade Or Separate Installation?
I have been using a prepackaged WAMP (Windows Apache MySQL PHP) installation and along the way (over several years) have modified this and that, added vhosts, modified php.ini the way I want, set up a live php manual (docref_root), moved DLLs, and a thousand other things. Problem is, I have not had to modify anything in a *long* time. Everything works wonderfully as is, I just want to try out some newer features (5.0.4). Quite frankly, I am not confident in my knowledge of the upgrade process (yes I have read the documentation, I don't find it that helpful). I am beginning to think it would be safer to just create a separate installation of PHP and point a vhost to it or something. Am I being paranoid or is there some *really* simple instructions somewhere for upgrading just PHP on a Windows system?
How To Upgrade Beta3 To 4.0 Release?
How would I go about upgrading php4b3 to php4.0 release? I realize I could remove apache and php and reinstall, but it seems there should be an easier way. I am running FreeBSD 4.0 and apache.
Upgrade PHP With Informix Support
My existing PHP installation has mysql support, however I need to add informix support. Can I upgrade PHP with informix support, or do I have to reinstall everything?
Upgrade OpenSSL = Relink PHP?
I just learned that the version of OpenSSL I'm running (on a RedHat EL) server has some vulnerabilities that I'd like to close. I'm running PHP 5.1.4. My question is this: I've got PHP 5.1.4, and it's built with "--with-openssl=shared" in the ./configure command line. If install the latest version of OpenSSL, do I need to relink PHP?
Php Problem After Apache Upgrade
Hi, they just upgraded my webserver to apache 1.3.17 and now I always get these errors on all my PHP pages What's changed that all my code wont' Method Not Allowed The requested method POST is not allowed for the URL /~simpson/test/test.html
ImageMagick Upgrade Problem
I used to run the next command on ImageMagick v5.5.7 to resize an image: convert -size 64x64 in.jpg -resize 64x64 +profile '*' -type Optimize out.jpg When upgraded to ImageMagick v6.2.5 the same command fails with the error: convert: no decode delegate for this image format `in.jpg'. I saw a comment that the syntax was changed. What is the new syntax for the same command in v6.2.5?
Server Upgrade, Php Problems?
My site recently had its controll panel upgraded, beforhand i was able to update delete and insert records, now i cant insert? Has anyone heard of this or is it just a coincidence ?
Client Not Requested (How To Upgrade PHP)
Client does not support authentication protocol requested by server; consider upgrading MySQL client Another one Is it possible to UPGRADE php version 4.5.5 to php5 ? Here I stuck now? what should I do now? Pls Help anyone For this.
Upgrade OpenSSL Version = Rebuild PHP?
I just learned that the version of OpenSSL I'm running (on a RedHat EL) server has some vulnerabilities that I'd like to close. I'm running PHP 5.1.4. My question is this: I've got PHP 5.1.4, and it's built with "--with-openssl=shared" in the ./configure command line. If install the latest version of OpenSSL, do I need to relink PHP?
Upgrade Methods, Php, Pear, Phpdoc
I want to upgrade my version of PHP and with it, to be consistent PECL. I'm assuming, I'll also need to install Pear from scratch Maybe I'll go all the way and upgrade my Apache2 webserver from my current phpinfo() Apache Version Apache/2.0.54 (Win32) PHP/5.0.4 from Apache's website: Apache 2.2.3 Released I think it would be hard to install over my current installation at C:php I'll probably save my .ini/cfg files (Apache also), rename the directory and start from scratch. Since I don't know what Pear does in its installation process, I envision a nightmare, if I tried to move things over manually. Starting from scratch has to be the cleaner, simpler way to go.
Mogrify -draw Text Stopped Working After Upgrade
If anyone can recommend a more appropriate newsgroup for this question? We recently upgraded from php 4.1.2 to php 4.3.9 and ImageMagick 5.5.7 to version 6.2.5. I have a script that creates a random number image as a Turing Test, and without changing that, it's stopped working right after the upgrade. But, only part of the mogrify command. Here's the line I'm using: $imagick = '/usr/local/bin/mogrify -pointsize 26 -draw 'text '.$txRand.','.$tyRand.' "'.$rand.'"' -rotate '.$rRand.' -swirl '.$sRand.' -charcoal 2 /var/www/html/verimgs/'.$mrand.'.gif' exec("$imagick"); PHP is executing the command OK, because it creates the image and does the swirl and charcoal and the rotate, but it's not doing the -draw part. If I echo $imagick it's perfectly formatted: /usr/local/bin/mogrify -pointsize 26 -draw 'text 17,23 "659"' -rotate 2 -swirl 25 -charcoal 2 /var/www/html/home/verimgs/97531.gif I can run that line in a command shell and it will perform perfectly. According to the ImageMagick site: http://www.imagemagick.org/script/c...ptions.php#draw I'm formatting the -draw switch just right. But still, it won't print the numbers onto the image. I don't get it. What may have changed in the upgrade to prevent this script from working the way it did before?
PHPMYADMIN Upgrade Caused Table Structure To Change
My host provider recently upgraded the phpmyadmin to 2.9.2 and mysteriously there were then problems with my website. First of all, in some tables enum fields were changed. For example Paragon 1,2,3,4 got changed to Paragon 1˙2˙3˙4. Replaced the , commas with y with 2 dots. Also, my cart whcih uses cookies starting to act very strange. Has anyone ever experienced anything like this. Host provider cannot understand this. I did spot an error when I logged into phpmyadmin that the mbstring was not installed so the host porovider fixed this and all seems to go back to normal but I would like to find out what exactly happened.
Unable To Pass Parameters To Php Page After Upgrade From Php3 To Php4
After I tried upgrading my php version from 3 to 4, all my code which passes parameters between web pages have stopped working. Not sure what the problem is. Have tried defining the parameters in the accepting php page with a '$_GET["parameter_name"]; and also a $_REQUEST["parameter_name"]; but with no luck. Even tried Globals without any luck. Below is an eg. of what I am trying to do..
Fpdf Not Using Specified Filename In "Save As..." Dialogue After Acrobat Upgrade
Using the string: $pdf->Output("testfile.pdf", I); the "Save As..." dialogue box does not provide the specified filename. The default is the name of the PHP page used to generate the PDF. It worked when using Acrobat 4.0 and since upgrading to 6.0, it no longer works. The "D" and "F" switches do parse the correct filename. Problem exists in both Netscape and IE. Anyone else experience this and is there a resolution?
How Do I Get The Image Height Width When Generating Image From PHP (getimagesize Does Seem To Work)
Is it possible to obtain the width/ height of an image when that image is dyanically created using a PHP script and passing GET attributes. For example: <img src="images/showImage.php?image_id=5" /> My images are created from images stored on the server, their paths stored on in database table and retrieved using the GET image_id and PHP script (showImage.php). Because the images are different sizes I would like to be able to use a PHP function / class that can take an image path and generate the IMG width and height attributes. This would just tidy up the page when loading. So when I try to use PHP 'getimagesize' like so: $wh = getimagesize ($_SERVER['DOCUMENT_ROOT'] . "/images/showImage.php? image_id=5"); .... I get an error saying that the file or directory does not exist: Warning: getimagesize(/customersites/0/home/httpd/vhosts/ mydomain.co.uk/httpdocs/images/showImage.php?image_id=5): failed to open stream: No such file or directory in /customersites/0/home/httpd/ vhosts/mydomain.co.uk/httpdocs/classes/html.class.php on line 11 I thin it may be the GET atttribute that is throwing it. How would I go about doing this?
|