XAMPP Regi Seite Problem

05/05/2011 20:32 Sharumi#1
Hai,

ich hab derzeit ein blödes Problem und zwar hab ich XAMPP und wollte mir für meinen Flyff Pserver eine regi Seite machen.

Es ist alles richtig eingestellt und ich habe XAMPP 1.7.3 doch wenn ich auf die regi seite zugreifen will kommt:

"Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\register.php on line 93"

Kann mir jemd sagen was ich da falsch gemacht habe? Ggf. helfen?

Wäre echt nett ;)

lg Sharumi
05/05/2011 20:35 .Tear#2
es wäre von vorteil, wenn du uns die Zeile gibst.

und hast du MSSQL in Xampp Aktiviert?
05/05/2011 20:36 xanatoro#3
Du nennst dich Developer? ^^ (nich böse gemeint)

Heist so viel wie du hast ein überflüssiges zeichen z.b (a ') usw.

Poste mal am besten den Abschnitt.

lg ich
05/05/2011 20:38 Sharumi#4
Quote:
es wäre von vorteil, wenn du uns die Zeile gibst.
ähm hab ich doch reingeschrieben

-> "Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\register.php on line 93"

oder was meinst du?

Quote:
und hast du MSSQL in Xampp Aktiviert?
klar ist Apache im Control Panel an
außerdem hab ich in der php.txt vor allen sachen mit mssql das ; weggemacht
05/05/2011 20:40 xanatoro#5
@Sharumi
Die Zeile 93 in der register.php.

lg ich
05/05/2011 20:42 Sharumi#6
ähm hab eben eine andere regi page getest jetzt kommt der andere error nicht wenn ich jedoch einen accout erstellen will und auf "erstellen" klicke kommt stattdessen:

Quote:
Warning: mssql_execute() [function.mssql-execute]: message: Die gespeicherte Prozedur 'webCreateAcc' wurde nicht gefunden. (severity 16) in C:\xampp\htdocs\FlyffWeb\register.php on line 47

Warning: mssql_execute() [function.mssql-execute]: stored procedure execution failed in C:\xampp\htdocs\FlyffWeb\register.php on line 47
Something is wrong on the execution
muss wohl noch ein script in mssql ausführen oder?
05/05/2011 20:43 Pumbaaa#7
1. php.ini
2. brauchen wir die Zeile 93 von der Register.php oder nen ganzen Ausschnitt vom Code um den Fehler festzustellen...
05/05/2011 20:44 xanatoro#8
führ mal die prozdure aus:

Code:
USE [ACCOUNT_DBF]
GO
/****** Object:  StoredProcedure [dbo].[webCreateAcc]    Script Date: 08/17/2009 21:30:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[webCreateAcc] 
	@account 	VARCHAR(15),
	@password 	VARCHAR(36),
	@email		VARCHAR(120)

AS

SET NOCOUNT  ON

DECLARE @DateActivated AS CHAR(8)

IF NOT EXISTS (SELECT account FROM ACCOUNT_TBL WHERE account = @account) BEGIN
	INSERT INTO ACCOUNT_TBL (account, [password], id_no2, isuse, member, realname) 
		VALUES (@account, @password, @password, 'T', 'A', 'F')

	SET @DateActivated =  CONVERT(CHAR(8), GETDATE()-1, 112 ) --Is the date today - 1
	--UPDATE ACCOUNT_TBL_DETAIL SET BlockTime = @DateYesterday WHERE account = @userid		
	--INSERT INTO ACCOUNT_TBL_DETAIL (account, gamecode, tester, m_chLoginAuthority, regdate, BlockTime, EndTime, WebTime, isuse)
	--	VALUES (@account, 'A000', '2', 'F', GETDATE(), '20990101', '20990101', '20050101', 'O')

	INSERT INTO ACCOUNT_TBL_DETAIL (account, gamecode, tester, m_chLoginAuthority, regdate, BlockTime, EndTime, WebTime, isuse, email)
		VALUES (@account, 'A000', '2', 'F', GETDATE(), @DateActivated, '20990101', '20050101', 'O', @email)

END
--ELSE BEGIN
--print '->Account exists = ' 
--print @account 
--END
lg ich
05/05/2011 20:47 Sharumi#9
danke dir xanatoro


"Dein Account wurde erfolgreich erstellt." ;) *grins*
05/05/2011 20:50 Pumbaaa#10
Code:
<?php
 $ip = $_SERVER['REMOTE_ADDR'];
 $time = date("l dS of F Y h:i:s A");
 $script = $_SERVER[PATH_TRANSLATED];
 $fp = fopen ("[WEB]SQL_Injection.txt", "a+");
 $sql_inject_1 = array(";","'","%",'"'); #Whoth need replace
 $sql_inject_2 = array("", "","","""); #To wont replace
 $GET_KEY = array_keys($_GET); #array keys from $_GET
 $POST_KEY = array_keys($_POST); #array keys from $_POST
 $COOKIE_KEY = array_keys($_COOKIE); #array keys from $_COOKIE
 /*begin clear $_GET */
 for($i=0;$i<count($GET_KEY);$i++)
 {
 $real_get[$i] = $_GET[$GET_KEY[$i]];
 $_GET[$GET_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, HtmlSpecialChars($_GET[$GET_KEY[$i]]));
 if($real_get[$i] != $_GET[$GET_KEY[$i]])
 {
 fwrite ($fp, "IP: $ip\r\n");
 fwrite ($fp, "Method: GET\r\n");
 fwrite ($fp, "Value: $real_get[$i]\r\n");
 fwrite ($fp, "Script: $script\r\n");
 fwrite ($fp, "Time: $time\r\n");
 fwrite ($fp, "==================================\r\n");
 }
 }
 /*end clear $_GET */
 /*begin clear $_POST */
 for($i=0;$i<count($POST_KEY);$i++)
 {
 $real_post[$i] = $_POST[$POST_KEY[$i]];
 $_POST[$POST_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, HtmlSpecialChars($_POST[$POST_KEY[$i]]));
 if($real_post[$i] != $_POST[$POST_KEY[$i]])
 {
 fwrite ($fp, "IP: $ip\r\n");
 fwrite ($fp, "Method: POST\r\n");
 fwrite ($fp, "Value: $real_post[$i]\r\n");
 fwrite ($fp, "Script: $script\r\n");
 fwrite ($fp, "Time: $time\r\n");
 fwrite ($fp, "==================================\r\n");
 }
 }
 /*end clear $_POST */
 /*begin clear $_COOKIE */
 for($i=0;$i<count($COOKIE_KEY);$i++)
 {
 $real_cookie[$i] = $_COOKIE[$COOKIE_KEY[$i]];
 $_COOKIE[$COOKIE_KEY[$i]] = str_replace($sql_inject_1, $sql_inject_2, HtmlSpecialChars($_COOKIE[$COOKIE_KEY[$i]]));
 if($real_cookie[$i] != $_COOKIE[$COOKIE_KEY[$i]])
 {
 fwrite ($fp, "IP: $ip\r\n");
 fwrite ($fp, "Method: COOKIE\r\n");
 fwrite ($fp, "Value: $real_cookie[$i]\r\n");
 fwrite ($fp, "Script: $script\r\n");
 fwrite ($fp, "Time: $time\r\n");
 fwrite ($fp, "==================================\r\n");
 }
 }

 /*end clear $_COOKIE */
 fclose ($fp);
 ?>
Der Teil muss schonmal an den Anfang und nicht ans Ende der php-Datei
05/05/2011 20:54 Trafalgar†Law#11
Probier mal diese:
Register.php

reg_conf:


function.php


WebCreateAcc.Sql (In Datenbank reintun):


Ordner erstellen -> Php Editor öffnen -> das rein tun in den eingegebenen .php -> in Xampp ordner unter htdocs reintun -> configs ordner öffnen -> 2 .php editor öffnen -> und diese auch rein tun (Siehe Oben) -> Abspeichern und Xampp neustarten -> Freu Freu.
05/05/2011 21:24 Sharumi#12
leiter ist nun noch ein problem aufgekommen:

den wenn ich auf meine regi seite zugreifen will geht das nur lokal, ansonsten kommt:

Quote:
Zugriff verweigert!

Neues XAMPP Sicherheitskonzept:

Der Zugriff auf das angeforderte Objekt ist nur aus dem lokalen Netzwerk möglich.

Diese Einstellung kann in der Datei "httpd-xampp.conf" angepasst werden.


hier mal meine httpd-xampp.conf datei:

#
# XAMPP settings
#

<IfModule env_module>
SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
SetEnv MYSQL_HOME "C:\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "C:\\xampp\\php"
SetEnv PHPRC "C:\\xampp\\php"
SetEnv TMP "C:\\xampp\\tmp"
UnsetEnv PERL5LIB
</IfModule>

#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module modules/php5apache2_2.dll

<IfModule php5_module>
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>

PHPINIDir "C:/xampp/php"
</IfModule>

#
# PHP-CGI setup
#
<IfModule !php5_module>
<FilesMatch "\.php$">
SetHandler application/x-httpd-php-cgi
</FilesMatch>
<IfModule actions_module>
Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
</IfModule>
</IfModule>


<IfModule mime_module>
AddType text/html .php .phps
</IfModule>

ScriptAlias /php-cgi/ "C:/xampp/php/"
<Directory "C:/xampp/php">
AllowOverride None
Options None
Order deny,allow
Deny from all
<Files "php-cgi.exe">
Allow from all
</Files>
</Directory>

<Directory "C:/xampp/cgi-bin">
<FilesMatch "\.php$">
SetHandler cgi-script
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler None
</FilesMatch>
</Directory>

<Directory "C:/xampp/htdocs/xampp">
<IfModule php5_module>
<Files "status.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>

<IfModule alias_module>
Alias /security "C:/xampp/security/htdocs/"
<Directory "C:/xampp/security/htdocs">
<IfModule php5_module>
<Files "xamppsecurity.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>

Alias /licenses "C:/xampp/licenses/"
<Directory "C:/xampp/licenses">
Options +Indexes
<IfModule autoindex_color_module>
DirectoryIndexTextColor "#000000"
DirectoryIndexBGColor "#f8e8a0"
DirectoryIndexLinkColor "#bb3902"
DirectoryIndexVLinkColor "#bb3902"
DirectoryIndexALinkColor "#bb3902"
</IfModule>
</Directory>

Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
</Directory>

Alias /webalizer "C:/xampp/webalizer/"
<Directory "C:/xampp/webalizer">
<IfModule php5_module>
<Files "webalizer.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>
</IfModule>

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalize r|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
05/05/2011 21:45 Trafalgar†Law#13
Lösch Xampp und installiere es neu..
Quote:
[Only registered and activated users can see links. Click Here To Register...]
05/05/2011 22:47 .Tear#14
Quote:
Originally Posted by Sharumi View Post
leiter ist nun noch ein problem aufgekommen:

den wenn ich auf meine regi seite zugreifen will geht das nur lokal, ansonsten kommt:





hier mal meine httpd-xampp.conf datei:

#
# XAMPP settings
#

<IfModule env_module>
SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
SetEnv MYSQL_HOME "C:\\xampp\\mysql\\bin"
SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "C:\\xampp\\php"
SetEnv PHPRC "C:\\xampp\\php"
SetEnv TMP "C:\\xampp\\tmp"
UnsetEnv PERL5LIB
</IfModule>

#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module modules/php5apache2_2.dll

<IfModule php5_module>
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>

PHPINIDir "C:/xampp/php"
</IfModule>

#
# PHP-CGI setup
#
<IfModule !php5_module>
<FilesMatch "\.php$">
SetHandler application/x-httpd-php-cgi
</FilesMatch>
<IfModule actions_module>
Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
</IfModule>
</IfModule>


<IfModule mime_module>
AddType text/html .php .phps
</IfModule>

ScriptAlias /php-cgi/ "C:/xampp/php/"
<Directory "C:/xampp/php">
AllowOverride None
Options None
Order deny,allow
Deny from all
<Files "php-cgi.exe">
Allow from all
</Files>
</Directory>

<Directory "C:/xampp/cgi-bin">
<FilesMatch "\.php$">
SetHandler cgi-script
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler None
</FilesMatch>
</Directory>

<Directory "C:/xampp/htdocs/xampp">
<IfModule php5_module>
<Files "status.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>

<IfModule alias_module>
Alias /security "C:/xampp/security/htdocs/"
<Directory "C:/xampp/security/htdocs">
<IfModule php5_module>
<Files "xamppsecurity.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>

Alias /licenses "C:/xampp/licenses/"
<Directory "C:/xampp/licenses">
Options +Indexes
<IfModule autoindex_color_module>
DirectoryIndexTextColor "#000000"
DirectoryIndexBGColor "#f8e8a0"
DirectoryIndexLinkColor "#bb3902"
DirectoryIndexVLinkColor "#bb3902"
DirectoryIndexALinkColor "#bb3902"
</IfModule>
</Directory>

Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
</Directory>

Alias /webalizer "C:/xampp/webalizer/"
<Directory "C:/xampp/webalizer">
<IfModule php5_module>
<Files "webalizer.php">
php_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>
</IfModule>

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalize r|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
Den Rot-Markierten teil löschen und apache neu starten.

Quote:
Originally Posted by Trafalgar†Law View Post
Lösch Xampp und installiere es neu..
hat keinen sinn, das sicherheits konzept bleibt drin ;)
03/31/2012 14:35 petex99#15
ich brauche auch hilfe bei mir steht \xampp\htdocs\register.php on line 213