Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contao Manager auf XAMPP findet PHP-Binary nicht #286

Closed
standing-bear opened this issue Jun 14, 2018 · 11 comments
Closed

Contao Manager auf XAMPP findet PHP-Binary nicht #286

standing-bear opened this issue Jun 14, 2018 · 11 comments

Comments

@standing-bear
Copy link

Bei der Serverkonfiguration des CM lässt sich ja mittlerweile XAMPP einstellen. Wenn ich das mache, bekomme ich die Meldung: "Es wurde kein valides PHP Programm auf dem Server gefunden."

Ich habe es dann mit "Individuelle Konfiguration" versucht und als PHP-Binary "c:/xampp/php/php.exe" eingetragen ... auch in allen erdenklichen Schreibweisen, z. B. mit Backslash, ohne php.exe nur mit dem Pfad etc. pp. ... nimmt der Manager aber leider auch alles nicht. Wie kann ich den CM hier überzeugen?

@xchs
Copy link
Contributor

xchs commented Jun 14, 2018

Steht der Pfad zur Executable (C:\xampp\php) auch in der PATH Umgebungsvariable?

@fkaminski
Copy link

fkaminski commented Jun 14, 2018

Hi,
bei einer xampp Standard Installation hat das bei mir anstandslos funktioniert u. der Manager gibt aus:

Konfiguriert als XAMPP (Windows), PHP-Binary in C:\xampp721\php\php.EXE.

Auf einem anderen Rechner hatte der CM zwar die PHP Version erkannt aber die Serverkonfiguration bemängelt. Hier hatte ich allerdings falsche Pfadangaben über die SetEnv Direktiven in der httpd-xampp.conf übersehen. Check mal die phpinfo Ausgaben über das xampp Dashboard.

Und ja - der Pfad muß in der Umgebungsvariablen stehen - wird normalerweise über die setup_xampp.bat gesetzt ...

@standing-bear
Copy link
Author

Mein XAMPP Control Panel sagt mir:

13:15:40  [Apache] 	Versuche Apache Windows Dienst zu starten...
13:15:41  [Apache] 	Statusänderung erkannt: gestartet
15:41:34  [main] 	Führe aus: "c:\xampp\php"

httpd-xampp.conf liefert:

#
# XAMPP settings
#

<IfModule env_module>
    SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
    SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
    SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
    SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
    SetEnv PHPRC "\\xampp\\php"
    SetEnv TMP "\\xampp\\tmp"
</IfModule>

#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php7ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

#
# PHP-CGI setup
#
#<FilesMatch "\.php$">
#    SetHandler application/x-httpd-php-cgi
#</FilesMatch>
#<IfModule actions_module>
#    Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
#</IfModule>


<IfModule php7_module>
    PHPINIDir "C:/xampp/php"
</IfModule>

<IfModule mime_module>
    AddType text/html .php .phps
</IfModule>

ScriptAlias /php-cgi/ "C:/xampp/php/"
<Directory "C:/xampp/php">
    AllowOverride None
    Options None
    Require all denied
    <Files "php-cgi.exe">
          Require all granted
    </Files>
</Directory>

<Directory "C:/xampp/cgi-bin">
    <FilesMatch "\.php$">
        SetHandler cgi-script
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler None
    </FilesMatch>
</Directory>

<Directory "C:/xampp/htdocs/xampp">
    <IfModule php7_module>
    	<Files "status.php">
    		php_admin_flag safe_mode off
    	</Files>
    </IfModule>
    AllowOverride AuthConfig
</Directory>

<IfModule alias_module>
    Alias /licenses "C:/xampp/licenses/"
    <Directory "C:/xampp/licenses">
        Options +Indexes
        <IfModule autoindex_color_module>
            DirectoryIndexTextColor  "#000000"
            DirectoryIndexBGColor "#f8e8a0"
            DirectoryIndexLinkColor "#bb3902"
            DirectoryIndexVLinkColor "#bb3902"
            DirectoryIndexALinkColor "#bb3902"
        </IfModule>
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
   </Directory>

    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
    <Directory "C:/xampp/phpMyAdmin">
        AllowOverride AuthConfig
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>

    Alias /webalizer "C:/xampp/webalizer/"
    <Directory "C:/xampp/webalizer">
        <IfModule php7_module>
    		<Files "webalizer.php">
    			php_admin_flag safe_mode off
    		</Files>
        </IfModule>
        AllowOverride AuthConfig
        Require local
        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </Directory>
</IfModule>

und phpinfo liefert:

Path | ... ;C:\xampp\php; ...

@standing-bear
Copy link
Author

Der Manager wird über eine Subdomain von localhost aufgerufen, da das web directory von Contao ja root sein muss.

http://cto4cm.local/contao-manager.phar.php

@standing-bear
Copy link
Author

Niemand mehr eine Idee?
Mein CM lässt sich leider absolut nicht überzeugen.

@aschempp
Copy link
Member

Versuch mal selber ein PHP-Script anzulegen welches per proc_open (oder einfach exec) etwas mit der php.exe macht.

@standing-bear
Copy link
Author

Dann bekomme ich die Fehlermeldung:
Warning: Module 'openssl' already loaded in Unknown on line 0

@aschempp
Copy link
Member

Sieht nach einer Fehlkonfiguration deines Servers aus.

@standing-bear
Copy link
Author

Habe extension=php_openssl.dll in der php.ini jetzt auskommentiert. Jetzt funktioniert alles.
Super, Danke ;-)

@fkaminski
Copy link

Oh, war zu spät ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants