php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2005-2

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 20.09.2005, 07:04  
Gast
 
Beiträge: n/a
Standard PHP-Fehlermeldung, weiss nicht mehr weiter

Hallo,

ich bin ein blutiger PHP Anfänger. Ich hoffe ihr könnt mir helfen.
Habe folgendes Problem. Und zwar wollte ich dir97_lite (webkatalog)aufspielen.
Aber nun bringt er mir folgende Fehlermeldung, wenn ich die index.php aufrufen will:

Warning: main(lang/english/main.php): failed to open stream: No such file or directory in /var/www/web3/html/test/phpdirectory/includes/functions.php on line 27

Warning: main(lang/english/main.php): failed to open stream: No such file or directory in /var/www/web3/html/test/phpdirectory/includes/functions.php on line 27

Fatal error: main(): Failed opening required 'lang/english/main.php' (include_path='.::/usr/share/pear') in /var/www/web3/html/test/phpdirectory/includes/functions.php on line 27

Das heisst jetzt für mich, das er die Language-Datei nicht finden kann.

So sieht der abgeänderte Code bei mir aus. Dort befindet sich auch diese main.php:
Zeilen 21-27

if (strpos (Cur_Url (), 'includes%2F') OR strpos (Cur_Url (), 'admin%2F'))
{
require "../lang/english/main.php";
}
else
{
require "lang/english/main.php";

Der Originalcode (unverändert) sieht folgendermaßen aus:
Zeilen 21-27

if (strpos (Cur_Url (), 'includes%2F') OR strpos (Cur_Url (), 'admin%2F'))
{
require "../lang/$config[lang]/main.php";
}
else
{
require "lang/$config[lang]/main.php";

Ich habe bestimmt irgendwas falsch gemacht. Ich hoffe ihr könnt mir da weiterhelfen. Ich danke euch schonmal recht herzlich im voraus!!!!!!

Gruß Micha
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 20.09.2005, 07:21  
Gast
 
Beiträge: n/a
Standard

Wo genau liegt die Datei lang/english/main.php rum? (Absoluten Pfad angeben)
 
Alt 20.09.2005, 07:51  
Gast
 
Beiträge: n/a
Standard

Hi,

die genaue Pfadangabe:

http://web3.florahost.de/test/phpdir...glish/main.php

Gruß Micha
 
Alt 20.09.2005, 09:59  
Erfahrener Benutzer
 
Registriert seit: 09.05.2005
Beiträge: 193
akratellio
Standard

hallo Mike24,

wenn ich mich nicht irre sieht die syntax von require so aus
require("bla.txt");

mfg

akratellio
__________________
"Ich lüge immer..."
http://www.akratellio.de/dai
akratellio ist offline  
Alt 20.09.2005, 13:17  
Erfahrener Benutzer
 
Registriert seit: 27.10.2004
Beiträge: 1.093
PHP-Kenntnisse:
Fortgeschritten
Chr!s
Standard

Nö. Require geht auch ohne Klammern.
wth kann niemand Fehlermeldungen lesen und danach handeln?
Zitat:
failed to open stream: No such file or directory in
Da steht doch alles was falsch ist
Chr!s ist offline  
Alt 20.09.2005, 23:57  
Gast
 
Beiträge: n/a
Standard

hi,

hab es nochmal komplett neu installiert, den Katalog. Habe die Konfig passend abgeändert. Jetzt kommt keine Fehlermeldung mehr. Wenn ich aber die index.php laden will, kommt beim Mozilla-Browser (Firefox) folgende Fehlermeldung:

Umleitungs-Limit für diese URL überschritten. Die angeforderte Seite konnte nicht geladen werden. Das kann von geblockten Cookies herrühren.

Vllt. hat ja das irgendwas damit zu tun.

Habe noch was entdeckt, was mir ein Rätsel aufgibt. Nach dem aufspielen der Dateien, muss ich ein SQL-Datei ausführen wg. der Datenbank. Bei mir kam dies hier:

# Database db664n9 running on localhost

# phpMyAdmin MySQL-Dump
# version 2.5.0-rc2
# http://www.phpmyadmin.net/ (download page)
#
# Host: localhost
# Generation Time: May 22, 2005 at 03:30 PM
# Server version: 4.0.12
# PHP Version: 4.3.1
# Database : `db664n9`
# --------------------------------------------------------

#
# Table structure for table `d97_category`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 22, 2005 at 03:30 PM
# Last check: May 22, 2005 at 03:14 PM
#

CREATE TABLE `d97_category` (
`parent` int(10) unsigned NOT NULL default '0',
`cat_id` int(10) unsigned NOT NULL auto_increment,
`cat_name` varchar(100) NOT NULL default '',
`cat_note` tinytext NOT NULL,
`cat_keywords` tinytext NOT NULL,
`cat_num_links` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`cat_id`)
) TYPE=MyISAM AUTO_INCREMENT=7 ;
# --------------------------------------------------------

#
# Table structure for table `d97_config`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 22, 2005 at 03:30 PM
#

CREATE TABLE `d97_config` (
`config_id` varchar(255) NOT NULL default '',
`config_value` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `d97_favorites`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 20, 2005 at 10:05 PM
#

CREATE TABLE `d97_favorites` (
`username` varchar(25) NOT NULL default '',
`link_id` int(10) unsigned NOT NULL default '0',
`fav_note` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `d97_links`
#
# Creation: May 20, 2005 at 11:43 PM
# Last update: May 22, 2005 at 03:30 PM
#

CREATE TABLE `d97_links` (
`link_id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(25) NOT NULL default '',
`title` varchar(100) NOT NULL default '',
`url` varchar(255) NOT NULL default '',
`short_note` varchar(255) NOT NULL default '',
`note` mediumtext NOT NULL,
`contact` varchar(100) NOT NULL default '',
`contact_email` varchar(100) NOT NULL default '',
`category_1` int(10) unsigned NOT NULL default '0',
`list_date` date NOT NULL default '0000-00-00',
`keywords` tinytext NOT NULL,
`editor_pick` char(1) NOT NULL default '',
`official_review` text NOT NULL,
`sponsored` char(1) NOT NULL default '',
`avg_rating` float unsigned NOT NULL default '0',
`freq_rating` int(10) unsigned NOT NULL default '0',
`ttl_clicks` int(10) unsigned NOT NULL default '0',
`last_update` date NOT NULL default '0000-00-00',
`status` char(1) NOT NULL default '',
PRIMARY KEY (`link_id`)
) TYPE=MyISAM AUTO_INCREMENT=12 ;
# --------------------------------------------------------

#
# Table structure for table `d97_mailists`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 20, 2005 at 10:05 PM
#

CREATE TABLE `d97_mailists` (
`mailist_id` int(10) unsigned NOT NULL auto_increment,
`mailist_date` date NOT NULL default '0000-00-00',
`mailist_title` varchar(255) NOT NULL default '',
`mailist_content` text NOT NULL,
PRIMARY KEY (`mailist_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
# --------------------------------------------------------

#
# Table structure for table `d97_members`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 22, 2005 at 03:30 PM
# Last check: May 21, 2005 at 10:36 PM
#

CREATE TABLE `d97_members` (
`username` varchar(25) NOT NULL default '',
`passwd` varchar(20) NOT NULL default '',
`email` tinytext NOT NULL,
`name` tinytext NOT NULL,
`url` tinytext NOT NULL,
`icq` tinytext NOT NULL,
`aol` tinytext NOT NULL,
`yahoo` tinytext NOT NULL,
`user_note` mediumtext NOT NULL,
`since` date NOT NULL default '0000-00-00',
`admin` char(1) NOT NULL default '',
`status` char(1) NOT NULL default '',
PRIMARY KEY (`username`)
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `d97_news`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 22, 2005 at 03:30 PM
#

CREATE TABLE `d97_news` (
`news_id` int(10) unsigned NOT NULL auto_increment,
`news_date` date NOT NULL default '0000-00-00',
`news_title` varchar(255) NOT NULL default '',
`news_summary` varchar(255) NOT NULL default '',
`news_content` text NOT NULL,
PRIMARY KEY (`news_id`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;
# --------------------------------------------------------

#
# Table structure for table `d97_permisi`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 22, 2005 at 03:30 PM
#

CREATE TABLE `d97_permisi` (
`permisi_id` varchar(255) NOT NULL default '',
`permisi_value` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `d97_reports`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 22, 2005 at 03:30 PM
# Last check: May 22, 2005 at 03:14 PM
#

CREATE TABLE `d97_reports` (
`report_id` int(10) unsigned NOT NULL auto_increment,
`link_id` int(10) unsigned NOT NULL default '0',
`username` varchar(25) NOT NULL default '',
`report_date` date NOT NULL default '0000-00-00',
`report_title` varchar(255) NOT NULL default '',
`report_content` text NOT NULL,
PRIMARY KEY (`report_id`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;
# --------------------------------------------------------

#
# Table structure for table `d97_reviews`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 22, 2005 at 03:30 PM
# Last check: May 22, 2005 at 03:14 PM
#

CREATE TABLE `d97_reviews` (
`idx` int(10) unsigned NOT NULL auto_increment,
`link_id` int(10) unsigned NOT NULL default '0',
`username` varchar(25) NOT NULL default '',
`member_ip` varchar(16) NOT NULL default '',
`review_date` date NOT NULL default '0000-00-00',
`review_title` varchar(200) NOT NULL default '',
`review_content` mediumtext NOT NULL,
`rating` tinyint(4) NOT NULL default '0',
`review_status` char(1) NOT NULL default '',
PRIMARY KEY (`idx`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;
# --------------------------------------------------------

#
# Table structure for table `d97_subscribe`
#
# Creation: May 20, 2005 at 10:05 PM
# Last update: May 20, 2005 at 10:05 PM
#

CREATE TABLE `d97_subscribe` (
`username` varchar(25) NOT NULL default '',
`cat_id` int(10) unsigned NOT NULL default '0',
`mailist_id` int(10) unsigned NOT NULL default '0'
) TYPE=MyISAM;



Dann gibts noch eine demo.sql (ich glaube so sollte es aussehen):

# Database db664n9 running on localhost

# phpMyAdmin MySQL-Dump
# version 2.5.0-rc2
# http://www.phpmyadmin.net/ (download page)
#
# Host: localhost
# Generation Time: May 22, 2005 at 03:44 PM
# Server version: 4.0.12
# PHP Version: 4.3.1
# Database : `db664n9`

#
# Dumping data for table `d97_category`
#

INSERT INTO `d97_category` VALUES (0, 1, 'Test Demo', 0x54686973206973206120746573742063617465676f7279, 0x64697239372c746573742c736f6d652c6b6579776f726473 , ;
INSERT INTO `d97_category` VALUES (1, 2, 'Software Giants', 0x546865206769616e747320696e20736f6674776172652069 6e647573747279, 0x736f6674776172652c6e6f742068617264776172652c7768 617465766572, 1);
INSERT INTO `d97_category` VALUES (1, 3, 'Gaming', 0x47616d652c2067616d652c20616e64206d6f72652067616d 65, 0x50432c58626f782c5053322c4e36342c67616d652c67616d 65732c7265766965772c72657669657773, 2);
INSERT INTO `d97_category` VALUES (1, 4, 'Freeware', 0x46726565776172652c2061206672656520736f6674776172 652e2e2e, 0x65722e2e2e3f, 2);

#
# Dumping data for table `d97_links`
#

INSERT INTO `d97_links` VALUES (1, '', 'C97dotnet', 'http://www.c97.net', 'The main site for C97dotnet.', 0x54686973206973207468652063726561746f72206f662044 697239372e20446f20796f75206b6e6f772c20746861742044 697239372069732063617061626c65206f6620616363657074 696e672048544d4c20746167732c20696e7374656164206f66 20706c61696e20746578743f20436f6e666967757265206974 20696e207468652061646d696e203e20636f6e666967757261 74696f6e2e, 'C97dotnet', 'contact@c97.net', 1, '2004-12-20', 0x7765622064657369676e696e672c2077656220646576656c 6f706d656e742c207765622070726f6772616d6d696e672c20 6469726563746f727939372c206469723937, '1', 0x546869732069732061206772656174207369746520666f72 2067726561742070726f6475637473203a2d29, '', '5', 1, 0, '0000-00-00', '');
INSERT INTO `d97_links` VALUES (2, '', 'Microsoft', 'http://www.microsoft.com', 'It owns the world!', 0x5468697320636f6d70616e792077617320666f756e646564 2062792042696c6c2047617465732e20497473207072696d61 72792070726f64756374206973204d6963726f736f66742057 696e646f77732c207768696368206973206e6f772075736564 206576657279776865726520696e2074686520776f726c642e 205765206d617920686174652069742c206275742077652061 6c6c2077616e7420746f206265206c696b652069742e, 'Dunno', 'bill.gate@microsoft.com', 2, '2004-12-20', 0x77696e646f77732c206f66666963652c206769616e74732c 20726963682c20737570657220726963682c20746865207269 6368657374, '', '', '', '3', 1, 0, '0000-00-00', '');
INSERT INTO `d97_links` VALUES (3, '', 'Directory97', 'http://dir.c97.net', 'Home for Directory97', 0x4469723937206973207468652070726f6772616d20796f75 206172652063757272656e746c79207573696e672e20546f20 676574206d6f726520696e666f726d6174696f6e2061626f75 74206675747572652072656c656173652c20636f6d706c696d 656e742c206f7220746f20636f6d706c61696e20676f20746f 2074686520736974652e, 'C97', 'contact@c97.net', 1, '2004-12-20', 0x6469726563746f727939372c64697239372c633937646f74 6e65742c6469726563746f72792c79656c6c6f772070616765 73, '0', '', '', '0', 0, 0, '0000-00-00', '');
INSERT INTO `d97_links` VALUES (4, '', 'Mozilla.org', 'http://www.mozilla.org', 'The producer of Mozilla Browser.', 0x496620796f75206e65656420616e20616c7465726e617469 76652062726f7773657220746f204d532049452c20796f7520 73686f756c6420636f6e7369646572204d6f7a696c6c612e20 4e6f74206f6e6c7920697420697320667265652c2062757420 616c736f20706f77657266756c2e, 'mozilla', '', 4, '2004-12-20', '', '0', '', '', '0', 0, 0, '0000-00-00', '');
INSERT INTO `d97_links` VALUES (5, '', 'C97 Design', 'http://www.c97design.com', 'Home for C97 Design.com', 0x43393764657369676e2e636f6d2069732061206469766973 696f6e206f6620433937646f746e65742c2077697468206d61 696e20666f63757320746f207765622064657369676e202620 646576656c6f706d656e742e, 'C97', 'contact@c97.net', 1, '2004-12-20', 0x64657369676e2c633937, '0', '', '', '4.5', 2, 0, '0000-00-00', '');
INSERT INTO `d97_links` VALUES (6, '', 'Xbox.com', 'http://www.xbox.com', 'Microsoft released this console. And it works!', 0x556e6c696b652057696e646f77732c207468657265206973 206e6f2058626f782039382c206f722058626f782058502c20 616e6420697420776f726b7320666c61776c6573736c792e20 576520776973682074686174206576657279204d6963726f73 6f66742072656c656173657320776f726b206c696b65205862 6f782e, '', '', 3, '2004-12-20', '', '0', '', '', '0', 0, 0, '0000-00-00', '');
INSERT INTO `d97_links` VALUES (7, '', 'Playstation 2', 'http://www.playstation.com', 'A gaming console from Sony. Continuation of PlayStation.', 0x4974206d617920626520746865206d6f73742066616d6f75 7320636f6e736f6c6520696e2074686520776f726c642e2057 69746820776f726c64776964652073616c65206f6620353020 6d696c6c696f6e20756e6974732120496d6167696e652c2068 6f77207269636820697320536f6e7921, '', '', 3, '2004-12-20', '', '0', '', '', '0', 0, 0, '0000-00-00', '');
INSERT INTO `d97_links` VALUES (8, '', 'Notetab', 'http://www.notetab.com', 'The most powerful text editor, we\\\'ve ever used!', 0x49745c277320736d616c6c2c20627574207665727920706f 77657266756c2e205769746820737570706f7274206f66206d 756c7469706c652066696c657320756e646572206f6e652077 696e646f772e2057652075736520697420666f722063726561 74696e67204469726563746f727939372e20476f6f64207072 6f647563742120416e642069745c277320667265652e2e2e, '', '', 4, '2004-12-20', '', '0', '', '', '0', 0, 0, '0000-00-00', '');

#
# Dumping data for table `d97_members`
#

INSERT INTO `d97_members` VALUES ('demo', 'demo', 0x64656d6f4064656d6f2e746c64, 0x546573742044656d6f, '', '', '', '', '', '2005-05-22', '', '');

#
# Dumping data for table `d97_news`
#

INSERT INTO `d97_news` VALUES (3, '2005-05-22', 'Test Demo Established', 'This site is powered by the very generous Directory97 Lite', 0x496620796f75207365652074686973206d6573736167652c 206d65616e696e6720796f7520686176652073756363657366 756c6c7920696e7374616c6c65642074686520736d616c6c20 79657420706f77657266756c204469726563746f7279393720 4c6974652e);

#
# Dumping data for table `d97_reports`
#

INSERT INTO `d97_reports` VALUES (3, 1, 'Test Demo', '2005-05-22', 'Other', 0x54686973207369746520697320746f6f20636f6f6c20746f 20626520747275652c20796f752073686f756c642076657269 667920697421);

#
# Dumping data for table `d97_reviews`
#

INSERT INTO `d97_reviews` VALUES (3, 1, 'demo', '127.0.0.1', '2005-05-22', 'Cool!', 0x433937646f746e65742069732061207665727920636f6f6c 20736974652c2077697468206c6f7473206f66206672656520 73747566662c20616e6420696e2068696768207175616c6974 7920746f6f2e, 5, '');


Vielleicht haut hier irgendwas mit meiner Datenbank nicht hin.

Sorry für den langen Beitrag!!!

Good N8 @all und danke!!
 
Alt 21.09.2005, 01:07  
Erfahrener Benutzer
 
Registriert seit: 18.09.2003
Beiträge: 13.598
PHP-Kenntnisse:
Fortgeschritten
imported_Ben ist zur Zeit noch ein unbeschriebenes Blatt
Standard

Was willst du denn jetzt mit dem SQL-Dump? ..
imported_Ben ist offline  
Alt 21.09.2005, 06:24  
Erfahrener Benutzer
 
Registriert seit: 27.10.2004
Beiträge: 1.093
PHP-Kenntnisse:
Fortgeschritten
Chr!s
Standard

Deine Fehlermeldung sagt doch ganz klar aus, dass es die Datei, die angefordert ist, nicht gibt
Chr!s ist offline  
Alt 21.09.2005, 07:05  
Gast
 
Beiträge: n/a
Standard

*Kopfschüttel*
 
Alt 21.09.2005, 08:14  
Gast
 
Beiträge: n/a
Standard

Ich dachte das das weiter hilft. Bin doch schon im Anfängerforum, oder??

Das die Fehlermeldung ausgibt das die Datei nicht existiert, ist mir schon klar. Ich wollte doch bloss wissen, wie ich die Pfadangaben ändern muss das es klappt. Die Sprachdatei gibt es ja, bloss stimmen die Pfadangaben nicht.
 
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Seltsame Fehlermeldung Datenbanken 12 09.03.2010 11:01
Fehlermeldung umbenennen Soese PHP Tipps 2007 3 13.03.2007 13:33
script läuft und funktioniert gibt aber fehlermeldung aus? Promaetheus PHP Tipps 2006 5 12.09.2006 23:42
Kann keine Session auslesen und habe keine Fehlermeldung Klaus Server, Hosting und Workstations 7 26.05.2006 12:31
Fehlermeldung bei foreach seven-12 PHP Tipps 2007 5 21.11.2005 14:15
[Erledigt] Fehlermeldung weil .txt Datei nicht existiert PHP Tipps 2005-2 9 28.09.2005 19:57
Fehlermeldung PHP Tipps 2005-2 2 04.09.2005 04:04
Ich will Fehlermeldung vermeiden. Zero.exe PHP Tipps 2005-2 2 02.08.2005 13:11
Fehlermeldung: Warning: getimagesize ... failed to open DDogg PHP Tipps 2005-2 2 30.06.2005 11:13
fragwürdige Fehlermeldung PHP Tipps 2005 5 19.05.2005 15:45
Fehlermeldung PHP Tipps 2005 4 14.05.2005 09:36
[Erledigt] Fehlermeldung unterdrücken wenn keine variable übergeben... PHP Tipps 2005 6 20.03.2005 13:36
Fehlermeldung im W3C Validator HTML, Usability und Barrierefreiheit 6 03.02.2005 13:47
Script bei Strato mit Fehlermeldung, bei Netbeat ok PHP Tipps 2004-2 14 08.12.2004 11:08
Fehlermeldung = kake PHP Tipps 2004 5 15.07.2004 19:56

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
lang_main aktualisieren, lang_main in sql

Alle Zeitangaben in WEZ +2. Es ist jetzt 08:35 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.