|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Discussion: Developing Custom PHP Extensions: Part 1
Developing Custom PHP Extensions: Part 1 If you have any questions or comments on this article then please post them here.
You can read the article here . |
|
#2
|
|||
|
|||
|
is available the second part of this article?
|
|
#3
|
|||
|
|||
|
i'm very interested with this topic and followed the
steps in the tutorial from A to Z. but during the execution a message that "php.h" is not found was generated. What am i supposed to do. I'm using: PHP vers.4.3.ORC2 ;win2000serv. ; IIS ; MySQL 3.23.47 and vc++6 In addition there's something i didn't understand on the page "Setting up our Development environment". With my poor knowledge of Linux i know that __.tar.gz is Linux related and like winzipped files on windows platforms. what's WinRAR related to? Can we extract Linux' zipped files on windows?! i think that there's something i didn't do. Execuse me for my english. I might be asking stupid questions but there's something i don't know. Thanks in advance. |
|
#4
|
|||
|
|||
|
There compiling everything just perfect, but when i try to load extension, by the dl or php.ini setting - i get "Invalid library (maybe not a PHP library) 'php_manomod.dll'
![]() |
|
#5
|
|||
|
|||
|
Very good, took some messing tho.
I got that to, but the dll i created runs fine when loaded from php.ini. When the next tuts available? anyone got any more material? Last edited by andywhitt : January 14th, 2003 at 11:28 AM. |
|
#6
|
|||
|
|||
|
I also get that problem, as well as 3 warnings on compile:
E:\phpsource\php432\php4-STABLE-200302210030\ext\TemplateX\TemplateX.c(40) : warning C4013: 'php_info_print_table_start' undefined; assuming extern returning int E:\phpsource\php432\php4-STABLE-200302210030\ext\TemplateX\TemplateX.c(41) : warning C4013: 'php_info_print_table_row' undefined; assuming extern returning int E:\phpsource\php432\php4-STABLE-200302210030\ext\TemplateX\TemplateX.c(42) : warning C4013: 'php_info_print_table_end' undefined; assuming extern returning int Any ideas at all? |
|
#7
|
|||
|
|||
|
cannot open input file "php4ts.lib"
When I try to compile the project, i get this error:
cannot open input file "php4ts.lib" The file exists in c:/php directory, and has w-r-e permitions. What can it be? Last edited by lera : March 18th, 2003 at 06:55 AM. |
|
#8
|
|||
|
|||
|
When will the next tutorial be available?
There seems to be enough interest to get the second part done, and I personally happen to be very keen to create a custom extension - there are some functions and global variables I need to create which will greatly enhance my code architecture and development speed, but which I can't replicate in class/object form. Please hurry with the next issue!!! ![]() |
|
#9
|
|||
|
|||
|
I am getting a similar error as one of the guys here, although I m working in a Limux environment...
Warning: dl(): Invalid library (maybe not a PHP library) 'first_module.so' in /home/DISTRO/sources/compile/php-4.3.4/ext/firstmod/firstmod.php on line 4 Fatal error: Call to undefined function: first_module() in /home/DISTRO/sources/compile/php-4.3.4/ext/firstmod/firstmod.php on line 7 Please can someone help.... We really r in need of the next Part of the article.... |
|
#10
|
|||
|
|||
|
FYI - SOLUTIONS
I just compiled the sample code with MS VC++ 6.0 and PHP 5.0.1 for Apache 2.0.50 and it works great. At first, I had the error "Can't use dl() in multithreaded server" so I had to delete that line and instead put extension=php_devarticles_mod.dll in my php.ini file. Then, I had the error when starting Apache where it says "Invalid Library (maybe not a PHP library)". I found out that I had a typo in the defines where I had COMPILE_DL_DEVARTICLES instead of COMPILE_DL_DEVARTICLES_MOD. I added the _MOD part, and re-compiled, and this time there were no problems. It loads up with Apache and I got the Hello World five times on the page. Regarding the php4ts.lib problem above, sounds like you didn't add the right path in VC++ under the "library path" section under Project->Settings. I am still trying to figure out why I am getting those three warnings with print_table. |
|
#11
|
|||
|
|||
|
Quote:
Spent a couple hours messing with it, and got nowhere, till I read your post. The tutorial says "COMPILE_DL_YOUR_EXTENSION_NAME".. Never would have figured out "_MOD" was needed at the end. Anyhow, if you include the file "ext/standard/info.h", the phpinfo() print_table warnings will go away. ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Article Discussion: Developing Custom PHP Extensions: Part 1 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|