HowTo install PHP5

  • Thread starter Thread starter server4downs
  • Start date Start date
Status
Not open for further replies.
Dann werd ich mich nacher mal ranwagen ans Update :)

Falls das nicht klappen sollte, kann ich doch einfach in der Apache2 Datei doch einfach statt "LoadModule php5_module modules/libphp5.so" wieder in "LoadModule php4_module modules/libphp4.so " ändern und dann müsste das System wieder mit PHP4 laufen?
 
mh.
hab mich grad mal drangewagt zu updaten

1. Problem. gcc nicht Installiert. Habe das aber hinbekommen :)
2. Problem: "configure: error: installation or configuration problem: C compiler cannot create executables."
PHP:
./configure --prefix=/usr --with-apxs2=/usr/bin/apxs2 --with-config-file-path=/etc/php4/apache2 --enable-memory-limit --disable-debug --with-regex=php --disable-rpath --disable-static --with-pic --with-layout=GNU --with-pear=/usr/share/php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-bcmath --with-bz2 --enable-ctype --with-db4 --with-iconv --enable-exif --enable-filepro --enable-ftp --with-gettext --enable-mbstring --with-pcre-regex=/usr --enable-shmop --enable-sockets --enable-wddx --disable-xml --with-expat-dir=/usr --with-xmlrpc --enable-yp --with-zlib --without-pgsql --with-kerberos=/usr --with-openssl=/usr --with-zip=/usr --enable-dbx --with-exec-dir=/usr/lib/php5/libexec --without-mm --without-mysql --without-sybase-ct
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

Jemand ne Idee?
 
Zeigt mir mein Debian an, wo ich gucken muss, warum der GCC nicht funktioniert. Oder muss ich GCC noch konfigurieren oder was einstellen?!

schwieriger als ich dachte ... *pfff*

Linux wird eines Tages nochmal schuld an meinen grauen Haaren bekommen ;)

*edit*
ok hab nun apt-get install build essentials (oder so) eingebene. nun kommen noch mehr meldungen?! - ich such weiter ^^


*edit2*
hehe ^^ - so langsam wirds aber was: "Sorry, I cannot run apxs. Possible reasons follow:..."

*edit3*
Endlich fast Fertig. Nur noch in die Config Files eintragen....

Jungs. Währt ihr hier. würd ich euch jetz auch nen Bier anbieten :)
PROST :)


edit4
Wann bekommt PLESK das denn mit, das ich geupdatet habe? Der Zeigt mir in der Übersicht immer noch PHP4 an. In der PHPINFO steht aber php5.1.4 :)
mh. Aber mein eigenes Script läuft bisher nciht. mal gucken. liegt bestimmt an dem MySQL krams...verdammter ^^ - auf ein Neues ;)

