angelhouse Posted March 27, 2007 Share Posted March 27, 2007 Hi, When it comes to anything like this i am a newbie, but i'll try and explain it as best as i can. I have installed imagemagick (with the help of a friend), but now when i am trying to view my pictures i get a square box with NO GD in it. What is it that i am doing wrong? I am trying to make PHP Thumb use Imagemagick, Is there any way of making that happen? Someone suggested trying to find and run the 'convert' command. So i typed in: <? header('Content-Type: text/plain'); system("exec 2>&1; type convert"); system("exec 2>&1; convert -version"); system("exec 2>&1; convert -list type"); ?> and got the error message back saying: 'exec' is not recognized as an internal or external command, operable program or batch file. 'exec' is not recognized as an internal or external command, operable program or batch file. 'exec' is not recognized as an internal or external command, operable program or batch file. i tried using another command: <? $im_path="C:\Program Files\ImageMagick-6.3.2-Q16" (Not sure if this is correct, it is where my Convert.exe is placed) header('Content-Type: text/plain'); system("exec 2>&1; $im_path/convert -version"); system("exec 2>&1; $im_path/convert -list type"); ?> I even tried putting PHP next to the ,? to see if that made a difference. I am trying to Host my own family website from my Laptop using APACHE, and my laptop has Windows XP home on it. Someone also advised me to "you need to do more work on the PHP installation. Most likely you will have not exist APIs in the PHP, so you will have to turn on the PHP exec function." I spent all weekend looking for this PHP Exec Function, and i couldnt find it anywhere. I was also advised to make sure: Code: safe_mode = Off safe_mode_exec_dir = I searched for that, and i found alot of information in the ini file, hopefully this has something to do with it: Safe Mode ; safe_mode = Off ; By default, Safe Mode does a UID compare check when ; opening files. If you want to relax this to a GID compare, ; then turn on safe_mode_gid. safe_mode_gid = Off ; When safe_mode is on, UID/GID checks are bypassed when ; including files from this directory and its subdirectories. ; (directory must also be in include_path or full path must ; be used when including) safe_mode_include_dir = ; When safe_mode is on, only executables located in the safe_mode_exec_dir ; will be allowed to be executed via the exec family of functions. safe_mode_exec_dir = As silly as it sounds i am getting frustrated now, it has taken me nearly 4 years to start my website, and it is going to die of a very sad death if i cant find help Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/ Share on other sites More sharing options...
trq Posted March 27, 2007 Share Posted March 27, 2007 Create a page with this in it... <?php phpinfo(); ?> Do you see any reference to GD? Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216113 Share on other sites More sharing options...
angelhouse Posted March 27, 2007 Author Share Posted March 27, 2007 Blimey, i wasnt expecting a reply so quickly.................. I'm not near my laptop at the moment, but i know when i have typed in http://www.mywebsite address.org.uk/gallery/gallery1.php, i get and square box with "NO GD" in it. From what i have been advised by a friend, it should not be looking for GD, it should be looking for something else? thanks for your reply Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216120 Share on other sites More sharing options...
angelhouse Posted March 28, 2007 Author Share Posted March 28, 2007 Hi, I looked again last night, and i still have the same message appear when i try and open http://www.mywebsite address.org.uk/gallery/gallery1.php. Obviously i am doing something wrong, or missing something but i dont know what. I appreciate any help i can get as i am ??? when it comes to this. thanks Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216703 Share on other sites More sharing options...
trq Posted March 28, 2007 Share Posted March 28, 2007 Did you even read my last reply? Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216723 Share on other sites More sharing options...
angelhouse Posted March 28, 2007 Author Share Posted March 28, 2007 Yes i did read your reply, and i replied to it saying the problems i have been having. I'm not near my laptop at the moment, but i know when i have typed in http://www.mywebsite address.org.uk/gallery/gallery1.php, i get and square box with "NO GD" in it. From what i have been advised by a friend, it should not be looking for GD, it should be looking for something else? Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216726 Share on other sites More sharing options...
trq Posted March 28, 2007 Share Posted March 28, 2007 Create a page with this in it... <?php phpinfo(); ?> Do you see any reference to GD? Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216728 Share on other sites More sharing options...
angelhouse Posted March 28, 2007 Author Share Posted March 28, 2007 I have created the page in Dreamweaver, and all i got was a PHP Symbol, however when i went to preview it in the web browser it didnt show up anything. There was nothing mentioning GD. Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216902 Share on other sites More sharing options...
Trium918 Posted March 28, 2007 Share Posted March 28, 2007 did you check the php configuration file Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216904 Share on other sites More sharing options...
angelhouse Posted March 28, 2007 Author Share Posted March 28, 2007 Sorry for being thick but check it for what? I dont know what i am supposed to be looking for? As you have probably gathered, i'm new to this Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216905 Share on other sites More sharing options...
wildteen88 Posted March 28, 2007 Share Posted March 28, 2007 I have created the page in Dreamweaver, and all i got was a PHP Symbol, however when i went to preview it in the web browser it didnt show up anything. There was nothing mentioning GD. You cannot run PHP code through dreamweavers design tab or use DW preview features like you can with html. You must save the code as a .php file then upload/move to your server. Then you go to your site or local dev site (localhost) and run it there. Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216928 Share on other sites More sharing options...
angelhouse Posted March 28, 2007 Author Share Posted March 28, 2007 Okay, now i know what you meant, sorry.................. I got a load of information regarding the PHP version. PHP Configuration (PHP Core) apache2handler Apache Environment HTTP Headers Information bcmath calendar com_dotnet ctype date dom filter ftp hash iconv json libxml odbc pcre Reflection session SimpleXML SPL standard tokenizer wddx xml xmlreader xmlwriter zlib Environment PHP Variables Blimey there's loads!!!! Sorry if u didnt want to know all of that Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216955 Share on other sites More sharing options...
wildteen88 Posted March 28, 2007 Share Posted March 28, 2007 Are those the headings/sub-headings from the result of phpinfo()? If they are then GD is not loaded as there is no GD sub-heading. Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-217023 Share on other sites More sharing options...
angelhouse Posted March 29, 2007 Author Share Posted March 29, 2007 Those are the headings and Sub headings from what is on the page, there is absolutely shed loads of information underneath all the headings. I was told that it shouldnt be using GD as it doesnt work on Windows XP, so i have installed ImageMagick, but surely it should be looking for that and not GD?????. The fact that i'm seeing an error message saying 'no GD' means that it's not even looking for ImageMagick, which is confusing me even more. So is my problem with PHP and it's configuration or with ImageMagick? I have told PHP Default file where the Convert.exe is installed (which i read somewhere). Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-217282 Share on other sites More sharing options...
angelhouse Posted March 29, 2007 Author Share Posted March 29, 2007 Also i have just looked at the first column of the PHP Information and i have got the following: System Windows NT ANGELHOUSE 5.1 build 2600 Build Date Feb 7 2007 23:10:31 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Server API Apache 2.0 Handler Virtual Directory Support enabled Configuration File (php.ini) Path C:\Program Files\PHP\php.ini PHP API 20041225 PHP Extension 20060613 Zend Extension 220060519 Debug Build no Thread Safety enabled Zend Memory Manager enabled IPv6 Support enabled Registered PHP Streams php, file, data, http, ftp, compress.zlib Registered Stream Socket Transports tcp, udp Registered Stream Filters convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.* Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-217288 Share on other sites More sharing options...
wildteen88 Posted March 30, 2007 Share Posted March 30, 2007 Open your php.ini and find the following line: ;extension=php_gd2.dll and remove the semi-colon from then start of the line. Save the php.ini and restart your server. Is GD now listed? I was told that it shouldnt be using GD as it doesnt work on Windows XP, so i have installed ImageMagick, but surely it should be looking for that and not GD?Huh?. Who told that? That is completely untrue. I have GD on my WAMP setup. Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-218298 Share on other sites More sharing options...
kenrbnsn Posted March 30, 2007 Share Posted March 30, 2007 I was told that it shouldnt be using GD as it doesnt work on Windows XP, so i have installed ImageMagick, but surely it should be looking for that and not GD?Huh?. GD works fine on windows XP. I use it all the time. Did you install one of the pre-configured PHP packages or each piece by itself? I would recommend installing one of the pre-configured packages like xampp which makes things much easier. Ken Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-218314 Share on other sites More sharing options...
angelhouse Posted March 31, 2007 Author Share Posted March 31, 2007 I have now edited the PHP.ini file it now looks like this: extension=php_gd2.dll and restarted APACHE. i have typed in http://localhost/Gallery/gallery1.php, and still come up with No GD in the Image box. Is there anything else i need to edit? Thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-218578 Share on other sites More sharing options...
angelhouse Posted March 31, 2007 Author Share Posted March 31, 2007 HI Ken, I have now downloaded XAMPP, which exe do install if any of them? there are alot of them? Sorry but as you can guess i'm new. thanks Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-218583 Share on other sites More sharing options...
angelhouse Posted April 2, 2007 Author Share Posted April 2, 2007 Also as you said in your other email: GD works fine on windows XP. I use it all the time. Did you install one of the pre-configured PHP packages or each piece by itself? I would recommend installing one of the pre-configured packages like xampp which makes things much easier. i have installed xampp, and i am now trying to install GD..........Do you know of a website of where i can download it and do i need to configure it in anyway. If so can someone please tell me how? thanks Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-220086 Share on other sites More sharing options...
wildteen88 Posted April 2, 2007 Share Posted April 2, 2007 XAMPP comes with GD :-\, enabled by default if I remember correctly. I think you can enable it via the web based control panel http://localhost/xampp anyway why did you download XAMPP for? All you needed to was change the php.ini in your last set up to enable GD. Which my last post explained how to do. Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-220093 Share on other sites More sharing options...
angelhouse Posted April 2, 2007 Author Share Posted April 2, 2007 I did the following: I have now edited the PHP.ini file it now looks like this: Code: extension=php_gd2.dll and restarted APACHE. i have typed in http://localhost/Gallery/gallery1.php, and still come up with No GD in the Image box. Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-220096 Share on other sites More sharing options...
angelhouse Posted April 18, 2007 Author Share Posted April 18, 2007 HI, Can someone please let me know why i am seeing the message attached in the word document, and what i need to do to Fix it. thanks [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-232488 Share on other sites More sharing options...
per1os Posted April 18, 2007 Share Posted April 18, 2007 www.php.net/system exec is a function of php as hell www.php.net/exec but exec is not a function on the system. What you are trying to do is call exec as a script, which is obviously not a script at least not anywhere near where you are trying to run it. system('/path/to/exec etcetc', $return); may or may not help, but exec MUST be a script for it to run, if not you need to call the correct program/script to run. Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-232493 Share on other sites More sharing options...
angelhouse Posted April 18, 2007 Author Share Posted April 18, 2007 I may of forgot to mention, i hosting the website from my laptop using windows XP, not sure if that makes a difference? Quote Link to comment https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-232500 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.