Warning: require_once(../../GrBx/cw3/admin/application.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\GrBx\cw3\admin\ProductForm.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '../../GrBx/cw3/admin/application.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\GrBx\cw3\admin\ProductForm.php on line 2

Can someone please explain this error message? I am using Cartweaver and I'm trying to change it in a way that I can add more fields to the product database. I've been working with cartweaver support to get as far as I've gotten. I'm just getting a fatal error as I try to open the productform in the admin section.

Recommended Answers

All 57 Replies

Make sure that this is the correct path to the application.php file and that the file actually exists in that location. ../../GrBx/cw3/admin/application.php <---------

It's looking for the the application.php file and it's not finding it. Some common reasons for this error are the filename is misspelled, the path to file is incorrect, or the file does not exist in that location.

commented: CFROG is very active in trying to help me. +1

Your code is looking for a file, but it (application.php) doesn't exists at the position it is looking for.

EDIT: Got beaten by CFROG.

Yeah, I was able to figure that it has something to do with that but application.php is and always has been the same and usually functions fine. It is still there and the path is right. What doesn't make sense is that those scripts have always worked fine and application.php is unrelated (as far as I can tell) to any of the changes I've made.

In some cases, especially with DreamWeaver saving your file to a different folder will update your links unless you tell it not to.

Try using this as your path: ../GrBx/cw3/admin/application.php

found my problem, my page is full of broken links...

Don't you just hate when that happens? 8-)

I fixed most of them, but I don't know how to fix this one...

<a href="../../GrBx/cw3/admin/ProductImageUpload.php?type=<?php echo($row_rsCWGetImageTypes["imgType_ID"]);?>&nextpage=3" title="Upload/Manage Images" onclick="showUpload(this); return false;">

if I do..

<a href="ProductImageUpload.php?type=<?php echo($row_rsCWGetImageTypes["imgType_ID"]);?>&nextpage=3" title="Upload/Manage Images" onclick="showUpload(this); return false;">

It still isn't working

<a href="ProductImageUpload.php?type=<?php echo($row_rsCWGetImageTypes["imgType_ID"]);?>&nextpage=3" title="Upload/Manage Images" onclick="showUpload(this); return false;"><img src="assets/images/folder.gif" width="16" height="16" border="0" /></a><img src="assets/images/delete.gif" alt="Remove image from product" onclick="document.getElementById('<?php echo($imageFieldName);?>').value=''">

Is there an extra <a> tag in here?

There doesn't seem to be. My best guess would be that it has something to with your onclick function.

Okay, everything in the broken links department is fixed.

Now, I have error reporting on, but it won't show me any errors. I still get stuck when trying to add a product, though.

When I try to add one, the screen goes white and there's a fatal error (that it fails to report) and when I try to update a product, as soon as I click update the page just refreshes with the old data. :(

Without seeing the code I don't know what to tell you about that one.

Here are the two .php files in question. Feel free to inspect.

yeah that's what I meant, so where would I look to find why it isn't there?

<a href="ProductForm.php?product_ID=<?php echo($row_rsCWProductsSearch["product_ID"]);?>" title="Edit <?php echo($row_rsCWProductsSearch["product_Name"]);?>"><?php echo($row_rsCWProductsSearch["product_Name"]);?></a>

is line 73 on ProductActive.php, for updating existing products.

<div id="lnSubProducts" class="lnSubMenu" style="display: none;">
<a href="ProductForm.php">–Add New</a>
<a href="ProductActive.php?status=0">–Active Products</a>
<a href="ProductActive.php?status=1">–Archived Products</a>

is line 25 in CWIncNav.php which is a submenu in AdminHome.php

attaching these 3 pages as well

$imageFolder = "../../"

is this my issue? line 553 in productform.php

Try changing it to ../

By the way, thanks for responding so much, I appreciate it.

I was assuming that have a folder specified for your images. Just in case you don't you will have to tell it where to look. ../../some_folder

I don't think that's my issue, I think the problem lies in ProductAction.php

This needs to stay the way that is now that I look at it $imageFolder = "../../" I'm having a hard time following what is supposed to be doing what in the code. There is a lot there. So the problem is that you are getting a blank page, what should be happening on that page if it was working?

in productform.php you see that there are 5 pages or tables. 1: general, 2: descriptions, 3: pictures, 4: SKU, 5: Upsells. The first three pages are filled out together and then it updates the product. The blank page happens when making a new product, (I think it actually adds it to the database after page 3, and then it would move on to the SKUs) the page goes white instead of moving to page 4.

Alternatively, if I try to UPDATE an existing product (it uses the same page: productform.php) then no matter which page I use or which element I try to change, as soon as I click update it just refreshes the page with the old info.

Looks like the reason for the issue with page 4 is because the product is not actually making it into the database. Page 4 is conditional.

<?php if($rsCWGetProduct_recordCount != 0) { ?>
	<div id="page4">

The record count is obviously zero, now to figure out why it's not adding the product to the db.

Indeed! :)

thanks for sheding light on that, I'll keep looking into it, any other help would be appreciated


On the CWProductAction page change line 90 to this and try again to add a product.

Line 90 : Change to

,$_POST["product_used"])or die(mysql_error());

This will give us a heads up of what is going on with the INSERT query, if anything.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.