PDA

View Full Version : PHP5/ MYSQL4 APACHE2 WINDOWS PARSE - clone problem


smorosanu
09-06-04, 07:48 PM
Parse problemm:

Parse error: parse error, unexpected T_CLONE, expecting T_STRING in C:\sorin\install\apache\Apache2\htdocs\dotproject\ classes\dp.class.php on line 98

any sugestions?
It is possible that the fact that I use php5 culd be the problemm?...
best regards,
sorin

smorosanu
09-06-04, 08:20 PM
I comment => function clone()
/*function clone() {
$_key = $this->_tbl_key;

$newObj = $this;
// blanking the primary key to ensure that's a new record
$newObj->$_key = '';

return $newObj;
}
*/

and until now things are ok.

ajdonnison
10-06-04, 08:48 AM
Yes, clone is now a reserved word in PHP5, so the above function will not work. You could rename the function to dpclone and find all references to clone() in other parts of the code and change them as well.

jirzji
17-07-04, 11:48 AM
Yes, clone is now a reserved word in PHP5, so the above function will not work. You could rename the function to dpclone and find all references to clone() in other parts of the code and change them as well.

got the same thing after my hosting provider installed a PHP upgrade, supposedly PHP5.
commenting the clone() function is not enough, since you'll run into problems in other modules.

the only other place to rename the function seems to be modules\tasks\tasks.class.php.
there is already a workaround for PHP5 forward compatibility in Span.php.

now i must add that after making these changes, the company page displays an empty company list and both projects and task pages stay white (no page contents) in the browser.
e.g. if taking the company page ... remarkably the links under the tabs loose their relative reference (thus hyperlinking as /tab=1 ... /tab=7) resulting in a wrong jump (404 page).
i don't posses thorough code knowledge here, so i'll dig into this a little further, and any suggestions are welcome.

wondering if there will be some sort of dotproject fix release for this?

all the best, J.

Karen
19-07-04, 10:17 AM
There will be no dotProject release for PHP5 in the foreseeable future. We're waiting for PHP5 release, stablisation and general acceptance and besides that we're currently working on permissions which is of much more importance than chasing PHP releases.

Karen C

eman
21-07-04, 07:27 AM
Getting dotProject working with PHP5 can be done with three little changes:

1) dotProject/classes/db.class.php line 98
Change the method name "clone" to "clonePHP4" or something else.
2) dotProject/modules/tasks/tasks.class.php line 165
Change the method name from "clone" to "clonePHP4" or whatever you renamed it to.
3) dotProject/classes/ui.class.php line 647
Rename the constructor name from "CTabBox" to "CTabBox_core"

That's all it takes! I hope that I didn't miss anything... Try it out.

Karen
21-07-04, 08:54 AM
Thanks for the suggestion BUT I REITERATE - no plans for PHP 5 in the immediate future - we're working on permissions.

Karen C