Compiling PHP from source using Microsoft Visual c++ 2008 error - php

First off i want to thank everyone who has contributed towards making this website the great resource that it is today.
OK, Here is my problem.
I am trying to work with id3 tags in php and im using wamp server 2.0i on my vista 32bit ultimate. I followed the steps at php's wiki page on compiling extension for windows machines.(cant post the link).everything goes nice and smooth up until towards the end where i get an error saying fatal error c1083. could not open header zlib.h. I am running the shell as the administrator and not really sure what else there is i can do. But im really going crazy over this. I have followed instructions step by step but some how i am still getting stuck. Here is the link to the text file containing the compiling process.
https://docs.google.com/leaf?id=0Byjn3U-sXJBHNjA3ZTI1NTktYzlmZS00NjAxLTgyNzYtYTM3ZTRhYmY2NzE2&hl=en&authkey=CL6j7e4D
Thanks in advance,
I'm just gonna bang my head against the wall for little bit more and then either get unconscious or sleepy! LOL

Wooohoooo, Ok all I had to do was configure --disable-zlib and then nmake. But now one more thing. I am using wamp server and i tried just copy and pasting the produced folder but wamp does not like it and just crashes. Oops. good thing i kept the old copy of the php folder as a back up (unlike what i usually do). So i guess my question is: how do i use this compiled php with my id3 module? sorry about the dumm question.

