phpmyfaq1.5.0rc1 with MS SQL

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

phpmyfaq1.5.0rc1 with MS SQL

Post by nanor »

Hi,

I have a problem with phpmyfaq v1.5.0rc1.

My system:
PHP v5.0.3
IIS
SQL Server 2000

When I go to the installer.php page, I fill all the fields and when I clic Valid I get this message:

Parse error: syntax error, unexpected ':' in D:\Data\www\phpmyfaq1.5.0rc1\inc\mssql.php on line 302

Do you know where it comes from?

Thanks.

Ronan
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Ronan,

thanks for testing!!! I do not have access to a MS SQL Server and I wrote the MS SQL support blind.

Line 302 in inc/mssql.php should be:

Code: Select all

$where = $field."='".addslashes($data)."'";
It would be really really great if you could test it once again and report bugs.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

Post by nanor »

Hi,

I made the change you told me to do and It still doesn't work. I get this message (with no explanations)

Code: Select all

| 

Error: Please install your version of phpMyFAQ once again or send us a bug report.
DB error: 
Do you have an idea of the problem?

Ronan

PS: I'm ok to test the script with MS SQL because I need phpmyfaq to work on this DB.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay. I'll check the DB class for MS SQL once again and I'll send you a fixed version.

Thanks for helping!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

Post by nanor »

Hi!

I've tried the patch you've sent to my email and now I get this message.

Code: Select all

| 

Error: Please install your version of phpMyFAQ once again or send us a bug report.
DB error: 0
I've tried the script on 2 different SQL Server and I have the same result.

Thank you for your help.

Ronan
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the problem is: What is the DB error 0? :-)

Do you have any logs during the installation?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

Post by nanor »

Hi Thorsten,

I've made a log with sql server and this is what it does:

Code: Select all

CREATE TABLE  faq_faquser (
id integer NOT NULL,
name varchar(64) NOT NULL,
pass varchar(64)  NOT NULL,
realname varchar(255) DEFAULT '',
email varchar(255) DEFAULT '',
rights varchar(255) NOT NULL,
PRIMARY KEY (id))
go
SELECT @@ERROR AS ErrorCode
go
DROP TABLE faq_faqadminlog
go
DROP TABLE faq_faqadminsessions
go
DROP TABLE faq_faqcategories
go
DROP TABLE faq_faqcategoryrelations
go
DROP TABLE faq_faqchanges
go
DROP TABLE faq_faqcomments
go
DROP TABLE faq_faqdata
go
DROP TABLE faq_faqfragen
go
DROP TABLE faq_faqnews
go
DROP TABLE faq_faqvoting
go
DROP TABLE faq_faqsessions
go
DROP TABLE faq_faquser
go
DROP TABLE faq_faqvisits
go
Ronan
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Ronan,

is it possible to create the following table by hand?

Code: Select all

CREATE TABLE  faq_faquser (
id integer NOT NULL,
name varchar(64) NOT NULL,
pass varchar(64)  NOT NULL,
realname varchar(255) DEFAULT '',
email varchar(255) DEFAULT '',
rights varchar(255) NOT NULL,
PRIMARY KEY (id))
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

Post by nanor »

Hi,

Yes it is possible. I did it by hand and it worked.
Do you think there are other traces that could be more explicit?

Ronan
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay, that's good.

What I wanted to know is now, what happens, when you're creating a table and then set the following SQL query:

Code: Select all

SELECT @@ERROR AS ErrorCode
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

Post by nanor »

Hi!

When I do this...

Code: Select all

CREATE TABLE  faq_faquser ( 
id integer NOT NULL, 
name varchar(64) NOT NULL, 
pass varchar(64)  NOT NULL, 
realname varchar(255) DEFAULT '', 
email varchar(255) DEFAULT '', 
rights varchar(255) NOT NULL, 
PRIMARY KEY (id)) 
go 
SELECT @@ERROR AS ErrorCode 
... it creates the table faq_faquser
and it gives me this result:

Image

I don't know what it means.

Ronan
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay, ErrorCode == 0 is no error. Thanks, Microsoft. I'll fix this in the MS SQL class and send you a copy.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

Post by nanor »

Hi Torsten,

When you have time, can you send me a fix for MS SQL ?

I'm also using PHPMYFAQ with mysql and it works great!

Thank you.

Ronan
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

these fixes are in the RC3 release from yesterday.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
nanor
Posts: 12
Joined: Fri Feb 25, 2005 5:06 pm

Post by nanor »

Hi Torsten,

I've tried the rc3 and still have the same message.
Again I have made a trace on the SQL server to see what it does.
I'm wondering if it is not something about the selection of the database. Indeed I don't see anywhere in this trace the BD name. What do you think?
Ronan

Code: Select all

Audit Login	-- network protocol: TCP/IP
set quoted_identifier off
set implicit_transactions off
set cursor_close_on_commit off
set ansi_warnings off
set ansi_padding off
set ansi_nulls off
set concat_null_yields_null off
set language us_english
set dateformat mdy
set datefirst 7
	PHP 5	$jnchiamulera	sa					2868	60	2005-03-21 18:19:32.080	
SQL:BatchCompleted	exec sp_server_info 18	PHP 5	$jnchiamulera	sa	0	2	0	0	2868	60	2005-03-21 18:19:32.080	
SQL:BatchCompleted	CREATE TABLE  faq_faquser (
id integer NOT NULL,
name varchar(64) NOT NULL,
pass varchar(64)  NOT NULL,
realname varchar(255) DEFAULT '',
email varchar(255) DEFAULT '',
rights varchar(255) NOT NULL,
PRIMARY KEY (id))	PHP 5	$jnchiamulera	sa	0	115	5	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	SELECT @@ERROR AS ErrorCode	PHP 5	$jnchiamulera	sa	0	0	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqadminlog	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqadminsessions	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqcategories	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqcategoryrelations	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqchanges	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqcomments	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqdata	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqfragen	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqnews	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.113	
SQL:BatchCompleted	DROP TABLE faq_faqvoting	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.130	
SQL:BatchCompleted	DROP TABLE faq_faqsessions	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.130	
SQL:BatchCompleted	DROP TABLE faq_faquser	PHP 5	$jnchiamulera	sa	0	167	0	46	2868	60	2005-03-21 18:19:32.130	
SQL:BatchCompleted	DROP TABLE faq_faqvisits	PHP 5	$jnchiamulera	sa	0	8	0	0	2868	60	2005-03-21 18:19:32.177	
Audit Logout		PHP 5	$jnchiamulera	sa	0	390	5	96	2868	60	2005-03-21 18:19:32.080
Post Reply