Jump to content

Recommended Posts

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  >:(

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216120
Share on other sites

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

 

 

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216703
Share on other sites

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?

 

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216726
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216928
Share on other sites

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  :)

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-216955
Share on other sites

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).

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-217282
Share on other sites

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.* 

 

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-217288
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-218298
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-218314
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-218578
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-220086
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-220093
Share on other sites

  • 3 weeks later...

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.

 

Link to comment
https://forums.phpfreaks.com/topic/44501-php-v-apache/#findComment-232493
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.