Problem mit Frontend - define() scheint nicht zu klappen

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Keules
Posts: 80
Joined: Tue 2. Mar 2004, 17:06
Location: Hamburg

Problem mit Frontend - define() scheint nicht zu klappen

Post by Keules »

Hallo!

ich hatte schon mal im Installationsforum gepostet und versuche es hier auch noch mal, entschuldigt das Doppelposting, aber bei mir brennt die Luft und ich bekomm von meinem Chef die Hölle heiß gemacht, weil der Auftritt nich Korrektur gelesen werden kann.

Folgendes:

Installiert ist das CMS auf einem IIS 6 mit PHP und MySQL.

Bisher klappt alles, Backend läuft und ich kann gut arbeiten.

Rufe ich jedoch das Frontend auf und möchte mir die Seite ansehen, dann bekomme ich immer folgende Fehler:

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 27

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 27

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 28

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 28

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 29

Notice: Undefined variable: aktion in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 29

Notice: Use of undefined constant VISIBLE_MODE - assumed 'VISIBLE_MODE' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 31

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 32

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 33

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 39

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 39

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 40

Notice: Undefined variable: db in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 44

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 44
error while reading article datas
Jetzt habe ich mir die Datei mal angesehen und festgestellt, dass alle Variablen die mit define() gebildet werden nicht funktionieren.
Gibt es da einen Trick, oder muss man diese Werte anders festlegen?

Ich habe es jetzt schon auf mehreren Systemen versucht, allerdings immer Apache mit PHP und MySQL, was mir jedoch überhaupt nicht weiterhilft.

Das Error Reporting Level runtersetzen bringt nur, dass ich zwar weniger Fehlermeldungen erhalte, dafür aber trotzdem keine laufende Seite habe.

Wenn mir da jemand weiterhelfen könnte, dann wäre das klasse, denn so langsam wird es knapp, denn ich habe PHPWCMS empfohlen, statt MicrosoftCMS und nun sitze ich hier in der Patsche.

Danke schon mal im Voraus!

Ciao
Keules

Ciao
Keules
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

Hi

reality seams to go like this:

http://www.phpwcms.de/forum/viewtopic.p ... is+problem

no good news ....
Keules
Posts: 80
Joined: Tue 2. Mar 2004, 17:06
Location: Hamburg

Post by Keules »

Hi!

Ich kann nicht auf einen Apache umsteigen, da beireits andere System auf diesem Server laufen, wenn es so einfach wäre, dann hätte ich schon längst umgesattelt. Ich bin leider an den IIS gebunden, Firmenpolitik, daher kann ich keinen anderen Webserver einsetzen.

Danke aber trotzdem. Hat jemand weitere Tipps?

Ich habe auch schon im Forum gesucht, jedoch immer nur Verweise auf Xamp gefunden,was mir jedoch nichts bringt.

Könnte man denn vielleicht Apache und IIS 6 nebeneinander laufen lassen, ohne die anderen Auftritte und Projekte zu stören?

Wie funktioniert das aber dann mit dem Localhost?

Ciao
Keules
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi Keules,

1. Beide Webserver parallel würde ich nicht unbedingt machen. Sollte aber theor. funktionieren.
2. Hast du ein db_prepend angelegt?
3. Findet das System die conf.inc.php im Frontend? Könnte an tieferen Rechten liegen - php.ini
4. Was wird im Frontend angezeigt, gar keine Ausgabe oder nur Fehler?
5. Die Datenbank füllt sich im Backend ohne Probleme?
6. Rufe bitte einmal die Seite direkt aus dem Backend auf unter Artikelzentrale.
7. Welche Version von phpWCMS ist installiert?
- 14.12.05 mit Minimalpatch?
- 27.04.06 full vom 27/28.04 oder später (Die heißt immer noch so)?

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Keules
Posts: 80
Joined: Tue 2. Mar 2004, 17:06
Location: Hamburg

Post by Keules »

Hi!

Also ich habe die letzte bekannte 1.2.5 Version installiert.

db_prepend habe ich angelegt und das scheint er auch bis zu dieser SQL Abfrage zu nehmen, ab dann zeigt er an, dass die Variablen

DB_PREPEND
$aktion
$db

nicht definiert sind.

In das Backend komme ich ja Problemlos rein, nur nicht in die Seitenansicht, also wenn ich die Internetseite ganz normal aufrufen möchte.

Ich habe auch schon das DB-Prepend selbst noch einmal definiert, also direkt vor diese Abfrage gesetzt, was aber die Probleme mit
den Variablen

$aktion und $db nicht löst.

Ich komm da wirklich in teufels Küche und ich werde wohl die halbe Nacht noch dran sitzen, morgen nachmittag muss alles stehen, inkl. Korrekturlesen.

Danke!
Für weitere Tips bin ich sehr dankbar.

Ciao
Keules
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Was passiert wenn du die Seite aus dem Backend aufrufst über die Artikelzentrale?

Schildere das Problem bitte auch kurz in engl. Die Jungs sind alle wach.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Keules
Posts: 80
Joined: Tue 2. Mar 2004, 17:06
Location: Hamburg

Post by Keules »

Hallo !

Backend funktioniert nur mit Auflistung der Stuktur und der Artikel. Sobald ich einen Artikel bearbeiten möchte bekomme ich auch nur Fehlermeldungen wie schon geschrieben nur mit anderen Variablen.

Wenn ich das SQL ausgeben lasse in der Datei content.article.inc.php, dann bekomme ich folgendes ausgegeben:

