Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-03-2013, 02:34 PM   PM User | #1
gathoni
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
gathoni is an unknown quantity at this point
Error: Call to undefined function

Hi, just starting out with PHP, have watched some tutorials concerning functions and am using cartweaver to create an internet store. I'm using a template and customsing it.

When I load the site index page I get this error:

Fatal error: Call to undefined function expandPath() in C:\xampp\htdocs\brmstest\cw4\cwapp\func\cw-func-product.php on line 400

Line 400 of cw-func-product.php is:

$imageDirPath = expandPath(CWtrailingChar($_ENV["application.cw"]["appCWContentDir"],"remove") . CWtrailingChar(CWleadingChar($_ENV["application.cw"]["appImagesDir"])) . CWtrailingChar(CWleadingChar($imageTypeDir,"remove")));Where should I find the function expand path? I don't know if it exists or does it just defining in this file in particular?

If I need to define the function, where and how do I do that?

Thanks in advance for any help. I hope my question isn't too stupid.

Gathoni

Last edited by gathoni; 01-03-2013 at 02:36 PM..
gathoni is offline   Reply With Quote
Old 01-03-2013, 04:56 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,363
Thanks: 18
Thanked 347 Times in 346 Posts
sunfighter is on a distinguished road
This is a guess gathoni and there is no way I can find the answer for you. Normally, functions are all lumped together in a single file someplace. They are loaded to a page with the require ("function_file_name") at the top of the php. This maybe commented out or was erased. If this don't work for you you can open each file you have and search for
Code:
function expandPath
.

I know that's way too little, but it's the best I have.
sunfighter is online now   Reply With Quote
Users who have thanked sunfighter for this post:
gathoni (01-07-2013)
Old 01-07-2013, 09:32 PM   PM User | #3
gathoni
New to the CF scene

 
Join Date: Dec 2012
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
gathoni is an unknown quantity at this point
thanks i found the file with the function actually when i delete the call to that function i get another undefined error message for a function from the same file. I cannot see anywhere 'require' there are comments on file dependencies, and it does mention a file which needs to be called, but the file where the relevant functions are is not mentioned
gathoni is offline   Reply With Quote
Old 01-08-2013, 01:07 AM   PM User | #4
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,363
Thanks: 18
Thanked 347 Times in 346 Posts
sunfighter is on a distinguished road
gathoni I went to Cartweaver Community Forums and searched on expandPath() This page came up http://forums.cartweaver.com/topic/warning-opendir. It doesn't give clear answers but tells me there is a place you can go to get answers. And that the expandPath() function returns the actual file paths on the server and therefore really necessary.

You might also want to try the Lynda.com tutorial for setting up an ecommerce site with dreamweaver and cartweaver. It will cost you some money.
sunfighter is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:35 PM.


Advertisement
Log in to turn off these ads.