You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi Guys,
I have a longstanding problem with CCP6 which I think is preventing further custom development.
When attempting to import a .csv file in raw database admin I get the following error:
Fatal error: Cannot use object of type KHXCerror as array in D:\khxc-private\core\KHXC_BackEnd\ext\rawdb.php on line 3251
Can anybody help with this please? Even a suggestion would be helpful. Surely someone must have come across this before. It happened straight after install so it's not as though any changes I've made are causing it.
I'm sure I'm going to be told that moving to CCP7 is the best option but I've paid for a fair amount of custom development on CCP6, some of which still hasn't been completed, and had a huge amount of headaches - I don't want this to be wasted money or time/effort.
Cheers
H
Last edited by RobH (07-22-2009 10:53:11)
Offline
I am having similar issues. heres my post:
https://forum.kryptronic.com/viewtopic.php?id=24910
Offline
Rob, try modifying rawdb.php and add the following at line 3250 in that file and see exactly what the error is:
if ($this->IsError($csvdata)) { print_r($csvdata); exit; }
The result after modification should be ... starting at line 3249:
'headfirst' => 1)); if ($this->IsError($csvdata)) { print_r($csvdata); exit; } if ((empty($csvdata)) || (empty($csvdata['headers']))) {$error = 1;}
Offline
Hi Dave, thanks for your input, hopefully this will mean more to you than it does to me:
KHXCerror Object ( [class] => KHXCerror [version] => 6.6.0 [message] => The parsecsv() function in the KHXC_File class was unable to locate the file requested. File: C:/WINDOWS/Temp/php1A0F.tmp )
I can confirm that the file referenced does not exist at the time I checked (php1A0F.tmp).
garykva, what version of SQL are you using? Just trying to rule this out as the problem...
Cheers
H
Offline
That means there was a problem uploading the file and it could be the result of permissions (especially since you're on a Windows box) or an out of disk condition. I'd suspect the first situation as the most likely cause. The web server process would need complete (world) control of the temp directory to be able to write files to the temp directory.
As a result of what you've experienced additional error checking will be done at the point where you ran into the error in V7 so it provides the error information you are seeing with the change you made.
Offline
Hi Dave.
You are correct! I've set permissions on the temp folder and was then able to successfully upload to the database!! I'm pretty sure there's no reference to doing this in the setup notes though....
Hoping this will resolve my other issues now, or at least give me a clue how to resolve them ;-)
Thanks Dave, invaluable input!
H
Offline
There wouldn't be anything in the notes Rob since a correctly configured server would have the permissions for the temp directory defined for PHP correct. It's not something a end user should need to know or worry about. It's compounded by the fact that you're using a Windows server
Offline