The PECL id3 module is listed in alpha and hasn't been modified since 2004, so it is very unlikely that you'll be able to use it in any stable method against PHP 5.3.
Have you considered using the GPL-based getID3 class ( http://getid3.sourceforge.net/ ) which, despite its name, is capable of reading and writing id3 from a wide variety of files and has comparable functions to everything the id3 module ( http://us2.php.net/id3 ).

Related

Application built on joomla displaying raw data on localhost

m having a strange problem never faced it before and tried every thing and i mean everything but no luck at all.
What happened was i downloaded the application source code built on joomla 1.7 via ftp from the live server and deployed it on my localhost and configured it correctly. Now what happened is it displaying some sort of raw data all over the browser window, attached is the screenshot.
Please guys its been 5 days since i stuck in this mess any help will be highly appreciated
Thanks in advance
Maybe you have installed an extension, which supports distribution of PHP code as binary code? There exist different extensions to PHP, which support this kind of functionality. Probably the most widespread is Zend Guard. To execute a script which was encrypted by this software your PHP needs to load the free loader extension provided by Zend. If your server has loaded this extension and your localhost does not, the output might be something like you encounter.
Your first step should be to compare the output of phpinfo of both servers. If Zend Guard (or a similar extension) is loaded on your production server and not on your localhost, this might be the problem. Next step should involve taking a look at the PHP files and search for one which contains lots of unreadable characters. If this seems unreasonable to you, you might as well just install Zend Loader and see if it works then, which might be less work.

Can't Find simplepie.inc in Version 1.3.1

I am trying Simple Pie for the first time and I'm running into a problem. I downloaded the new 1.3.1 version and unzipped it. I set up everything according to the instructions (created the php and cache folders in my root directory, loaded the library and php auto-loader.php file into the php folder, and set the permissions to 755 on the cache folder). However, despite looking at every single file in the Simple-pie folder I can't find the simplepie.inc file. I have searched Google for someplace to find it but I can't find anything and I've searched on here for solutions but I don't see anything. Can someone please tell me where to get the simple-pie.inc file?
If version 1.3.1 doesn't include it how can people that download that version use the program?
Thanks in advance!
It does. It exists in the library folder.
However you should not include the autoloader.php (if you are using the stock download and not your own build)
Some of the documentation for SimplePie perhaps needs updating, a lot of the examples use the older versions and may not work with the most recent version, I know I had to do significant heavy lifting to get the News Blocks 2.0 demo to work. And it still doesn't do everything POPURLS does, SimplePie is a beginning not necessarily an end, but it does work, assuming you give it good feeds. Poorly formatted feeds ie feeds that do not conform to RSS or Atom standards can bring your playhouse crashing down.
I just have this in my news aggregator index.php:
require_once('../news/php/autoloader.php');
Eventually they updated their documentation and the default download.

JSR-223 - Where to find ScriptServlet?

I'm confused as to where exactly I should find com.sun.script.http.ScriptServlet that I've seen in numerous samples across the web.
Is JSR-223 included in JDK 1.6? I've seen people talk about a reference implementation, but the only working link on Oracle's site doesn't seem to include such a class. My non-local environment also uses OpenJDK, which I doubt would have any Sun implementation of JSR-223 anyway! In this case where can I get it from? I'm not even sure what 'it' is in this scenario :/
I want to be able to use PHP as a view technology, invoked from a Servlet. I gather JSR-223 was designed with this sort fo usage in mind, but I'm struggling to figure out
Edit
One guide in particular (http://acet.rdg.ac.uk/projects/vre/jsr223inst.php) mentions invocation of PHP via JNI, which sounds ideal. If there's something in existence as part of the final spec that'd allow me to do this via Servlet, I'd be a very happy bunny.
It's available here. Below is an extract of relevance:
Previously, Ludo and Arun described how to run PHP 5 on GlassFish using Quercus, see here and here. However, it is also possible to invoke the native PHP engine on Glassfish, using jsr223 and a PHP bridge. The following steps should work on Sparc Solaris 10.
Download script.jar and drop it into <glassfish>/lib.
Download libphp5-5.0.1-sparc-S2.so, save it as libphp5.so and drop it into <glassfish>/lib.
Download phptest.war and deploy in Glassfish.
Run the PHP on http://localhost:8080/phptest/hello.php.
The class you mentioned is contained in the script.jar file.
There's Quercus, Caucho's Java reimplementation of PHP in Java, quite easy to package as a WAR. JSR223 is included in Java 6, but the only script engine it's shipped with is Rhino, Mozilla's JavaScript interpreter. There are a number of JSR-223 compatible script engines available, check out the repository. Instructions on how to integrate Quercus in eg Glassfish can be found on Arun Gupta's blog.

Where to get php_perl.dll while pecl4win is down?

I need to call a Perl script from a PHP file, and I've gotten as far as know that I need the Perl class, and that it's in the php_perl.dll extension. I've also downloaded the php_perl package from PECL, but as you know, it's just the source and needs to be compiled. I don't work in C, so compiling it's not really an option -- I tried downloading Visual Studio Express but I still can't seem to make it happen.
So I really need php_perl.dll, but http://pecl4win.php.net/ext.php/php_perl.dll just tells me that "The pecl4win build box is temporarily out of service. We're preparing a new build system." Surely there must be SOMEWHERE else I can get the DLL, but I can't seem to find it. Every link I find seems to either be someone else looking for it, or a warez-looking site that wants you to give them your credit card info.
Thanks...
---- Nick
The Internet Archive Wayback Machine results look promising, perhaps one of the links will lead you to the file (although they often take such binary files out of the archive).
EDIT: I was able to get the DLL for the older branch php-5.0.5 (5_0) that way and uploaded it here (removed). Or try the direct link.
Looking for the newer branch php-5.1.6 (5_1) however gave no results so far, I checked the 4 most recent dates.
EDIT2: Found another working link for branch php-5.1.2.
The sidebar
says to use the following repository until the new buildsystem is online:
http://downloads.php.net/pierre/

phpurple compile error - php 5.3

Im trying to compile phpurple. Im doing everything according to the documentation:
hxxp://phurple.php.belsky.info/ch02.html
but "make" gives me an error:
/myhomedir/phpurple/purple.c: In function ‘call_custom_method’:
/myhomedir/phpurple/purple.c:1370: error: ‘zend_fcall_info’ has no member named ‘object_pp’
/myhomedir/phpurple/purple.c:1408: error: ‘zend_fcall_info_cache’ has no member named ‘object_pp’
I`ve found other people with the same problem:
hxxp://www.mail-archive.com/monetdb-bugs#lists.sourceforge.net/msg05515.html
hxxp://belsky.info/archives/23-Phurple-per-se-PHPurple.html
but nobody gives any information about successful php 5.3 build and the message
PROJECT IS CLOSED if you want
commercial support for php 5.3, let me
know ... )
does not help at all.
does anyone have any idea how to compile it or any clue how to fix the problem ?
P.S. Sorry about the links, some strange StackOverflow limitation
According to phpurple requirements:
Please let me know, if you've successfully compiled on
earlier versions. Actually the extension is being developed
on the php v5.2.6 with the option to be upcomming php v5.3
compatible.
The authors will need to update their source. However, since you have the source you could update it yourself because you noted that the project is CLOSED. You could also fork the code and create your own gitHub project with php 5.3 support.
Good luck.
What you are seeing is PHP's shifty interface (ahem, hold your down votes, I said s h i f t y). By that, I mean function prototypes are subject to change from version to version. Take this meta example:
int foo_call_bar(const char *foobar, size_t len);
And in a later version of something, the function calculates the length dynamically, thus eliminating the second variable in the prototype:
int foo_call_bar(const char *foobar);
Some projects strive to always maintain backwards compatibility to alleviate this headache, which could be accomplished with pre-processor directives that prototype the new implementation with the len variable, but just don't do anything with it. If PHP did that, the code base would succumb to even more madness.
Unfortunately, you'll have to modify phpurple to present the correct arguments to the correct PHP functions, and ensure that they are of the appropriate type. That would be a bit of an undertaking, but probably wouldn't be as difficult as it seems.
The Linux kernel's VFS interface is the same way, and I'm often tasked with porting older experimental file systems to work on modern kernels.
look at that man
http://sourceforge.net/news/?group_id=235197&id=296063
A little late, but here is the latest library that works with PHP 5.3:
The new project page is: http://sourceforge.net/projects/phurple
The blog post: http://belski.net/archives/23-Phurple-per-se-PHPurple.html
I have ran into a problem after I have complied it and added the extension to PHP.ini configuration:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/phurple.so' - /usr/lib/php/modules/phurple.so: undefined symbol: ZVAL_ADDREF in Unknown on line 0
To fix this, change the line containing ZVAL_ADDREF in client.c from
ZVAL_ADDREF(PHURPLE_G(phurple_client_obj));
to
Z_ADDREF_P(PHURPLE_G(phurple_client_obj));
Well, the new URL seems to be a persistent repo with fixes to PHP-5.3 and above. Maybe that should be mentioned, but that won't help with checking it out anyway. For me it worked fine, so I would say it is worth a try.
You can check the new sources shortly posted on https://github.com/weltling/phurple

Categories