Allt från Computex 2023

Problem med amaroK Web Frontend

Permalänk
Medlem

Problem med amaroK Web Frontend

http://www.kde-apps.org/content/show.php?content=25398&forumm... är programet jag har problem med. Jag har min amarok-databas på min MySQL-server, och jag är helt säker på att jag skrivit rätt adress i mp3-directoryn (utan trailing slash).

Varför får jag "Fatal error: Call to undefined function: mysql_connect() in /var/www/amarok/inc/globals.inc.php on line 88" när jag försöker gå in på sidan? Vad är det mer som ska ställas in?

Line 88 ligger dessutom under kommentaren "Don't edit anything below this line unless you know what you're doing"

Här är dokumentet där alla inställningar ska ske enligt "INSTALL"-dokumentet.

<?php // amaroK web frontend // Copyleft Ryan Loebs // // inc/globals.inc.php - created 5/17/05 // // Purpose: main configuration file // /////////////////////////////////////// if(eregi("globals.inc.php", $_SERVER['PHP_SELF'])){ die("Cannot access directly."); } // Please edit the information below this line // to match your system's configuration // Site name: $sitename = "amaroK"; // Header picture: // put your pics in img/ $sitepic = "amarok.png"; // Theme: // (the folder name) $theme = "default"; // Type of playlist to generate: // 1 = pls , 2 = m3u , 3 = no list output , 4 = download song // (NOTE: 4 doesn't work on playlists, individual songs only) $listtype = 4; // How many results per-page for // large results: $resultlimit = 500; // GZip compression: // 1 = on , 0 = off $gzip = 1; // Password Protection: // 1 = on , 0 = off // (user/pass config: inc/users.inc.php) $protected = 0; // Authentication saving method: // 1 = cookies , 2 = sessions $authSave = 1; // Cookie expiration length (in minutes): // (if you chose 1 on $authSave) $length = 60; // Database access information: $dbinfo = array( 'user' => 'root', 'pass' => 'spiritus', 'host' => 'localhost', 'name' => 'amarok'); // The real directory where the MP3's // are stored: // (i.e. /absolute/path/to/mp3s) $dirloc = "/media/hdb1/Audio/Albums"; // CASE SENSITIVE, NO TRAILING SLASH! // The location of the MP3's as seen // by the end user // (i.e. http://you.com/mp3s) $webloc = "http://".$_SERVER['HTTP_HOST']."/mp3s"; // CASE SENSITIVE, NO TRAILING SLASH! // Please do not edit anything below this line // unless you know what you are doing... // Include required template engine require_once("patTemplate/patErrorManager.php"); require_once("patTemplate/patTemplate.php"); require_once("inc/other.php"); require_once("inc/users.inc.php"); // SQL Database connection mysql_connect($dbinfo['host'], $dbinfo['user'], $dbinfo['pass']) or die(mysql_error()); mysql_select_db($dbinfo['name']); // Grab song count $songcount = mysql_result(mysql_query("SELECT COUNT(*) FROM tags"), 0); // Initiate the session session_start(); header("Cache-control: private"); $authed = 0; if(($authSave == 1) && isset($_COOKIE['amarOK'])){ $authed = 1; }elseif(($authSave == 2) && isset($_SESSION['amarOK'])){ $authed = 1; } // Check for an action (PHP5 Fix) if(isset($_GET['a'])){ $choose = $_GET['a']; }else{ $choose = ''; } // Put the main info into the page $tmpl = new patTemplate(); $tmpl->setBasedir("templates/$theme"); if(($_GET['a'] != "play") && ($_GET['a'] != "plist") && ($_GET['a'] != "rand") && ($_GET['a'] != "lplay")){ if($protected && !$authed){ $tmpl->readTemplatesFromFile('password.tpl'); }else{ $tmpl->readTemplatesFromFile('main.tpl'); $tmpl->addVar("head", "title", $sitename); $tmpl->addVar("head", "pic", $sitepic); $tmpl->addVar("head", "songcount", $songcount); $tmpl->addVar("main", "theme", $theme); if($gzip){ $tmpl->setAttribute("gzip", "visibility", "visible"); $tmpl->applyOutputFilter("Gzip"); } if($protected){ $tmpl->setAttribute("logout", "visibility", "visible"); } } } ?>

Visa signatur

Macbook Pro 15" (2,4 GHz Core Duo)

Permalänk
Medlem

Kan det vara paketet php4-mysql du saknar?

Visa signatur

This is a UNIX virus. Please remove all your files and copy this message to friends.
(Citera mig om du förväntar dig svar)

Permalänk
Medlem
Citat:

kaminix@Kaminix:~$ sudo aptitude search php4-mysql
Password:
i A php4-mysql -MySQL module for php4

Nepp. =/

Visa signatur

Macbook Pro 15" (2,4 GHz Core Duo)