1 (edited by Alan Hale 27-11-2009 18:09:37)

Re: Error relating to path to PEAR

I've tried to set up a custom species list and to register a website. In both cases I get this error:

Fatal error: ORM::wrap() [function.require]: Failed opening required 'client_helpers\submission_builder.php' (include_path='.:/usr/share/php:/usr/share/pear') in/var/www/indicia/application/libraries/MY_ORM.php on line 826

For the record, I do have PEAR installed - at /usr/share/php/PEAR/

On Ubuntu 9.10

Alan

Alan Hale
Aberystwyth

2

Re: Error relating to path to PEAR

Hi Alan

I don't think it is Pear that is the problem - it is the client_helpers/submission_builder.php file. Do yo have this file (relative to the root of your Indicia installation folder)? If so then let me know as it must be a problem with paths, otherwise it sounds like your installation is incomplete and some files are missing. One possibility is that you moved the client_helpers folder into your own development directory rather than copied it? If so you can just copy it back again.

Best Wishes

John van Breda
Biodiverse IT

3

Re: Error relating to path to PEAR

Hi John

Yes, the file is there - /var/www/indicia/client_helpers/submission_builder.php .

Cheers

Alan

Alan Hale
Aberystwyth

4

Re: Error relating to path to PEAR

Hi Alan

It seems I have made an assumption about relative paths that does not hold true always. I have a potential fix for you, but would you be able to test it for me (since it works here..)?

The fix is in the file application/libraries/MY_ORM.php. Open this in a text editor and find the line which reads

require_once('client_helpers\submission_builder.php');

Just change this to the following then save it.

require_once(DOCROOT.'client_helpers\submission_builder.php');

Let me know if this works please.

Best Wishes

John van Breda
Biodiverse IT

5

Re: Error relating to path to PEAR

Hi John

Thanks for this - however, I'm afraid it doesn't work with me, and I get exactly the same error.

Cheers

Alan

Alan Hale
Aberystwyth

6

Re: Error relating to path to PEAR

Ok, thanks for trying anyway. It's always a bit tricky spotting problems from a distance!
Can you try a couple of things for me please:
1) Check that there is a file /var/www/indicia/client_helpers/helper_config.php. In theory this can't be the problem (it is required by the submission_builder file, but if it was missing then your error should complain that helper_config is missing, not submission_builder). It's worth checking anyway.
2) What happens if you navigate through your web browser to indicia/helper_config.php? It should be just a blank page.
3) Can you compare the permissions on this file against the files in the indicia/application directory, e.g. controllers/indicia.php? It could be that your webserver has no rights to see the file.

Best Wishes

John

John van Breda
Biodiverse IT

7

Re: Error relating to path to PEAR

Hi John

Yes, I quite understand - can be hard enough when you have direct access.

All those tests you suggested checked out OK .

BUT - I've just noticed that in the error:

Fatal error: ORM::wrap() [function.require]: Failed opening required '/var/www/indicia/client_helpers\submission_builder.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/indicia/application/libraries/MY_ORM.php on line 826

There is a backslash rather than forward slash between "client_helpers" and "submission_builder". Could this be the problem?

Cheers

Alan

Alan Hale
Aberystwyth

8 (edited by Alan Hale 02-12-2009 09:27:10)

Re: Error relating to path to PEAR

.. and that is indeed the problem. Editing line 812 in MY_ORM.php fixes it.

The error seems to have crept in with v.0.2.1 , comparing this with 0.2.


Cheers

Alan

Alan Hale
Aberystwyth

9

Re: Error relating to path to PEAR

Ah, I should have spotted that - sorry! Thanks for the input though, I have committed this fix to the code base for the next release.

Cheers

John van Breda
Biodiverse IT

10 (edited by Alan Hale 02-12-2009 14:39:59)

Re: Error relating to path to PEAR

Isn't it always the little things?

Glad to have helped.

Cheers
Alan

Alan Hale
Aberystwyth