SELECT *, UNIX_TIMESTAMP(article_tstamp) AS article_date FROM DB_PREPENDphpwcms_article LEFT JOIN DB_PREPENDphpwcms_articlecat ON DB_PREPENDphpwcms_article.article_cid=DB_PREPENDphpwcms_articlecat.acat_id WHERE DB_PREPENDphpwcms_article.article_id= AND DB_PREPENDphpwcms_article.article_public=1 AND DB_PREPENDphpwcms_article.article_aktiv=1 AND DB_PREPENDphpwcms_article.article_deleted=0 AND DB_PREPENDphpwcms_article.article_begin < NOW() AND DB_PREPENDphpwcms_article.article_end > NOW() LIMIT 1;

Daran sieht man, dass das DB_PREPEND nicht korrekt gebildet wird und auch die Variable $aktion (phpwcms_article.article_id= die ruft den richtigen Artikel auf) leer bleibt.

Die Datenbankverbindung selbst kommt da auch nicht zustande.

Überall in Google lese ich nur, es liegt an Fehlerhafter programmierung, aber das glaube ich nicht.

Auch das Error Reporting level löst nur das Symptom, aber nicht die Ursache.

In Englisch das alles zu schreiben, fällt mir etwas schwer, da ich dieser Sprache leider nicht so mächtig bin.

Danke schon mal im Voraus.

Ciao
Keules
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

My translation

Hi at all,

The V1.2.5 I have installed at an IIS 6 with PHP and MySQL.
So far login is ok and backend works in a small way.
Listing of articles and structure are ok, but editing an article the following error is produced.

A switch to the frontend the same error is reported:
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 27
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 27
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 28
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 28
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 29
Notice: Undefined variable: aktion in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 29
Notice: Use of undefined constant VISIBLE_MODE - assumed 'VISIBLE_MODE' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 31
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 32
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 33
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 39
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 39
Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 40
Notice: Undefined variable: db in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 44
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 44
error while reading article datas
I have a look into the content.article.inc.php and find out, that the define() function building the variable don´t work.
A test on an Apache/PHP/MySQL -system works well.

The following error is produced for an output of SQL from the file content.article.inc.php:

ELECT *, UNIX_TIMESTAMP(article_tstamp) AS article_date FROM DB_PREPENDphpwcms_article LEFT JOIN DB_PREPENDphpwcms_articlecat ON DB_PREPENDphpwcms_article.article_cid=DB_PREPENDphpwcms_articlecat.acat_id WHERE DB_PREPENDphpwcms_article.article_id= AND DB_PREPENDphpwcms_article.article_public=1 AND DB_PREPENDphpwcms_article.article_aktiv=1 AND DB_PREPENDphpwcms_article.article_deleted=0 AND DB_PREPENDphpwcms_article.article_begin < NOW() AND DB_PREPENDphpwcms_article.article_end > NOW() LIMIT 1;

Daran sieht man, dass das DB_PREPEND nicht korrekt gebildet wird und auch die Variable $aktion (phpwcms_article.article_id= die ruft den richtigen Artikel auf) leer bleibt.

The DB_PREPEND isn´t build accurately and the variable $aktion (phpwcms_article.article_id= (calling the right article) remains empty.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Notice: Use of undefined constant DB_PREPEND - assumed 'DB_PREPEND' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 27

Notice: Undefined variable: aktion in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 29

Notice: Use of undefined constant VISIBLE_MODE - assumed 'VISIBLE_MODE' in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 31

Notice: Undefined variable: db in D:\Webs\CMS\include\inc_front\content.article.inc.php on line 44
I'll assume you have already tried replacing "content.article.inc.php" with a fresh copy (in case of corruption)?
It doesn't look like just a concatenation problem with DB_PREPEND constant... because $aktion and VISIBLE MODE are failing too.
Running IIS as ISAPI or CGI makes for differences and MANY settings in PHP.INI also have effects that differ from Apache.

Some PHP.INI settings that might be affecting things:

-register_globals boolean
Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables.

-variables_order string
Set the order of the EGPCS (Environment, GET, POST, Cookie, Server) variable parsing. The default setting of this directive is "EGPCS". Setting this to "GP", for example, will cause PHP to completely ignore environment variables, cookies and server variables, and to overwrite any GET method variables with POST-method variables of the same name.

-auto_globals_jit boolean
When enabled, the SERVER and ENV variables are created when they're first used (Just In Time) instead of when the script starts. If these variables are not used within a script, having this directive on will result in a performance gain.

My guess is that PHP on IIS is a "mixed-bag" of tricks to get working just right!
Keules
Posts: 80
Joined: Tue 2. Mar 2004, 17:06
Location: Hamburg

Lösung gefunden!

Post by Keules »

Hallo! Danke für die ganze Hilfe, der letzte Beitrag hat geholfen!

Vielen dank auch noch einmal an flip-flop der so nett übersetzt hat :) !


Thanks a lot!

Ciao
Keules
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi Keules,

in solchen Fällen solltest du auch mal deine PN abrufen. Kann nie schaden und ist einstellbar.

- Und bedanke dich besser bei DeXXus.

Gruß Knut
Last edited by flip-flop on Wed 24. May 2006, 18:32, edited 1 time in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Has this been solved? If so, what was the culprit? It would help others who come to this thread later if any solutions are documeted... Thanks!
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi DeXXus,

YES it has been solved.
At this time he hasn´t talk about the solution.
But if he do so I will translate it.

My very special thanks to you. :D

Greetings Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

flip-flop wrote:Hi DeXXus,

YES it has been solved.
At this time he hasn´t talk about the solution.
But if he do so I will translate it.

My very special thanks to you. :D

Greetings Knut
Same sentiments BACK AT YA! :P
Your HARD work is the ULTIMATE model for this forum. 8)
Post Reply