Current location: Hot Scripts Forums » Programming Languages » PHP » How to compile GDLib into PHP


How to compile GDLib into PHP

Reply
  #1 (permalink)  
Old 02-09-06, 06:58 AM
mystic7 mystic7 is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
How to compile GDLib into PHP

Hi all. Let me first state that nobody is more clueless than me when it comes to all of this so I need someone who can tell me what to do in sub-layman's terms. I used auto installer for windows to install PHP on my computer. I used PHP Triad, then upgraded to php 5.1

I know that the auto installer doesn't include extensions so I grabbed the zip file and extracted all of the .dll's to my php/extensions folder. Now comes the hard part (for me):

How do I get my computer to see the new extensions, particularly php_gd2.dll ? Actually thats the only one I'm interested in. I have already added it to my php.ini file, and I know that I have to compile it now, but that is where I'm lost. What do I do, step by step? And remember, if you tell me something like "parse the open ended doodad" or "just open a dos window and type in the root directory" I'll have no idea what you're talking about! I need precise syntax, etc.

Thanks in advance!
Reply With Quote
  #2 (permalink)  
Old 02-09-06, 07:57 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
PHP on windows does not get compiled. That's only for linux. The dll's are the compiled extensions and if you already put them in the extensions folder, and uncommented the line you want in php.ini, then all you should have to do is reboot.

Try restarting apache and/or your computer.
__________________
Yep, it's a signature...
Reply With Quote
  #3 (permalink)  
Old 02-09-06, 08:03 AM
mystic7 mystic7 is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks, but I tried that already. I didn't have to un-comment, I had to add it to the list. I rebooted, restarted apache, but the php scripts I have in the htdocs folder that require the GDLib still say I don't have it.

Thanks for responding so quickly, btw. In the meantime I will check php.ini to make sure that the whole list isn't commented and I may have missed that.

Nope, definitely not commented out. Could it be that PHP auto install still isn't capable of configuring for apache? It said I had to do it manually (something else I don't know how to do). I didn't do it but the websites still come up ok in my browser except for the GDLib thing.

Last edited by mystic7; 02-09-06 at 08:06 AM.
Reply With Quote
  #4 (permalink)  
Old 02-09-06, 08:09 AM
mystic7 mystic7 is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Here is the error message I get from one of the websites:
Error!
The photoalbum module requires the GD library functions. If you are getting this error then your GD libs are missing. Please contact your systems administrator to resolve this issue. With versions of php prior to 4.3.0 you must compile the GD libs into your build of php (--with-gd[=DIR], where DIR is the GD base install directory) Php 4.3.0 and greater have the GD libs already built in.

After we get this straightened out I have a question as to why the site cannot be viewed from a friends computer, but first things first
Reply With Quote
  #5 (permalink)  
Old 02-09-06, 08:31 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
Copy php.ini into C:\Windows, then restart Apache.

You may have the agent running in your taskbar (near the clock), if you right click on that, you should be able to stop/start the service. If not, you can do it manually.

- Have to go into Start -> Settings -> Control Panel -> Admin Tools -> Services
- Right click on Apache, and click on Restart

--------------------------------

After this, follow these steps to view your php configuration that's loading when php does.

In the directory where your installing your php app, create a blank file, an call it phpinfo.php. You can use either notepad, or dreamweaver, but the name is not as important as the need to have it end in .php.

Then, edit that file, and add this line:
Code:
<?php phpinfo(); ?>
Save the file, and then open it using IE or Firefox. http://localhost/path/to/phpinfo.php and that will display all your php settings. Look for a "GD2" section of the file. That will tell you if it's loading. If it's not there, then it's not.

Hope this helps.
__________________
Yep, it's a signature...
Reply With Quote
  #6 (permalink)  
Old 02-09-06, 12:09 PM
mystic7 mystic7 is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
ok, I did everything exactly as you said. There already was a phpinfo.php file in the directory, when I opened it and looked at it, there was no mention of GD anything. I will reboot and try again.
Reply With Quote
  #7 (permalink)  
Old 02-09-06, 12:25 PM
mystic7 mystic7 is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Nope, even after rebooting I get the same error message and there's no GD mentioned in phpinfo.php. I'm checking through localhost/phpinfo.php, not going directly through C:\apache\etc...

It does show dynamic library support as being enabled, however.

btw, I really appreciate the help.

Last edited by mystic7; 02-09-06 at 12:28 PM.
Reply With Quote
  #8 (permalink)  
Old 02-09-06, 12:48 PM
mystic7 mystic7 is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
ok I'm getting closer. In my php.ini file is this:

; Directory in which the loadable extensions (modules) reside.
extension_dir = ./

The full path is c:\apache\php\extensions but I don't know what to do with the ./ as shown above. If somebody could show me the proper syntax that should do the trick.
Reply With Quote
  #9 (permalink)  
Old 02-09-06, 01:36 PM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
One more thing to check. At the top of phpinfo.php, there's a field call: Configuration File (php.ini) Path

That should be set to C:\Windows\php.ini (it'll show up if it finds your php.ini file)

For the extension path, try this... edit php.ini and modify that line to be:
Code:
extension_dir = "c:\apache\php\extensions"
Also, I have gd enabled by my host. Here's my phpinfo.php page. it's called info.php, but it's the same thing. You'll notice that I have the GD field about 1/2 down the page.

http://www.bizzarscripts.com/info.php

That's the field we're looking for.
__________________
Yep, it's a signature...
Reply With Quote
  #10 (permalink)  
Old 02-09-06, 02:15 PM
mystic7 mystic7 is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Grrrr... Nope, still not working. The configuration file path in my phpinfo.php file shows as c:\apache\php\php.ini.

I have a php.ini in that directory as well as in c:\windows, which are identical.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
PHP Downside--Solutions? Amulet PHP 10 07-15-05 08:26 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM
PHP / Graphic Developers someotherguy582 Job Offers & Assistance 1 06-05-05 07:40 PM
How to compile PHP? seriypshick PHP 6 12-28-04 10:31 AM


All times are GMT -5. The time now is 06:33 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.