1
bumperscoot
Failed Writing Constant errors...

Hi All..

I've decided to scrap my 2.2.4 test site and revert back to 2.0.13.2 for various reasons. I'm running XP pro, Apache 2.0.55, PHP 5.1.2, and MySQL 5.0.

I am able to get to the Xoops/Index.php page and begin the installation.

the "Checking File and Directory Permissions.." passes without error, however, the "Saving Configuration data..." section reports the following:

File ../mainfile.php overwritten by ../mainfile.dist.php
Failed writing constant C:/Program Files/Apache Group/Apache2/htdocs/xoops.
Failed writing constant mysql.
Failed writing constant localhost.
Failed writing constant kb2hgb.
Failed writing constant 0.
Failed writing constant 2.
Failed writing constant 1.

Configuration data has been saved successfully to mainfile.php

Any ideas?
Any help would be greatly appreciated, I'm sure I'm doing something stupid... :)

Steve

2
gogy24
Re: Failed Writing Constant errors...
  • 2006/3/22 4:19

  • gogy24

  • Just popping in

  • Posts: 1

  • Since: 2006/3/22


I have exactly the same problem, any ideas or help?

3
m0nty
Re: Failed Writing Constant errors...
  • 2006/3/22 4:30

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


yeah, don't use php 5.1 there's plenty of info if you search the forums.

mysql 4/4.1 would be better too.

4
rowdie
Re: Failed Writing Constant errors...
  • 2006/3/22 7:12

  • rowdie

  • Just can't stay away

  • Posts: 846

  • Since: 2004/7/21


The installer is not fully compatible with PHP5. One simple change will fix it though...

in: /install/class/mainfilemanager.php

change:
$content fread($filefilesize($this->path) );
fclose($file);


to:
[color=CC0000]clearstatcache();[/color]
$content fread($filefilesize($this->path) );
fclose($file);

5
bumperscoot
Re: Failed Writing Constant errors...

Thanks Rowdie, I'll try this later today..
One last question..
Should I not be using 2.0.13.x?

I had been using 2.2.4, and was having a hard time with unexpected behavior with some modules. The download section does not recommend 2.2.X for production use.

Is this still the way I should go?

Thanks again,

Steve

6
Cowboy123
Re: Failed Writing Constant errors...
  • 2006/4/4 17:40

  • Cowboy123

  • Just popping in

  • Posts: 5

  • Since: 2005/8/22


Very nice. I knew it was the php5 thing but I didn't know how to fix it other than installing php4 and that could be a pain. This did the job really well the only thing that might alert people is you still get the Notices at the top of the pages (or atleast I did) I was using Apache2, MySQL 5, and PHP5 so it stands to reason I was gonna have problems with somethign written before PHP5. So if anyone gets notices after doing this fix don't worry about them they won't hinder the install process. Everything went smoothly for me after doing this. Thanks Rowdie.

Quote:

rowdie wrote:
The installer is not fully compatible with PHP5. One simple change will fix it though...

in: /install/class/mainfilemanager.php

change:
$content fread($filefilesize($this->path) );
fclose($file);


to:
[color=CC0000]clearstatcache();[/color]
$content fread($filefilesize($this->path) );
fclose($file);

7
DMarvelus
Re: Failed Writing Constant errors...
  • 2006/4/26 3:14

  • DMarvelus

  • Just popping in

  • Posts: 70

  • Since: 2005/1/29


I'm surpised this hasn't been fixed yet in the installer. PHP5 has been out for a while...

why not just put something like this in the distribution?

list($majorR, $minorR, $editR) = split('[/.-]', PHP_VERSION );

if ($majorR >=5 ) {
clearstatcache();
}


it would save people the trouble of having to find this thread.

8
phppp
Re: Failed Writing Constant errors...
  • 2006/4/26 4:17

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25



9
DMarvelus
Re: Failed Writing Constant errors...
  • 2006/4/26 8:50

  • DMarvelus

  • Just popping in

  • Posts: 70

  • Since: 2005/1/29


Quote:

ok, yes I'm happy it's been fixed in 2.2, but that's the version people are not supposed to be using.

I just downloaded 2.0.13.2 and didn't see it in there.

10
davidl2
Re: Failed Writing Constant errors...
  • 2006/4/28 14:04

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26



Login

Who's Online

326 user(s) are online (208 user(s) are browsing Support Forums)


Members: 0


Guests: 326


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits