Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

open source php-java-bridge unter Mac OSX 10.4.8 (Tiger) funktional kompilieren

Empfohlene Antworten

Veröffentlicht

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

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.