[SOLVED] Fatal error: Call to undefined function

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

[SOLVED] Fatal error: Call to undefined function

Postby Mikeb » Sun May 30, 2010 9:41 pm

Hi, I am new to PivotX so forgive me if this is just me been 'a bit thick'.

I have used Pivot without problems, but for some sites I could do with the extra 'umph that PivotX gives me, especially the site that this test server is on.

If you go to: http://test.hannahstearooms.co.uk/news/ and scroll to the bottom of the page you can see the following error

Fatal error: Call to undefined function: memory_get_usage() in /****{CUT}****/htdocs/news/pivotx/objects.php on line 2927 (yes I know the cut bit is still visible on my server, but that's not going to be forever is it).

If you want to see the php it's at: http://test.hannahstearooms.co.uk/news/PHPinfo.php

I installed using the pivotx-install.php from this forum. I had to use 755 (not 777) to make it work and I had to place it in a folder as it wouldn't work from root. I had previously tried installing from download but have always ran into this or even worse problems. I have also tried on different servers (I have sites across 4 or 5 servers) all be it, with the same host. I can not get pivotX to work, without this error on any of them!

By the way, I'm using the latest PivotX downloaded by the script, which is PivotX - 2.0.2.

I will try upgrading to the 2.1.0 beta 7 on a different server and report back here if it fixes anything, but on manual installs it didn't.

Thanks for your help, time and efforts,

Mikeb

___________________________________________________________________________________

Ok, like I said above, I have updated from 2.0.2 to 2.1.0 beta 7 on another server, again nothing is live and again I needed to install into a directory and not root.

This time the error is
: Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /***[CUT]***/htdocs/blog/pivotx/lib.php on line 5252


I installed 2.0.2 via the installer script as above, The ftp'ed beta 7 over the top, this kept all chmods the same as the installer left them. I have also tried chmoding myself but the new error as you can see at: http://www.mikeb.ukhq.co.uk/blog/ is still the same.

Sorry to be such a pain. I hope it is just me missing something obvious as this is such a great bit of kit.

Again thanks.
Last edited by Mikeb on Tue Jun 01, 2010 6:04 pm, edited 1 time in total.
User avatar
Mikeb
 
Posts: 14
Joined: Sun May 30, 2010 8:14 pm
Location: Wakefield, UK

Re: Fatal error: Call to undefined function

Postby hansfn » Mon May 31, 2010 9:27 am

You have been very unlucky and it's all our fault:

1) You have one of very few servers where the memory limit handling isn't enabled, so the function memory_get_usage isn't available. I have fixed this issue in objects.php - see revision 2760.

2) The error on line 5252 of lib.php is easy to fix - I think. Please replace

Code: Select all
function arrayToJson(array $arr) {

with

Code: Select all
function arrayToJson($arr) {

Did it help?
hansfn
Developer
 
Posts: 3072
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Fatal error: Call to undefined function

Postby Mikeb » Mon May 31, 2010 10:59 pm

hansfn wrote:You have been very unlucky and it's all our fault
Don't be too hard on yourselves, no one is to blame, ;)

Anyway, back to my little problem - Thankyou, so very much. I have tried it on the beta 7, both changing the code in lib.php and the replacing of objects.php and all works perfect. I've not tried it on the 2.0.2 version as it's late and work beckons in the morning, though I'm sure all will be fine

In fact I feel guilty now for enjoying my bank holiday, while you so swiftly fixed my site - so if there is something an underpaid chef, who works full time, with very little time to run his own sites and others can do something for you, just ask.

If I'm able, I'll try - but it may take sometime.

Thanks again,
Mikeb

P.S. (does anyone P.S. these days?) once I have tried on version 2.0.2, I'll report back here and add [SOLVED] to the title.
User avatar
Mikeb
 
Posts: 14
Joined: Sun May 30, 2010 8:14 pm
Location: Wakefield, UK

[SOLVED] Fatal error: Call to undefined function

Postby Mikeb » Tue Jun 01, 2010 6:03 pm

Okay once again thanks for your time.

I just uploaded the [url]test.Hannahstearooms.co.uk[/url] with the installer and managed to create an admin log in etc.

I uploaded the altered Objects.php - I did not upload the lib.php - and all works fine :D

Mikeb
User avatar
Mikeb
 
Posts: 14
Joined: Sun May 30, 2010 8:14 pm
Location: Wakefield, UK

Re: [SOLVED] Fatal error: Call to undefined function

Postby Kansloos » Wed Jun 02, 2010 3:17 pm

Hey!
Last time i tried to update my pivotx installation at www.rememberharm.nl (about a week ago i guess), i had exactly this problem! The one with line 5252 in lib.php Didn't post it here out of a lack of time, just reinstalled a backup. Glad to hear that it is fixed, is this going to be incorporated in new pivotx builds, or should I try and prevent lib.php from being overwritten from now on?
Kansloos
 
Posts: 9
Joined: Fri Oct 10, 2008 11:37 am

Re: [SOLVED] Fatal error: Call to undefined function

Postby hansfn » Wed Jun 02, 2010 4:24 pm

You should never mix and match files from different version - that can be fatal. All coming releases will of course have this fix, and you can already grab PivotX Latest from http://pivotx.net/files/unstable-development/
hansfn
Developer
 
Posts: 3072
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: [SOLVED] Fatal error: Call to undefined function

Postby Kansloos » Wed Jun 02, 2010 9:10 pm

Thanks, will try installing later, probably the weekend. :)
Kansloos
 
Posts: 9
Joined: Fri Oct 10, 2008 11:37 am


Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 0 guests

cron