edit5
Gut. MySQL hab ich wieder mit einkompiliert. Rechner mal neugestartet und dann wollte der blöde MySQL Dienst nichtmehr :( Rechner wieder neuinstallieren lassen und gut ist.
hör nun auf damit rumzuspielen und lass mal die leute von S4U auf PHP5 updaten :(
 
Last edited by a moderator:
man kann ja in PHP die einzelnen Module modular compilieren.
Weiß jemand dahingehend wo ich die compier option von Debian vielleicht finde?
(Die haben es eben in Komponenten zerlegt (Module))
 
PHP5 auf Strato V-Server

Hallo,

ich will meinen Strato V-Server von PHP4 auf PHP5 Updaten. Mein Configure:

./configure --program-prefix= --prefix=/usr/local/php5 --with-gd --with-zlib --datadir=/usr/share/php5 --mandir=/usr/share/man/php5 --bindir=/usr/local/php5/bin --exec-prefix=/usr/local/php5 --includedir=/usr/include/php5 --sysconfdir=/etc/php5 --localstatedir=/var --with-config-file-path=/etc/php5 --with-exec-dir=/usr/lib/php5/bin --disable-debug --enable-inline-optimization --enable-memory-limit --enable-magic-quotes --enable-safe-mode --enable-sigchild --enable-session --with-mysql=/usr --enable-cli --with-pear=/usr/share/pear --enable-calendar --with-openssl --without-pgsql --with-config-file=/etc/php5/php.ini --with-apxs2=/usr/sbin/apxs2-prefork

Die Meldnung nach "make install":

Code:
~/Server/php-5.1.2 # make install
Installing PHP SAPI module:       apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apache2/build/libtool' libphp5.la /usr/lib/apache2-prefork
/usr/share/apache2/build/libtool --mode=install cp libphp5.la /usr/lib/apache2-prefork/
cp .libs/libphp5.so /usr/lib/apache2-prefork/libphp5.so
cp .libs/libphp5.lai /usr/lib/apache2-prefork/libphp5.la
libtool: install: warning: remember to run `libtool --finish /root/Server/php-5.1.2/libs'
chmod 755 /usr/lib/apache2-prefork/libphp5.so
apxs:Error: Config file /etc/apache2/httpd2-prefork.conf not found.
make: *** [install-sapi] Error 1
Diese Datei gibt es auf meinem Server auch nicht:

Code:
/ # find / -name '*prefork*'
/usr/include/apache2-prefork
/usr/lib/apache2-prefork
/usr/sbin/httpd2-prefork
/usr/sbin/apxs2-prefork
/usr/share/doc/packages/apache2/httpd-std.conf-prefork
/usr/share/apache2/build/apr-config-prefork
/usr/share/apache2/build/apu-config-prefork
/usr/share/apache2/build/config_vars.mk-prefork
/usr/share/apache2/manual/mod/prefork.xml.de
/usr/share/apache2/manual/mod/prefork.xml
/usr/share/apache2/manual/mod/prefork.html
/usr/share/apache2/manual/mod/prefork.html.de
/usr/share/apache2/manual/mod/prefork.html.en
/usr/share/apache2/manual/mod/prefork.html.es
/usr/share/apache2/manual/mod/prefork.html.ja.euc-jp
/usr/share/apache2/manual/mod/prefork.xml.meta
/usr/share/apache2/manual/mod/prefork.xml.es
/usr/share/apache2/manual/mod/prefork.xml.ja

Hat jemand ne Ahnung?
 
Ist ne Eigenart von Suse. Nur daß hier im apxs etwas geschlampert wurde.
Mach vorher noch:
Code:
cp /etc/apache2/sysconfig.d/loadmodule.conf /etc/apache2/httpd2-prefork.conf

huschi.
 
Hallo,

hab nach langem suchen nun hier endlich das erste verständliche Tutorial für PHP5 gefunden. Leider funktioniert das ganze bei mir irgendwie nicht wirklich.
Am Ende des configure kommt immer diese Fehlermeldung:
Code:
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

So wie ich das sehe, fehlen ja Cygwin, mingw32, gcc und cc, oder?
Kann mir bitte jemand sagen wo ich die 4 Sachen herbekomme, weil ich steh langsam echt aufm Schlauch und find auf dem ganzen Suse-Teil keinen einzigen Hinweis dazu. Sorry, wenn die Frage blöd ist.

Wäre nett wenn mir jemand helfen könnte.
Vielen Dank,
Roman
 
Code:
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
Es wurde scheinbar kein Compiler gefunden.
 
hm, komisch. Ich dachte immer, da wär mindestens einer immer dabei.
Kann man denn einfach irgendwie nachinstallieren und wenn ja welchen?

EDIT: So Compiler funzt, jetzt bin ich aber beim nächsten Fehler den ich nicht wirklich verstehe:

./configure: line 6335: /usr/sbin/apxs2-prefork: No such file or directory
configure: error: Aborting

In Meiner PHP-Info-Datei steht aber genau das drin und ich habs nur übernommen: http://web0.38234.vs.webtropia.com/phpinfo.php
 
Last edited by a moderator:
Ich glaub irgendwie hat der ganze Server ne Macke obwohl es ne komplette Neuinstallation von webtropia ist.
apsx2 gibts erstmal gar nicht auf der Kiste und wenn man es so durchlaufen lässt, meckert er weil er die xml2 config nicht findet, obwohl das Teil installiert ist. Hab das auch schonmal neu installiert aber ohne Erfolg.
 
Wenn apxs2 fehlt, dann einfach mal apache2-dev(el) installieren.
Dann per
whereis apxs2
den Pfad auschecken.
Hast du auch die devel-Pakete für libxml2 installiert?
 
Hallo,

also mit den Devils hat alles wunderbar geklappt. Ist alles durchgelaufen bei der PHP Installation.

Allerdings traten dann die nächsten Probleme bei der Apache start und stop Aktion.
Code:
38234:~ # /etc/init.d/apache2 stop
: command not foundhe2: line 3:
: command not foundhe2: line 12:
: command not foundhe2: line 25:
: command not foundhe2: line 41:
: command not foundhe2: line 58:
: command not foundhe2: line 70:
: command not foundhe2: line 86:
: command not foundhe2: line 136:
: command not foundhe2: line 156:
: command not foundhe2: line 166:
: command not foundhe2: line 175:
: command not foundhe2: line 183:
: command not foundhe2: line 213:
: command not foundhe2: line 225:
: command not foundhe2: line 235:
: command not foundhe2: line 245:
: command not foundhe2: line 253:
Shutting down httpd2 (waiting for all children to terminate)         done
38234:~ # /etc/init.d/apache2/apache2 start
-bash: /etc/init.d/apache2/apache2: Not a directory
38234:~ # /etc/init.d/apache2 start
: command not foundhe2: line 3:
: command not foundhe2: line 12:
: command not foundhe2: line 25:
: command not foundhe2: line 41:
: command not foundhe2: line 58:
: command not foundhe2: line 70:
: command not foundhe2: line 86:
: command not foundhe2: line 136:
: command not foundhe2: line 156:
: command not foundhe2: line 166:
: command not foundhe2: line 175:
: command not foundhe2: line 183:
: command not foundhe2: line 213:
: command not foundhe2: line 225:
: command not foundhe2: line 235:
: command not foundhe2: line 245:
: command not foundhe2: line 253:
Warning: no MPM found. Some modules are dependant on the type of MPM.
Warning: no MPM found. Some modules are dependant on the type of MPM.
 from APACHE_CONF_INCLUDE_FILES not found. Ignored.
) httpd2-prefork: could not open document config file /srv/www/\r

The command line was:
 -Dr/sbin/httpd2-prefork -f
                                                                     failed

Ich hab auch schon die Änderung mit dem php4 in PHP5 ändern rausgenommen, aber der Fehler tritt immer wieder auf.
Der Server selbst ist mit allem noch erreichbar, nur der Apache halt nicht mehr.

Hoffe mir kann irgendwer helfen:confused:

Gruß,
Roman
 
[M]eos said:
: command not foundhe2: line 3:
Boardsuche:

huschi.
 
Hm, den Fehler mit dem foundhe hab ich nun behoben, bleibt noch einer übrig, mit dem ich gar nicht klarkomme und zu dem ich auch nirgendwo nen Lösungsvorschlag trotz benutzen der Suche finde:
Code:
38234:~ # /etc/init.d/apache2 configtest
Warning: no MPM found. Some modules are dependant on the type of MPM.
Warning: no MPM found. Some modules are dependant on the type of MPM.
 from APACHE_CONF_INCLUDE_FILES not found. Ignored.
httpd2-prefork: could not open document config file /srv/www/\r

Hoffe mir kann einer helfen, auch wenn ich langsam wahrscheinlich nerve:o

Danke,
Roman
 
Code:
## Path:	Network/WWW/Apache2
## Description:	Configuration for Apache 2
## Type:	string
## Default:	""
## ServiceRestart: apache2
#
# Which config file do you want to use?
# (if not set, /etc/apache2/httpd.conf is used.)
#
APACHE_HTTPD_CONF=""
## Type:	list(prefork,worker,leader,metuxmpm)
## Default:	""
## Command:	/usr/sbin/apache2-reconfigure-mpm
#
# MPM (multi-processing module) to use.
#
# Needed to determine with which MPM apache will run, as well as
# against which header files modules will be built. 
#
# If not set, the system will simply pick one of the installed MPMs.
#
APACHE_MPM=""
## Type:	string
## Default:	""
## ServiceReload: apache2
#
# email address of the server administrator (ServerAdmin directive)
# This address is added to the server's responses if APACHE_SERVERSIGNATURE 
# is set to "email". 
#
# If empty ("") it defaults to webmaster@$FQHOSTNAME, where FQHOSTNAME is
# taken from /etc/HOSTNAME. 
#
# Note that ServerAdmin directives inside VirtualHost statements are not
# changed, even not the one in the stock SSL virtual host block. 
#
APACHE_SERVERADMIN=""
## Type:	string
## Default:	""
## ServiceReload: apache2
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make 
# redirections work in a sensible way.
#
APACHE_SERVERNAME=""
## Type:	string
## Default:	""
## ServiceRestart: apache2
#
# Here you can name files, separated by spaces, that should be Include'd from 
# httpd.conf. 
#
# This allows you to add e.g. VirtualHost statements without touching 
# /etc/httpd/httpd.conf itself, which makes upgrading easier. 
#
APACHE_CONF_INCLUDE_FILES=""
## Type:	string
## Default:	""
## ServiceRestart: apache2
#
# Here you can name directories, separated by spaces, that should be Include'd 
# from httpd.conf. 
#
# All files contained in these directories will be recursively included by apache.
# If a pattern like *.conf is appended, apache will use it.
#
# Examples: "/etc/apache2/my_conf/"
#           "/etc/apache2/virtual_hosts/*.conf"
#           "local/*.conf /srv/www/virtual/"
#
APACHE_CONF_INCLUDE_DIRS=""
## Type:	string
## Default:	"access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php4"
## ServiceRestart: apache2
#
# [It might look silly to not simply edit httpd.conf for the LoadModule statements.
# However, since the LoadModule statements might need an absolute path to the modules,
# switching between MPMs can be quite a hassle. It's easier to just give the names here.]
#
# * list of all modules shipped with the base distribution: 
#
#    access actions alias asis auth auth_anon auth_dbm auth_digest auth_ldap
#    autoindex cache case_filter case_filter_in cern_meta cgi charset_lite
#    dav dav_fs deflate dir disk_cache echo env expires ext_filter file_cache
#    headers imap include info ldap log_config log_forensic logio mem_cache
#    mime mime_magic negotiation proxy proxy_connect proxy_ftp proxy_http
#    rewrite setenvif speling ssl status suexec unique_id userdir usertrack
#    vhost_alias 
#
#   see http://httpd.apache.org/docs-2.0/mod/ !
#
# * It pays to use IfDefine statements... like
#    <IfModule mod_xyz.c>
#        ....
#    </IfModule>
#
# * In the APACHE_MODULES variable, you can use mod_xyz or just xyz syntax.
#   You may also name an absolute path if you like.
#
# * NOTE ON MOD_SSL: before you can enable this module, you need a server certificate. 
#   A test certificate can be created by entering 
#   'cd /usr/share/doc/packages/apache2; ./certificate.sh' as root.
#   Also, you need to set the ServerName inside the <VirtualHost _default_:443> 
#   block to the fully qualified domain name (see /etc/HOSTNAME).
#
# * if your server certificate is protected by a passphrase you should increase the
#   APACHE_START_TIMEOUT (see above)
#
# * modules listed here will be ignored if they are not installed
#
#
# EXAMPLES:
#
# fairly minimal
# APACHE_MODULES="access alias auth dir log_config mime setenvif"
#
# apache's default installation
# APACHE_MODULES="access actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir"
# your settings
APACHE_MODULES="mod_perl access actions alias auth auth_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5 /usr/lib/apache2-prefork/libphp5.so /usr/lib/apache2-prefork/mod_frontpage.so rewrite"
## Type:	string
## Default:	""
## ServiceRestart: apache2
#
# Additional server flags:
#
# Put here any server flags ("Defines") that you want to hand over to 
# httpd at start time, or other command line flags.
#
# Background: Any directives within an <IfDefine flag>...</IfDefine>
#             section are only processed if the flag is defined.
#
# This could be -D SSL, for example. Or -DSTATUS.
# (it does not matter whether you "-D flag1 -D flag2" or simply "flag1 flag2")
#
# Specifying such flags here is equivalent to giving them on the commandline.
# (e.g. rcapache2 start -DReverseProxy)
#
APACHE_SERVER_FLAGS=""
## Type:	integer
## Default:	2
#
# timeout during server startup (seconds)
# after this time, the start script decides wether the httpd process started without error.
#
# Increase it, if you use mod_ssl and your certificate is passphrase protected!
#
APACHE_START_TIMEOUT="2"
## Type:	list(on,off,email)
## Default:	"on"
## ServiceReload: apache2
#
# Configures the footer on server-generated documents 
# This correlates to the ServerSignature directive. 
#
APACHE_SERVERSIGNATURE="on"
## Type:	list(debug,info,notice,warn,error,crit,alert,emerg)
## Default:	"warn"
## ServiceReload: apache2
#
# LogLevel: Control the number of messages logged to the error_log.
#
APACHE_LOGLEVEL="warn"
## Type:	string
## Default:	"/var/log/apache2/access_log combined"
## ServiceRestart: apache2
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrarywise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
# Simply set it to empty, if you configure it yourself somewhere else.
# 
# Examples:
#
# If you would like to have agent and referer logfiles:
#
# setting it to "/var/log/apache2/referer_log referer, /var/log/apache2/agent_log agent"
#   corresponds to 
# CustomLog /var/log/apache2/referer_log referer
# CustomLog /var/log/apache2/agent_log   agent
#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format):
#
# setting it to "/var/log/apache2/access_log combined"
#   corresponds to 
# CustomLog /var/log/apache2/access_log combined
#
APACHE_ACCESS_LOG="/var/log/apache2/access_log combined"
## Type:	list(On,Off,DNS)
## Default:	"Off"
## ServiceReload: apache2
#
# UseCanonicalName: Determines how Apache constructs self-referencing 
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
APACHE_USE_CANONICAL_NAME="off"
## Type:	list(Major,Minor,Minimal,ProductOnly,OS,Full)
## Default:	"OS"
## ServiceReload: apache2
#
# How much information the server response header field contains about the server.
# (installed modules, versions, etc.)
# see http://httpd.apache.org/docs-2.0/mod/core.html#servertokens
#
APACHE_SERVERTOKENS="OS"
## Type:	list(on,off)
## Default:	"off"
## ServiceReload: apache2
#
# If mod_status is used, include extended information about the server, like 
# CPU usage, in the status report. It is a server-wide setting, and it can cost
# some performance!
#
APACHE_EXTENDED_STATUS="off"
## Type:	list(on,off)
## Default:	"off"
## ServiceRestart: apache2
#
# Enable buffered logging
#
APACHE_BUFFERED_LOGS="off"
## Type:	integer
## Default:	300
## ServiceReload: apache2
#
# Timeout: The number of seconds before receives and sends time out.
# It is a server wide setting.
#
APACHE_TIMEOUT="300"

Danke für eure Hilfe:-)
 
Status
Not open for further replies.
Back
Top