Autor |
Sõnum |
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Palun aidake võhikut...
Nimelt olen lisamas nimipõhiseid virtuaalhoste apachesse.
Lõin konfiguratsiooni faili /etc/apache2/sites-available/example.com <- see on lihtsalt näide.
Sellise konfiguratisooniga:
Tsitaat: | # Ensure that Apache listens on port 80
Listen 80
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /www/example1
ServerName www.example1.com
# Other directives here
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /www/example2
ServerName www.example2.org
# Other directives here
</VirtualHost> |
Directory ja server name on dummy.
Peale site enablemist saan veateate, et port on jubas kasutusel...
|
|
|
|
|
|
|
|
sander85
Vana Pingviin
Vanus: 39
Liitunud: 08.08.2005
Postitused: 4359
Asukoht: Tallinn (vahel ka Virtsu)
Distributsioon: Mageia, Debian, CentOS
|
|
Järelikult on sul kuskil apache confis juba see listen 80 olemas.
grep -rni listen /etc/apache2
|
|
|
|
_________________
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
ports.conf-is on küll määratletud jah, default listen port 80, kas see tuleks välja kommentida?
Üldiselt kas see conf on õige ja kas ma võin neid virtuaalhoste samal kujul sinna lõpmatuseni luua? Konflikte tekkida ei tohiks kui virtuaalhost jookseb sama pordi pealt? Name based virtuaalhost nimelt.
|
|
|
|
|
|
|
|
sander85
Vana Pingviin
Vanus: 39
Liitunud: 08.08.2005
Postitused: 4359
Asukoht: Tallinn (vahel ka Virtsu)
Distributsioon: Mageia, Debian, CentOS
|
|
Pigem tuleks see listen välja võtta vhosti konfist. Sama moodi võib "NameVirtualHost *:80" esineda ainult korra kogu konfi peale kokku. Mina lisaks iga hosti eraldi faili, see võimaldab a2ensite/a2dissite kasutamise, kui vaja ajutiselt mingi host lubada/keelata..
|
|
|
|
_________________
|
|
|
|
obundra
Vana Pingviin
Vanus: 50
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
|
|
Konf on põhimõtteliselt õige(paistab olema Apache manualist) ja ilmselt mahub neid virtuaale sinna ka piisavalt.Vaata konfid läbi, paistab jah, et 80 on topelt defineeritud.Kui seal ennem jooksis ka mingi "main host", millele virtuaale lisad, siis pead selle ka virtuaaliks konfima, muidu ei pääse sellele enam ligi.Enne käivitamist saad konfi kontrollida käsuga apachectl -t ja virtuaalide kohta näitab infot apachectl -S.
|
|
|
|
_________________ IT teenused
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Ok, tänud nõuannete eest, õhtul proovin järgi ja postitan tulemused.
Üks probleem viis teiseni, nüüd tundub, et proftpd on katki...
Tsitaat: | $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
autoconf automake avahi-daemon bash bind9-host cpio cpp cpp-4.3 cron dhcp3-client dhcp3-common diff dpkg e2fsprogs ed findutils gcc
gcc-4.3 gcc-4.3-base ghostscript gnupg grep info iptables libbind9-50 libbluetooth-dev libdevmapper1.02.1 libdns58 libedit2 libgdbm3
libgs8 libisc50 libisccc50 libisccfg50 liblwres50 libsdl1.2debian libsdl1.2debian-alsa libts-0.0-0 libx11-6 libx11-dev libxcb1
libxcb1-dev libxi6 m4 mysql-client mysql-client-5.0 mysql-server mysql-server-5.0 nano openssh-client openssh-server openttd php5-dev
phpmyadmin readline-common screen sed sysv-rc udev unixodbc update-inetd util-linux util-linux-locales wget
The following packages will be upgraded:
proftpd-basic
1 upgraded, 0 newly installed, 0 to remove and 64 not upgraded.
5 not fully installed or removed.
Need to get 0 B/2404 kB of archives.
After this operation, 2109 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
(Reading database ... 28545 files and directories currently installed.)
Preparing to replace proftpd-basic 1.3.1-17lenny4 (using .../proftpd-basic_1.3.3a-6squeeze1_amd64.deb) ...
invoke-rc.d: unknown initscript, /etc/init.d/proftpd not found.
dpkg: warning - old pre-removal script returned error exit status 100
dpkg - trying script from the new package instead ...
invoke-rc.d: unknown initscript, /etc/init.d/proftpd not found.
dpkg: error processing /var/cache/apt/archives/proftpd-basic_1.3.3a-6squeeze1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 100
configured to not write apport reports
Errors were encountered while processing:
/var/cache/apt/archives/proftpd-basic_1.3.3a-6squeeze1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
|
proftpd tundub kadunud olevat init.d-st.
|
|
|
|
Viimati muutis svenx 14.11.2011, 22:52; muudetud 1 kord
|
|
|
|
sander85
Vana Pingviin
Vanus: 39
Liitunud: 08.08.2005
Postitused: 4359
Asukoht: Tallinn (vahel ka Virtsu)
Distributsioon: Mageia, Debian, CentOS
|
|
Sul on seal lenny ja squeeze segamini. Et kumb sul siis tegelikult kasutusel on? Mida "dpkg -l |grep proftp" näitab?
|
|
|
|
_________________
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Tsitaat: | ii proftpd-basic 1.3.1-17lenny4 versatile, virtual-hosting FTP daemon - bina |
|
|
|
|
|
|
|
|
sander85
Vana Pingviin
Vanus: 39
Liitunud: 08.08.2005
Postitused: 4359
Asukoht: Tallinn (vahel ka Virtsu)
Distributsioon: Mageia, Debian, CentOS
|
|
aptitude purge proftpd-basic
Pärast seda proovi uuesti paigaldada..
|
|
|
|
_________________
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Tulemus siis selline:
Tsitaat: | $ sudo aptitude purge proftpd-basic
The following packages will be REMOVED:
proftpd-basic{p}
0 packages upgraded, 0 newly installed, 1 to remove and 64 not upgraded.
Need to get 0 B of archives. After unpacking 1843 kB will be freed.
Do you want to continue? [Y/n/?] Y
(Reading database ... 28545 files and directories currently installed.)
Removing proftpd-basic ...
invoke-rc.d: unknown initscript, /etc/init.d/proftpd not found.
dpkg: error processing proftpd-basic (--purge):
subprocess pre-removal script returned error exit status 100
configured to not write apport reports
Errors were encountered while processing:
proftpd-basic
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover: |
|
|
|
|
|
|
|
|
sander85
Vana Pingviin
Vanus: 39
Liitunud: 08.08.2005
Postitused: 4359
Asukoht: Tallinn (vahel ka Virtsu)
Distributsioon: Mageia, Debian, CentOS
|
|
Ava fail /var/lib/dpkg/info/proftpd-basic.prerm ja kirjuta sinna peale bin/sh rida
exit 0
Pärast seda proovi uuesti
aptitude purge proftpd-basic
Muudetud: hmm, sul peaks paigaldatud olema ka proftpd, miks seda basicut sinna taha ise surud?
aptitude install proftpd
|
|
|
|
_________________
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Sai eile kella kaheni üleval istutud ja sain selle korda sellise käsuga:
Kood: | sudo dpkg --remove --force-remove-reinstreq proftpd |
Tundub, et teenusepakkuja on kuidagi dist-upgrade teinud, varem oli see lenny, ilmselt sellest ka need probleemid.
Nüüd on probleem php-ga. Ei saa pdo-d installida.
Edit: Kuna Drupal vajab php PDO-d, siis PECL-ist installides annab sellise tulemust.
Tsitaat: | $ sudo apt-get install php5-dev php-pear make libmysqlclient15-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqlclient15-dev is already the newest version.
make is already the newest version.
php-pear is already the newest version.
php5-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo pecl install pdo
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
building in /var/tmp/pear-build-root/PDO-1.0.3
running: /tmp/pear/temp/PDO/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable PDO support... yes, shared
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool --mode=compile cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo.c -o pdo.lo
libtool: compile: cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo.c -fPIC -DPIC -o .libs/pdo.o
/bin/sh /var/tmp/pear-build-root/PDO-1.0.3/libtool --mode=compile cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo_dbh.c -o pdo_dbh.lo
libtool: compile: cc -I. -I/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/var/tmp/pear-build-root/PDO-1.0.3/include -I/var/tmp/pear-build-root/PDO-1.0.3/main -I/tmp/pear/temp/PDO -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/PDO/pdo_dbh.c -fPIC -DPIC -o .libs/pdo_dbh.o
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_stmt_instantiate':
/tmp/pear/temp/PDO/pdo_dbh.c:410: error: 'zval' has no member named 'refcount'
/tmp/pear/temp/PDO/pdo_dbh.c:411: error: 'zval' has no member named 'is_ref'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_stmt_construct':
/tmp/pear/temp/PDO/pdo_dbh.c:435: error: 'zend_fcall_info' has no member named 'object_pp'
/tmp/pear/temp/PDO/pdo_dbh.c:458: error: 'zend_fcall_info_cache' has no member named 'object_pp'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'zim_PDO_setAttribute':
/tmp/pear/temp/PDO/pdo_dbh.c:752: error: 'zval' has no member named 'refcount'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'zim_PDO_getAttribute':
/tmp/pear/temp/PDO/pdo_dbh.c:818: error: 'zval' has no member named 'refcount'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_hash_methods':
/tmp/pear/temp/PDO/pdo_dbh.c:1122: warning: assignment discards qualifiers from pointer target type
/tmp/pear/temp/PDO/pdo_dbh.c:1126: warning: assignment discards qualifiers from pointer target type
make: *** [pdo_dbh.lo] Error 1
ERROR: `make' failed
|
Edit2:
Googleldades leidsin Ubuntu foorumitest midagi sellist....
Tsitaat: | Ok I've found the solution to our problems. The biggest issue here is that PDO is no longer supported in PECL and has been moved to CORE.
On that note all the PDO drivers for the respected databases have been moved into the main php5 database packages. So when you install php5-sqlite it not only installs the basic driver it also installs the pdo driver at the same time.
Now if you are getting this error that means that you already attempted to install the outdated pecl version. Doing that seems to corrupt your php installation and now even if you install the right package it still wont work.
To fix this you must PURGE not remove all the installed packages that start with php5 including php itself.
Once all these packages are purged reinstall the ones you deleted.
Finally install the correct php5 database package, so for sqlite install php5-sqlite. After which pdo-sqlite will be properly installed and ready for use.
Hope this helps,
LaChild |
Kuidas ma seda koike teha saan?
|
|
|
|
|
|
|
|
sander85
Vana Pingviin
Vanus: 39
Liitunud: 08.08.2005
Postitused: 4359
Asukoht: Tallinn (vahel ka Virtsu)
Distributsioon: Mageia, Debian, CentOS
|
|
dpkg -l |grep php5
* pane endale kirja see nimekiri
* eemalda kõik php5 algavad pakid käsuga aptitude purge pakinimi
* paigalda vajalikud tagasi + paigalda php5-sqlite
|
|
|
|
_________________
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Tegin ära, aga nüüd downloadib php faile. Tundub, et php ei ole enabled apaches... Kuidas ma saan kontrollida/aktiveerida?
|
|
|
|
|
|
|
|
obundra
Vana Pingviin
Vanus: 50
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Ok, see on nüüd on php enabled, aga php-mysql ikka ei tundu töötavat php-mysql
Kurat, et nad selle dist-upgrade tegid ilma hoiatamata
|
|
|
|
|
|
|
|
obundra
Vana Pingviin
Vanus: 50
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
|
|
Sul ehk php5-mysql ja php5-gd pakid ja võibolla veel mõned puudu, mida näitab?Ja kui puuduolevad saad installitud, siis apatsile tee stop|start ka.
|
|
|
|
_________________ IT teenused
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
Kood: | $ sudo dpkg -l |grep php5
ii libapache2-mod-php5 5.3.3-7+squeeze3 server-side, HTML-embedded scripting language (Apache 2 module)
ii php5-cli 5.3.3-7+squeeze3 command-line interpreter for the php5 scripting language
ii php5-common 5.3.3-7+squeeze3 Common files for packages built from the php5 source
ii php5-suhosin 0.9.32.1-1 advanced protection module for php5
|
Samas korra juba purgesin neid, aga jälle tagasi...
|
|
|
|
|
|
|
|
obundra
Vana Pingviin
Vanus: 50
Liitunud: 04.08.2005
Postitused: 1213
Asukoht: 127.0.0.1
Distributsioon: RHEL, Solaris, Debian, Gentoo
|
|
Peavadki ju tagasi olema kui php-d kasutada tahad.Aga php5-gd ja php5-mysql ei paista seal nimekirjas ju, installi nood ka.
Ja tee testiks üks fail apache docroot kataloogi, sisuga Kood: | <?php phpinfo(); ?> | ning nimeta see näiteks info.php, siis aadressilt http://sinuserverinimi/info.php näed täpsemat infot php-ga toimuva kohta.
|
|
|
|
_________________ IT teenused
|
|
|
|
svenx
Pingviini külastaja
Liitunud: 12.12.2009
Postitused: 22
|
|
|
|
|