Php V Apache

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • angelhouse
    New Member
    • Mar 2007
    • 6

    Php V Apache

    Hi,

    I am total newbie when it comes to Php and Apache so i apologise if this doesnt make sense but i will do my best from what someone has told me:

    Okay, I am hosting my website from home using Apache, I am trying to use PHP for my gallery and have installed Imagemagick to do so.

    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 running windows XP Home.

    Off another post i saw this help board so i created a test.php and copied and pasted the information below into it.:

    So the first thing we need to do is try and find and run the 'convert' command.

    <?
    header('Content-Type: text/plain');
    system("exec 2>&1; type convert");
    system("exec 2>&1; convert -version");
    system("exec 2>&1; convert -list type");
    ?>


    Upload the above PHP and look at it via the web.
    This will run three commands to see what is present. If convert on the command PATH, and if so where is it. What version is it. And what font does IM thing it has access to.

    If you only see errors, then the "convert" is not on the command line path, and your ISP provider did NOT initialise the web server PATH properly.

    If this is the case you will need to find out exactly where it is located and use something like this for you PHP scripts, which makes your script less portable.


    <?
    $im_path="C:\Pr ogram Files\ImageMagi ck-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");
    ?>




    If you get "ldd" library errors, the LD_LIBRARY_PATH is wrong, and the ISP has definitely fallen down on the job, and you need to report the error, and have them fix the web servers LD_LIBRARY_PATH environment variable.


    The message i got back from the first script was:

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


    and the message from the 2nd script was:

    &1; $im_path/convert -version"); system("exec 2>&1; $im_path/convert -list type"); ?>

    Once i told the person i was using running it on Windows XP using Apache he replied:

    Than 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 have no idea what he means, can someone please help this newbie?
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Perhaps you should post your question on the board you originally found the messages on.

    Comment

    • angelhouse
      New Member
      • Mar 2007
      • 6

      #3
      Not sure if this note makes it any easier but:

      Hi Anyone,

      I am looking for help with PHP and ImageMagick.

      I have loaded up some pictures onto my website, but it is taking a long time for them to open, hence why someone advised me to use PHP. However when i have done the:
      Code:
      <?php

      phpinfo();

      ?>


      That brought up alot of information which i dont think i need to detail, apart from the part that says:

      Quote:
      Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
      .

      I am guessing that maybe it is something to do with my configuration of my .ini file. Someone also advised me to download Xampp, which i have done, now i have got all these .ini files, and not sure which one i am editing or where i am editing it.
      C:\Program Files\PHP
      E:\Apache
      E:\Apache\Apach e2\htdocs\Apach e XAMPP\xampp\php
      E:\Apache\Apach e2\htdocs\Apach e XAMPP\xampp\php
      E:\Apache\Apach e2\htdocs\Apach e XAMPP\xampp\php
      E:\Apache\Apach e2\htdocs\Apach e XAMPP\xampp\apa che\bin
      E:\Apache\Apach e2\htdocs\Apach e XAMPP\xampp\php \php4
      E:\Apache\Apach e2\htdocs\Apach e XAMPP\xampp\php \php4
      E:\Apache\Apach e2\htdocs\Apach e XAMPP\xampp\php \php4


      I have even set up a test.php file and loaded it up and i get the image box with "NO GD" in it.

      thanks
      Gary

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        Perhaps it is an issue with your code?

        Comment

        • angelhouse
          New Member
          • Mar 2007
          • 6

          #5
          Originally posted by Motoma
          Perhaps it is an issue with your code?

          So do you have any idea of what i should be putting it my code to make this work????

          Comment

          • angelhouse
            New Member
            • Mar 2007
            • 6

            #6
            This issue has now been sorted, thanks to all that tried to help

            Comment

            Working...