working with extensions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jaybee
Forum Newbie
Posts: 12
Joined: Tue May 14, 2002 3:58 pm
Location: brighton, uk

working with extensions

Post by jaybee »

hello everyone, I'm new here, and new to php too, so bear with me :D

I have installed php locally running on Apache/W98. I'm getting to grips with writing some code and want to start learning the use of some things such as pdfLib, so I uncommented the line in php.ini relating to the pdf dll but then php just stopped working...requesting any page hung the server. commenting that line back in fixed it.

I thought it might be the extension_dir but wasn't sure what to change it to (from ./). php.ini is in C:\Windows\ and the extensions are in C:\php4\extensions\

Any help much appreciated - speak slowly as I'm not from these parts!

TIA
User avatar
pHaZed
Forum Commoner
Posts: 28
Joined: Wed May 01, 2002 2:44 am
Location: Sydney -AU

extension dir

Post by pHaZed »

Well i cant really tell what your problem could be,
But set extension_dir= C:\Apache\PHP
or whever php is installed... your extensions should be in \php\extensions right?
btw... on my Win32 system, I seem to have problems with
the line
; include_path=.
so i comment that and all my problems stop... (stoopid windoze)
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

extension_dir = c:\php4\extensions

no \ at the end.

make sure php_pdf.dll exists in that directory or php_cpdf.dll dependent on which one you are trying to use.

When you restart your Apache server look at the logs to see if there were any errors.

Mike
User avatar
jaybee
Forum Newbie
Posts: 12
Joined: Tue May 14, 2002 3:58 pm
Location: brighton, uk

Post by jaybee »

Thanks a million both of you - apache and php are talking to each other again.....however when I open one of the example files included with pdfLib (eg hello.php) I get the error

Code: Select all

Fatal error: Call to undefined function: pdf_new() in c:\apache\apache\htdocs\pdf\hello.php on line 4
Presumably pdfLib isn't installed properly...? Thanks again,
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

Did you check if the dll existed?
Did you restart Apache?
Was there any error in the error log?
User avatar
jaybee
Forum Newbie
Posts: 12
Joined: Tue May 14, 2002 3:58 pm
Location: brighton, uk

Post by jaybee »

yes mike, the dll is there (I chose the 4.1.x one as I'm using php 4.1.1) and apache shows no errors on startup... :?:
Post Reply