[GastForen Programmierung/Entwicklung PHP und MySQL osx Server PHP Version localhost VS. Network

  • Suche
  • Hilfe
  • Lesezeichen
  • Benutzerliste
Themen
Beiträge
Moderatoren
Letzter Beitrag

osx Server PHP Version localhost VS. Network

bjoern
Beiträge gesamt: 113

9. Feb 2018, 21:24
Beitrag # 1 von 2
Bewertung:
(20790 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Ahoi werte Fachgemeinschaft,
versuche hier mit trial and error eine NextCloud Installation auf meinem macMini Server (10.11.6, Server 5.2 über MAMP) zum laufen zu bekommen. Unter Lokalhost läuft das auch alles super, aber sobald ich übers Netzwerk extern drauf gehe, heisst es, dass die PHP Version nicht passt.

Zitat This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.5.38. Please update your PHP version.


Habe PHP 7.2.1 installiert, das funktioniert über localhost (MAMP), übers Netzwerk zieht er aber anscheinend PHP von der OSX server software und die Version ist zu alt (möchte ungern meinen Server jetzt komplett anpacken und das System updaten nur wegen einer PHP Spielerei).

phpifo gibt das aus

netzwerk
https://image.prntscr.com/...8lRjCZ5eY0iPlyqw.png

localhost
https://image.prntscr.com/...0mQgG9Jde999Ibag.png


ich habe jetzt schon einige Versuche und Sonnenaufgänge durch und komme nicht weiter, hat jemand einen Geistesblitz, was zu tun ist?

vielen Dank und beste Grüße
X

osx Server PHP Version localhost VS. Network

bjoern
Beiträge gesamt: 113

11. Feb 2018, 12:23
Beitrag # 2 von 2
Beitrag ID: #562362
Bewertung:
(20752 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Habs gefunden und hinbekommen, das war die Lösung (unter https://github.com/liip/php-osx/issues/229)

Zitat as I wanted to upgrade to php7.1 and it seemed impossible…

Here’s the solution for my pb:

- deactivate your php in the server app (Web Sharing)
- install php 71 with curl
curl -s https://php-osx.liip.ch/install.sh <https://php-osx.liip.ch/install.sh> | bash -s 7.1
which install php71 in /local/

- mod the .conf file used by Apache server of macOs Server which is not the same apache server as macOs (non-server)
sudo nano /Library/Server/Web/Config/apache2/httpd_server_app.conf

look for php5_module with Ctrl+W
and it comment (add a # at the beginning)
#LoadModule php5_module libexec/apache2/libphp5.so

- add the line
LoadModule php7_module /usr/local/php5-7.1.4-20170506-100436/libphp7.so
under the one u just commented

WARNING: the path above, /usr/local/php5-7.1.4-20170506-100436/libphp7.so , should be corrected depending on your installation, the version of the php installed, etc…

- add the handler for php7, after the block http start with iFModule php5_module
<IfModule php7_module>
AddType application/x-httpd-php .php
<FilesMatch .php$>
SetHandler application/x-httpd-php
</FilesMatch>
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
</IfModule>

- save with Ctrl+O, close with Ctrl+X, reboot the whole machine (rebooting the apache server may not be enough)
- in the Web Sharing part of the server app, DON’T activate php (as it un-comments the php5 module)
- check your phpinfo (and don’t use the php -v in the terminal, it doesn’t always give the right answer)

It’s the same for the php.ini, it’s not the one you think that’s gonna be used. Check which one in phpinfo.

It’s not an answer to your pb but I hope it helps.



als Antwort auf: [#562355]