Some adjustments: will it eventually screw up phpWCMS?

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
bartve
Posts: 14
Joined: Sat 14. May 2005, 15:20
Location: Nijmegen, Netherlands

Some adjustments: will it eventually screw up phpWCMS?

Post by bartve »

Hi,

after a long absence on the phpWCMS front I installed v 1.3.3 yesterday but that left me with some doubts/questions.

Our university webserver is of the Win NT /IIS variety, the main site is http://www.let.ru.nl/ but I have phpWCMS installed in the subdirectory aikcms, so the URL is http://www.let.ru.nl/aikcms.

Because $_SERVER['DOCUMENT_ROOT'] does not give the right value in PHP (IIS problem?) I had to fill in the correct value for DOC_root in the paths section of the installation process (which is D:\WWW_root\users\aikcms\wwwdocs, I specified nothing for the 'root' value, according to what I found on the forums).
This way I got the maximum of green bars for all the subdirectories of phpWCMS (template, content, etc.) during installation, but I got a 404 error after the login screen. The URL listed in the addres bar of my browser showed

http://www.let.ru.nl/phpwcms.php?PHPSES ... iq0clk5sr2

clearly the subdirectory 'aikcms' was missing in the URL. To fix this I changed line 82 in \include\inc_lib\default.inc.php to
define ('PHPWCMS_URL', $phpwcms["site"]."aikcms/");

That seemed to fix that problem, but on the home page of the backend there was an error message saying that version information could not be displayed because there was no connection with the phpWCMS server. I did not see a way to tackle that problem but I turned version check off in conf.inc.php. Obviously that only cured the symptom, the underlying (unidentified?) problem remains.

Having done all this I can navigate around the backend, but I got the feeling not everything is working ok, for example creating a new user delivers the message 'error while creating new user'.

So any help or tip is much appreciated, especially what I should do during installation tot get things right without tweaking the source code,

many thanks in advance,

Bart
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Code: Select all

$phpwcms['site']              = 'http://www.let.ru.nl/aikcms/';
$phpwcms['DOC_ROOT']          = 'D:/WWW_root/users/aikcms/wwwdocs';
$phpwcms['root']              = '';
Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
bartve
Posts: 14
Joined: Sat 14. May 2005, 15:20
Location: Nijmegen, Netherlands

Post by bartve »

Hello Oliver,

many thanks for your help. I started a fresh new install and the green bars showed up with no problem but I still can't add a new user ('error while creating new user'), and also the version information on the home page of the backend doesn't show up (not connecting with the phpWCMS server).
Could you (or someone else) help me out here?

Many thanks again,

Bart

PS: it sure is a very exiting time to be back on the phpWCMS trail again, with the updates following each other and growing in meaningful functionality. Many thanks for all your efforts!

Oliver Georgi wrote:

Code: Select all

$phpwcms['site']              = 'http://www.let.ru.nl/aikcms/';
$phpwcms['DOC_ROOT']          = 'D:/WWW_root/users/aikcms/wwwdocs';
$phpwcms['root']              = '';
Oliver
bartve
Posts: 14
Joined: Sat 14. May 2005, 15:20
Location: Nijmegen, Netherlands

Post by bartve »

sorry for this little kick, but I'm still experiencing the 'error while creating new user' error and no version information due to no connection with the phpWCMS server. I have searched the forums all the way up and down, and can't find a solution, so if anyone could help me out it would mean a lot to me ...

many thanks,

Bart
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

bartve wrote:sorry for this little kick, but I'm still experiencing the 'error while creating new user' error
It's hard to tell. There are many "little" inconsistencies between Apache and IIS, that could be at work here (causing this). That error checking is done in the first part of "include/inc_tmpl/admin.newuser.tmpl" and the error message comes from this line:

Code: Select all

if(mysql_query($sql, $db) or die('error while creating new user')) { 
I would suggest you start by ~temporarily~ turning on all PHP notices, warnings and errors (via "php.ini") to see if any additional messages are shown.
bartve wrote:...and no version information due to no connection with the phpWCMS server.
It ~may~ be that your IIS is not reporting (or reporting incompatibly) the $_SERVER['REQUEST_URI'] variable that is used for version checking:

"/include/inc_lib/backend.functions.inc.php"

Code: Select all

if ($fsock = @fsockopen('www.phpwcms.de', 80, $errno, $errstr, 10))	{

		$identify = '?version='.rawurlencode($phpwcms["release"].'-'.str_replace('/', '', $phpwcms["release_date"])).'&hash='.md5($_SERVER['REQUEST_URI']);
	
		@fputs($fsock, "GET /versioncheck/phpwcms_releaseinfo.txt".$identify." HTTP/1.1\r\n");
		@fputs($fsock, "HOST: www.phpwcms.de\r\n");
		@fputs($fsock, "Connection: close\r\n\r\n");
If this is the problem... maybe this is worth a try:

http://neosmart.net/blog/2006/100-apach ... d-windows/
Last edited by DeXXus on Wed 30. May 2007, 10:44, edited 1 time in total.
bartve
Posts: 14
Joined: Sat 14. May 2005, 15:20
Location: Nijmegen, Netherlands

Post by bartve »

Hi DeXXus,

many thanks for your help, it gives me something to work on. But maybe I should convince the IT-guy at work to move over to Apache ...

thanks again,

Bart
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Normally there is no problem using IIS - I do the same each day (Apache too). The only thing is the missing DOCUMENT_ROOT.

You can also try to use this:

Code: Select all

$phpwcms['DOC_ROOT']          = dirname(dirname(__FILE__));

Your Firewall blocks remote calls from webserver - that's why you will get no response regarding version info. Disable setting in config:

Code: Select all

$phpwcms['version_check'] = 0;
And yes - ask your admin...

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
bartve
Posts: 14
Joined: Sat 14. May 2005, 15:20
Location: Nijmegen, Netherlands

Post by bartve »

Hi Oliver,

many thanks: your 'dirname(__FILE__)' tip did solve the 'error while creating new user'! I can now create new users in phpWCMS, now I must be off, building a website ;-) (after I made a donation for the may campaign)

thanks again,

Bart
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

fine :)
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
bartve
Posts: 14
Joined: Sat 14. May 2005, 15:20
Location: Nijmegen, Netherlands

Post by bartve »

A little update: Oliver's tip worked, but exactly one time! I changed the line in conf.inc.php, logged in as admin and added an user. But the next time I could not log in, I only saw a blank page, so I changed the line back to
$phpwcms['DOC_ROOT'] = 'D:/WWW_root/users/aikcms/wwwdocs';
Next I logged in but strange enough I was now also able to add users! I sure don't get it, but maybe you do?

Bart
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

this sounds like session problems.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
bartve
Posts: 14
Joined: Sat 14. May 2005, 15:20
Location: Nijmegen, Netherlands

Post by bartve »

After I assured the IT-guy at work that something evil would happen to him if he didn't move to Apache ASAP, he did some research into the matter.
According to him it was a MySQL v 5 issue: MySQL is standard installed with the 'STRICT' option on, which means when a field gets a DEFAULT VALUE of NOT NULL nothing gets written at all. Anyway, he turned the STRICT option off for MySQL and everything seems to work fine.
But the IT-guy strikes back: in his opinion the cause of the problem is the sloppy database design of phpWCMS (his words, not mine! ;-).
I hope I translated everything good enough for it to make some sense,

Bart
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

yeah, yeah - STRICT is shit (sorry).

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply