Odec Geschrieben 2. März 2007 Geschrieben 2. März 2007 Hi, ich hab das Problem das ich die php-java-bridge PHP/Java Bridge nicht auf meinem System zum laufen bringen kann. ich habe ein tiger howto gefunden: 1. libtool vs. glibtool The bridge requires GNU libtool version 1.4.3 or higher, which exists on MacOS 10.4.6 as glibtool. There is ANOTHER utility called libtool on the Mac, which is NOT the right tool. To solve this issue, make glibtool masquerade as libtool: sudo mv /usr/bin/libtool ~/a.safe.tmp.dir sudo ln -s /usr/bin/glibtool /usr/bin/libtool This is TEMPORARY; you will need to undo it when we're done (see below). 2. PHP For some reason, on my machine, I had two versions of PHP installed at once: one in /usr/bin/php (php 4) and another in /usr/local/php5/. The latter is the correct one. If you have both, you need to get rid of php4 and set your PATH variable accordingly. What I did was to move the old php into a harmless directory. Once you've done that, make sure your base PHP install still works, e.g., you can do a PHPINFO(). 3. Extension dir In your php.ini, set your extension_dir variable to a reasonable setting, e.g. /usr/local/php5/lib. You may already have some extensions installed so maybe you're already all set. On my machine, it was set to ./ by default, which doesn't make a lot of sense. 4. Follow the installation instructions from the php-java-bridge Web site, namely, download and extract the tarball, cd to the dir, phpize && ./configure --with-java=$JAVA_HOME && make sudo sh install.sh <enter password> Say No to all options presented by install.sh. (This way you separate the JVM from the Web server as described in the php-java-bridge install docs.) 5. Set up php.ini config. This is my config block for the php-java-bridge: extension=java.so [java] java.log_level="3" java.log_file="/var/log/php-java-bridge.log" 6. Launch the JVM java -Djava.library.path=/usr/local/php5/lib -Djava.class.path=/usr/local/php5/lib/JavaBridge.jar Djava.awt.headless=true -Dphp.java.bridge.base=/usr/local/php5/lib php.java.bridge.JavaBridge & Replace /usr/local/php5/lib with your own extension_dir as set above in Section 3. 7. Hope it worked Copy the test.php file from the tarball directory to a Web accessible directory. Along with the usual PHPINFO() stuff, you will see a block of vars for the java extension, and then a bunch of debugging output at the bottom of the page. You did it! 8. Move libtool back sudo rm -i /usr/bin/libtool sudo mv ~/my.safe.tmp.dir/libtool /usr/bin/libtool jedoch scheitere ich bei punkt 6 folgendermaßen: Exception in thread "main" java.lang.NoClassDefFoundError: Djava/awt/headless=true [1]+ Exit 1 java -Djava.library.path=/usr/local/php5/lib -Djava.class.path=/usr/local/php5/lib/JavaBridge.jar Djava.awt.headless=true -Dphp.java.bridge.base=/usr/local/php5/lib php.java.bridge.JavaBridge ich habe diese Bridge schon häufiger unter Linux-Debian erfolgreich zum laifen bekommen, jedoch scheint auch ohne Punkt 6, die java.so - extension unter Tiger nicht zu funktionieren: PHP Warning: PHP Startup: ??!??|?#xB?: Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=0 PHP compiled with module API=20060613, debug=0, thread-safety=0 These options need to match in Unknown on line 0 Würde mich über Lösungsvorschläge freuen Danke, Odec
Empfohlene Beiträge
Erstelle ein Benutzerkonto oder melde Dich an, um zu kommentieren
Du musst ein Benutzerkonto haben, um einen Kommentar verfassen zu können
Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen. Es ist einfach!
Neues Benutzerkonto erstellenAnmelden
Du hast bereits ein Benutzerkonto? Melde Dich hier an.
Jetzt anmelden