1.0.0a2 upgrade.php on Solaris

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
ibirrer
Posts: 4
Joined: 10 May 2005, 14:38

1.0.0a2 upgrade.php on Solaris

Post by ibirrer »

Hello,

When I try to run the upgrade.php on solaris I get the following error message:

Warning: main(): Unable to access ./core.php in ./upgrade_inc.php on line 14

Warning: main(./core.php): failed to open stream: No such file or directory in ./upgrade_inc.php on line 14

Fatal error: main(): Failed opening required './core.php' (include_path='.:/home/ifaweb/lib/php_includes:') in ./upgrade_inc.php on line 14

It seems to be related to the following php bug:
http://bugs.php.net/bug.php?id=13936

Thanks for any help!
Iwan
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

Can you please file this as a bug in the tracker at http://bugs.mantisbt.org/ ?
ibirrer
Posts: 4
Joined: 10 May 2005, 14:38

Post by ibirrer »

thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post by thraxisp »

Thanks. I'm not sure what we can do about this. There are many places where we need to find files relative to the absolute path root of the installation. The use of __FILE__ needs to work.

Could you check to see if "<?php echo $_SERVER["SCRIPT_FILENAME"] ?>" returns the absolute path of the test file?
ibirrer
Posts: 4
Joined: 10 May 2005, 14:38

__FILE__

Post by ibirrer »

<?php echo $_SERVER["SCRIPT_FILENAME"] ?> returns the absolute path correctly. However if I replace __FILE__ in upgrade_inc.php another error occurs:

Fatal error: Cannot redeclare php_version_at_least() (previously declared in /home/ceg/public_html/mantis_new/core/php_api.php:22) in ../core/php_api.php on line 22


P.S version 0.19.2 of mantis works without problems
ibirrer
Posts: 4
Joined: 10 May 2005, 14:38

some more infos

Post by ibirrer »

One more note:

If I use __FILE__ in an included file it returns the relative path if it is used directly in the processed php file it returns the absolute path.

Comments in http://ch2.php.net/constants also say that different versions of php return either the absolute or relative path to the script file.

So this is probably not only a problem on solaris.
Post Reply