I specially removed apache 1.3.33 and installed apache2... Code: total 188 drwxr-xr-x 10 root root 4096 2006-04-01 14:42 . drwxr-xr-x 14 root root 4096 2006-04-01 14:12 .. -rw-r--r-- 1 root root 133806 2006-04-01 14:27 admin.php drwxr-xr-x 2 root root 4096 2006-04-01 14:12 apache2-default drwxr-xr-x 2 root root 4096 2006-04-01 14:42 cache -rw-r--r-- 1 root root 280 2006-04-01 14:42 index.htm -rw-r--r-- 1 root root 5639 2006-04-01 14:42 INSTALL drwxr-xr-x 4 root root 4096 2006-04-01 14:55 lib lrwxrwxrwx 1 root root 21 2006-04-01 14:15 phpmyadmin -> /usr/share/phpmyadmin drwxr-xr-x 2 root root 4096 2006-04-01 14:42 sql drwxr-xr-x 2 root root 4096 2006-04-01 14:42 temp drwxr-xr-x 2 root root 4096 2006-04-01 14:42 tools drwxr-xr-x 7 root root 4096 2006-04-01 14:42 web drwxr-xr-x 2 root root 4096 2006-04-01 14:40 webalizer
I tried http://mydns.new.bg/index.htm, and then the browser wants me to download index.php. You must enable PHP in your Apache.
from /etc/apache2/mods-enabled/php4.conf: Code: <IfModule mod_php4.c> AddType application/x-httpd-php .php .phtml .php3 AddType application/x-httpd-php-source .phps </IfModule> from /etc/apache2/apache2.conf: Code: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
What's the output of Code: ls -la /etc/apache2/mods-enabled ? Is PHP also enabled for the vhost where MyDNSConfig is installed?
Code: total 12 drwxr-xr-x 2 root root 4096 2006-04-01 14:39 . drwxr-xr-x 8 root root 4096 2006-04-01 14:12 .. lrwxrwxrwx 1 root root 40 2006-04-01 14:16 actions.load -> /etc/apache2/mods-available/actions.load lrwxrwxrwx 1 root root 36 2006-04-01 14:16 cgi.load -> /etc/apache2/mods-available/cgi.load lrwxrwxrwx 1 root root 40 2006-04-01 14:39 include.load -> /etc/apache2/mods-available/include.load -rw-r--r-- 1 root root 129 2006-04-01 14:38 php4.conf lrwxrwxrwx 1 root root 40 2006-04-01 14:39 rewrite.load -> /etc/apache2/mods-available/rewrite.load lrwxrwxrwx 1 root root 36 2006-04-01 14:38 ssl.conf -> /etc/apache2/mods-available/ssl.conf lrwxrwxrwx 1 root root 36 2006-04-01 14:38 ssl.load -> /etc/apache2/mods-available/ssl.load lrwxrwxrwx 1 root root 39 2006-04-01 14:39 suexec.load -> /etc/apache2/mods-available/suexec.load lrwxrwxrwx 1 root root 40 2006-04-01 14:12 userdir.conf -> /etc/apache2/mods-available/userdir.conf lrwxrwxrwx 1 root root 40 2006-04-01 14:12 userdir.load -> /etc/apache2/mods-available/userdir.load Hmmm, see this from /etc/apache2/sites-enabled/000-default: Code: NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all # This directive allows us to have apache2's default start page # in /apache2-default/, but still have / go to the right place RedirectMatch ^/$ /apache2-default/ </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> Other strange problem is when I'm loggin into server there is an error with hostname. I use "hostname -v mydns" to fix it...after 1-2 days this error appears. And this is the content of /var/www/web/dns: Code: form list rr_edit.php soa_del.php soa_list.php lib rr_del.php rr_list.php soa_edit.php templates ... maybe MyDNS is installed
Code: total 176 drwxr-xr-x 2 root root 4096 2006-04-01 14:12 . drwxr-xr-x 8 root root 4096 2006-04-01 14:12 .. -rw-r--r-- 1 root root 66 2005-09-05 14:16 actions.load -rw-r--r-- 1 root root 60 2005-09-05 14:16 asis.load -rw-r--r-- 1 root root 70 2005-09-05 14:16 auth_anon.load -rw-r--r-- 1 root root 68 2005-09-05 14:16 auth_dbm.load -rw-r--r-- 1 root root 74 2005-09-05 14:16 auth_digest.load -rw-r--r-- 1 root root 130 2005-09-05 14:16 auth_ldap.load -rw-r--r-- 1 root root 62 2005-09-05 14:16 cache.load -rw-r--r-- 1 root root 70 2005-09-05 14:16 cern_meta.load -rw-r--r-- 1 root root 61 2005-09-05 14:16 cgid.conf -rw-r--r-- 1 root root 60 2005-09-05 14:16 cgid.load -rw-r--r-- 1 root root 58 2005-09-05 14:16 cgi.load -rw-r--r-- 1 root root 37 2005-09-05 14:16 dav_fs.conf -rw-r--r-- 1 root root 64 2005-09-05 14:16 dav_fs.load -rw-r--r-- 1 root root 58 2005-09-05 14:16 dav.load -rw-r--r-- 1 root root 66 2005-09-05 14:16 deflate.load -rw-r--r-- 1 root root 72 2005-09-05 14:16 disk_cache.load -rw-r--r-- 1 root root 66 2005-09-05 14:16 expires.load -rw-r--r-- 1 root root 72 2005-09-05 14:16 ext_filter.load -rw-r--r-- 1 root root 72 2005-09-05 14:16 file_cache.load -rw-r--r-- 1 root root 66 2005-09-05 14:16 headers.load -rw-r--r-- 1 root root 60 2005-09-05 14:16 imap.load -rw-r--r-- 1 root root 66 2005-09-05 14:16 include.load -rw-r--r-- 1 root root 60 2005-09-05 14:16 info.load -rw-r--r-- 1 root root 60 2005-09-05 14:16 ldap.load -rw-r--r-- 1 root root 70 2005-09-05 14:16 mem_cache.load -rw-r--r-- 1 root root 90 2005-09-05 14:16 mime_magic.conf -rw-r--r-- 1 root root 72 2005-09-05 14:16 mime_magic.load -rw-r--r-- 1 root root 840 2005-09-05 14:16 proxy.conf -rw-r--r-- 1 root root 78 2005-09-05 14:16 proxy_connect.load -rw-r--r-- 1 root root 70 2005-09-05 14:16 proxy_ftp.load -rw-r--r-- 1 root root 72 2005-09-05 14:16 proxy_http.load -rw-r--r-- 1 root root 316 2005-09-05 14:16 proxy.load -rw-r--r-- 1 root root 66 2005-09-05 14:16 rewrite.load -rw-r--r-- 1 root root 66 2005-09-05 14:16 speling.load -rw-r--r-- 1 root root 3545 2005-09-05 14:16 ssl.conf -rw-r--r-- 1 root root 58 2005-09-05 14:16 ssl.load -rw-r--r-- 1 root root 64 2005-09-05 14:16 suexec.load -rw-r--r-- 1 root root 70 2005-09-05 14:16 unique_id.load -rw-r--r-- 1 root root 244 2005-09-05 14:16 userdir.conf -rw-r--r-- 1 root root 66 2005-09-05 14:16 userdir.load -rw-r--r-- 1 root root 70 2005-09-05 14:16 usertrack.load -rw-r--r-- 1 root root 74 2005-09-05 14:16 vhost_alias.load
The fact that php4.conf is a real file instead of a link in /etc/apache2/mods-enabled and that neither php4.conf nor php4.load are available in /etc/apache2/mods-available makes me think that you somehow deleted them or misconfigured PHP. Normally you have php4.conf and php4.load in /etc/apache2/mods-available, and to enable PHP4 in Apache, you just run Code: a2enmod php4 which creates symlinks tp php4.conf and php4.load in /etc/apache2/mods-enabled. Please try this: Create /etc/apache2/mods-available/php4.conf with this content: Code: <IfModule mod_php4.c> AddType application/x-httpd-php .php .phtml .php3 AddType application/x-httpd-php-source .phps </IfModule> and /etc/apache2/mods-available/php4.load with this content: Code: LoadModule php4_module /usr/lib/apache2/modules/libphp4.so Then do this: Code: rm -f /etc/apache2/mods-enabled/php4.conf a2enmod php4 /etc/init.d/apache2 restart
Code: a2enmod php4 Module php4 installed; run /etc/init.d/apache2 force-reload to enable. Code: /etc/init.d/apache2 restart Forcing reload of web server: Apache2Syntax error on line 1 of /etc/apache2/mods-enabled/php4.load: Cannot load /usr/lib/apache2/modules/libphp4.so into server: /usr/lib/apache2/modules/libphp4.so: cannot open shared object file: No such file or directory Content of /etc/apache2/mods-enabled/php4.load: LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
Code: Reading Package Lists... Done Building Dependency Tree... Done Suggested packages: php4-pear The following NEW packages will be installed: libapache2-mod-php4 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 1612kB of archives. After unpacking 3219kB of additional disk space will be used. Get:1 http://ftp.bg.debian.org stable/main libapache2-mod-php4 4:4.3.10-16 [1612kB] Fetched 1612kB in 17s (93.7kB/s) Selecting previously deselected package libapache2-mod-php4. (Reading database ... 24782 files and directories currently installed.) Unpacking libapache2-mod-php4 (from .../libapache2-mod-php4_4%3a4.3.10-16_i386.deb) ... Setting up libapache2-mod-php4 (4.3.10-16) ... [B]Forcing reload of web server: Apache2 ... no pidfile found! not running?.[/B] After I type "/etc/init.d/apache2 restart" I have working mydns interface on http://mydns.new.bg/web/index.php... 10x
Another problem When I type username >>admin and password >>admin this error appears in MyDNSConfig Panel Code: Fatal error: Call to undefined function: mysql_connect() in /var/www/lib/classes/db_mysql.inc.php on line 75
This error means that your PHP installations does not have mysql enabled. Install the mysql extension for PHP and restart your webserver.
From the official PHP site: Installation on Linux Systems Code: PHP 4 The option --with-mysql is enabled by [B][U]default[/U][/B]. This default behavior may be disabled with the --without-mysql configure option. If MySQL is enabled without specifying the path to the MySQL install DIR, PHP will use the bundled MySQL client libraries. But... how to install it. I supose after new install of PHP4, there are new errors in configuration In /etc/php4/apache2/php.ini I found these lines: Code: ; Example lines: ;extension=mysql.so ;extension=gd.so ; means these lines are commented... should I remove comments?
This is correct if you compile PHP, but it is not correct for any current linux distributions as they have modularized PHP pacages. run: apt-get install php4-mysql
Code: apt-get install php4-mysql ... Code: php4-mysql is already the newest version ... Line 75 Code: $this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
Ok, then it is installed but not enabled. Please check your php.ini (there might be more then one php.ini file!) if the line extension=mysql.so line is not commented out.