View Full Version : php.ini permissions
purgero
05-27-2009, 12:19 PM
I've got everything uploaded onto my "Shared" hosting server. The pages look good. When I try to add a product through the admin section, I get the following errors:
Warning: getimagesize() [function.getimagesize]: open_basedir restriction in effect. File(C:\WINDOWS\Temp\php156.tmp) is not within the allowed path(s): (c:\inetpub\wwwroot\HCRESELLER\xxxxxxxxxx\xxxxxxxx xx.com) in C:\Inetpub\wwwroot\HCRESELLER\xxxxxxxxxx\xxxxxxxxx x.com\www\WA_DigitalFilePro\HelperPHP.php on line 87
Here is line 87: $imageSize = getimagesize($uploadedFile["tmp_name"]);
I realize that it is a php.ini issue somewhere...but I'm on a Shared Hosting Server, and can't expect the Hosting company to change their settings just for me.
What do I do?
Thanks
Justin Nemeth
05-27-2009, 01:42 PM
It appears that your website user doesn't have permissions to the default windows temp directory. When files are first uploaded, they go to this temp directory, then they are resized/moved to the folder in your site.
Check out this php.ini setting:
http://us2.php.net/manual/en/ini.core.php#ini.upload-tmp-dir
Overriding that setting to somewhere within your web folder (the full intetpub path you have above) should fix the problem.
If you are running apache for the webserver, here is some info on how to override a value using an .htaccess file:
http://us2.php.net/manual/en/configuration.changes.php
In any case, it sounds like you might have to contact your host to help resolve this if the above doesn't work or you don't have permissions to change it.
purgero
05-28-2009, 03:37 PM
I'm still working on this issue...I've put the full path in (as you suggested), but no deal yet. I'm waiting to hook up with my support dept today.
Question though...shouldn't the categories show up on the page when I enter them, or only when I successfully add a product to one?
Thanks
Ray Borduin
05-28-2009, 03:39 PM
Categories should show up after adding them regardless of products being added.
purgero
05-28-2009, 05:11 PM
Just like the products not showing up, the categories don't either. They show up in the Add Products area, but not on the website.
Ray Borduin
05-29-2009, 06:36 AM
They won't show on the web site until there is at least one product available in that category. I thought you were talking about the admin.
purgero
05-29-2009, 08:13 AM
So does anyone have an idea as to why the products are not showing up?
The latest change is:
I've created a folder on my website called: imagesTemp. I changed the HelperPHP.php file to reflect the path to it. I logged into my website admin (not the powerstore admin), and gave my account read/write permissions to the folder. When I clicked on Insert, it just brought me back to the Add New page. Nothing changed, nothing added.
I added read/write permissions to the Everyone account, and still the same thing. I'm not getting any errors, it is just bringing me back to the Add New page.
I've been dealing with Jason on this issue, and 2 days ago he updated it telling me that the problem has been elevated...but I'm at the point where I need to get this issue fixed. Would really appreciate any quick help.
Thanks,
Paul
Ray Borduin
05-29-2009, 10:04 AM
Sorry about the delay in support. Jason, our head of support, is out on vacation for two weeks starting this past Tues. As a result we are a little backed up. We should be getting a handle on it soon.
What is your incident number?
purgero
05-29-2009, 10:41 AM
I understand...Jason has been great in his assistance. Very patient with me.
Support #: 86662
purgero
05-29-2009, 09:41 PM
I've been on the phone with tech support from my hosting provider, and we've tried almost everything. He has given me permissions for the C:\temp folder, and he even tried adding a product himself, with no success.
What is happening now, is the base_dir error is not showing up. Actually, we're not getting any errors except that when I click Submit, it brings me back to the Insert page, with the Red text next to the image paths, asking me to enter valid image files.
Appreciate your help.
Ray Borduin
06-01-2009, 07:10 AM
I'd have to see your code to try to debug it. But that sounds like a problem with the server validation applied. What does the validation code look like?
purgero
06-01-2009, 07:50 AM
Which file would you need me to send, and to where?
When you said you need to see the validation script, I looked at the WAVT_Scripts_PHP.php file, and here are lines 47 and 48...do they have anything to do with it?
$schema = $_SERVER['SERVER_PORT'] == '443' ? 'https' : 'http';
$host = strlen($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:$_SERVER['SERVER_NAME'];
Thanks
Ray Borduin
06-01-2009, 08:14 AM
I mean the actual code in the server behavior applied on the page. You should send the code from the page you are trying to get working... or the action of the form if it is different.
purgero
06-01-2009, 08:34 AM
The file is the Products_insert.php page. When I open the file in DWCS4, I get:
This document contains JavaScript code for a widget that no longer exists...it refers to:
Widget: var sprytextfield5 - new
Spry.Widget.ValidationTextField("sprytextfield5", "real");
The file is attached...
Ray Borduin
06-01-2009, 08:42 AM
For that particluar error, just delete that line of code. It is spry code for the form element you deleted.
The server code for the validation of the fields you are having trouble with is:
$WAFV_Errors .= WAValidateFE($WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"] . "",".gif, .jpg, .jpeg, .png",true,9);
$WAFV_Errors .= WAValidateFE($WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] . "",".gif, .jpg, .jpeg, .png",true,10);
... it looks correct. What is the error messages that you see? When do you see it?
purgero
06-01-2009, 08:52 AM
Ray,
You mention it is spry code for an element that I deleted. I didn't alter/delete anything.
What is happening, is when I try to insert a product, all that happens is the Products_Insert.php page reloads. Nothing gets added.
I did try and delete the spry code, reuploaded the page, but the thing happens.
Thanks
Ray Borduin
06-01-2009, 08:57 AM
OK. It appears we actually removed the spry validation on the weight column but forgot to remove that line of code. Just delete the line and the spry error at least will go away.
Then please describe exactly what is happenning now and I can try to see if I can figure out why.
purgero
06-01-2009, 09:24 AM
Ray,
Did our last 2 responses overlap? Was my response about what happens, sufficient?
Thanks
Ray Borduin
06-01-2009, 09:46 AM
I see the page reloads and nothing happens now. That means you have a problem with the trigger for the insert. Can you find the if statement that is on the top of your insert code? What is it?
purgero
06-01-2009, 10:21 AM
I'm assuming you mean the If statement for the Insert Record server behavior? It is in the file I attached, but here it is:
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $localhost;
$WA_table = "products";
$WA_sessionName = "WADA_Insert_Products";
$WA_redirectURL = "Products_Detail.php";
$WA_keepQueryString = false;
$WA_indexField = "ProductID";
$WA_fieldNamesStr = "ProductSKU|ProductName|ProductPrice|ProductWeight| ProductCartDesc|ProductShortDesc|ProductLongDesc|P roductThumb|ProductImage|ProductCategoryID|Product Stock|ProductLive|ProductUnlimited";
$WA_fieldValuesStr = "".((isset($_POST["ProductSKU"]))?$_POST["ProductSKU"]:"") ."" . "|" . "".((isset($_POST["ProductName"]))?$_POST["ProductName"]:"") ."" . "|" . "".((isset($_POST["ProductPrice"]))?$_POST["ProductPrice"]:"") ."" . "|" . "".((isset($_POST["ProductWeight"]))?$_POST["ProductWeight"]:"") ."" . "|" . "".((isset($_POST["ProductCartDesc"]))?$_POST["ProductCartDesc"]:"") ."" . "|" . "".((isset($_POST["ProductShortDesc"]))?$_POST["ProductShortDesc"]:"") ."" . "|" . "".((isset($_POST["ProductLongDesc"]))?$_POST["ProductLongDesc"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"] ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".((isset($_POST["ProductCategoryID"]))?$_POST["ProductCategoryID"]:"") ."" . "|" . "".((isset($_POST["ProductStock"]))?$_POST["ProductStock"]:"0") ."" . "|" . "".((isset($_POST["ProductLive"]))?$_POST["ProductLive"]:"") ."" . "|" . "".((isset($_POST["ProductUnilimited"]))?$_POST["ProductUnilimited"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|none,none,NULL|none,none,NULL| ',none,''|',none,''|',none,''|',none,''|',none,''| none,none,NULL|none,none,NULL|none,1,0|none,1,0";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_localhost;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>
Ray Borduin
06-01-2009, 10:27 AM
OK and you have a form input type="image" with the name "Insert" that you are using to submit the form? And the form method is "POST"?
purgero
06-01-2009, 10:42 AM
Ray,
This sounds kind of funny that you are asking me these questions when you have the file in your possession...the files are from the PowerStore program that you guys wrote...I don't know the correct answer to give you...yes?
Ray Borduin
06-01-2009, 11:04 AM
I'm just checking to make sure nothing was updated. That you didn't replace the image or change something else when trying to get it to look right.
Those are the defaults, but it should work by default, so I am trying to help debug by pointing out what could cause the problem based on the information provided.
purgero
06-01-2009, 11:21 AM
I see.
Thanks
Ray Borduin
06-01-2009, 11:33 AM
Sorry... read back through previous posts and it seems I was overlooking a key piece of information.
You are getting a failed validation message. Where is that message occurring and what does it say? Are you specifying an image in both places?
purgero
06-01-2009, 11:37 AM
The failed messages were basedir's. We corrected them by allowing the user account permissions to the c:\temp folder. Once we did that, the errors went away and the page just reloads.
Hope that helps.
Ray Borduin
06-01-2009, 11:40 AM
Are any parameters added to the url when it reloads?
purgero
06-01-2009, 12:20 PM
none...it loads the Products_Insert.php file again
Ray Borduin
06-01-2009, 12:24 PM
I guess the next step is to start debugging... add code after the IF statement like:
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
die("trigger runs");
to see if the trigger is firing at all.
If it writes the code to the page, then try removing it and adding the die later in the code. It seems like it would have to be a problem with the button name.
purgero
06-01-2009, 12:32 PM
Is that the exact code you want me to use?
Where? After the Insert Records Server Behavior?
In the Products_Insert.php file?
You'll forget more about coding than I'll ever remember.
Ray Borduin
06-01-2009, 01:45 PM
adding:
die();
will stop the code and write whatever is passed to it. This is a convenient way to debug.
You may want to post a support incident so a webassist engineer can help you debug directly if you aren't up for the challenge.
purgero
06-01-2009, 02:04 PM
Ray,
This is what I added:
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
die();
$WA_connection = $localhost;
The rest of the if statement continues...
Nothing shows up. It is still just reloading the Products_Insert.php page.
If you read the first page of this forum conversation, you'll see that I do have a support incident: 86662 open...but Jason is on vacation, so you and I have been talking. This problem can probably be fixed faster if someone contacted me directly.
If it is possible, I will be available after 4:00PST this afternoon. My phone number is in the support incident.
Thanks
purgero
06-01-2009, 05:40 PM
Ray,
In preparation for your call tomorrow, here is the error when I try to insert a product after the changes you had me make.
array(2) { ["WA_UploadResult1"]=> array(14) { ["statusCode"]=> int(0) ["errorMessage"]=> string(16) "No file uploaded" ["clientFileName"]=> string(0) "" ["fileExtension"]=> string(0) "" ["serverFileName"]=> string(0) "" ["serverDirectory"]=> string(0) "" ["contentType"]=> string(0) "" ["fileWasOverwritten"]=> bool(false) ["fileWasSkipped"]=> bool(false) ["fileWasRenamed"]=> bool(false) ["fileSize"]=> int(-1) ["isImage"]=> bool(false) ["imageWidth"]=> int(-1) ["imageHeight"]=> int(-1) } ["WA_UploadResult2"]=> array(14) { ["statusCode"]=> int(0) ["errorMessage"]=> string(16) "No file uploaded" ["clientFileName"]=> string(0) "" ["fileExtension"]=> string(0) "" ["serverFileName"]=> string(0) "" ["serverDirectory"]=> string(0) "" ["contentType"]=> string(0) "" ["fileWasOverwritten"]=> bool(false) ["fileWasSkipped"]=> bool(false) ["fileWasRenamed"]=> bool(false) ["fileSize"]=> int(-1) ["isImage"]=> bool(false) ["imageWidth"]=> int(-1) ["imageHeight"]=> int(-1) } }
purgero
06-03-2009, 12:05 PM
Hi Ray...
Will you be able to contact me about this issue today? I need to get this fixed.
Thanks
Ray Borduin
06-03-2009, 01:53 PM
Please contact me directly when you are available. I am at extension 103 from the webassist main line or 800 number.
purgero
06-03-2009, 04:24 PM
Ray,
I found the path in the php.ini file, and changed it to: c:\temp. This is the error I'm getting now:
array(2) { ["ProductThumb"]=> array(5) { ["name"]=> string(24) "cover_roll_woven2034.jpg" ["type"]=> string(11) "image/pjpeg" ["tmp_name"]=> string(17) "C:\TEMP\php44.tmp" ["error"]=> int(0) ["size"]=> int(128681) } ["ProductImage"]=> array(5) { ["name"]=> string(24) "cover_roll_woven2034.jpg" ["type"]=> string(11) "image/pjpeg" ["tmp_name"]=> string(17) "C:\TEMP\php45.tmp" ["error"]=> int(0) ["size"]=> int(128681) } }
Next step?
Thanks
Ray Borduin
06-04-2009, 07:45 AM
Remove the debug code I added and get back to the original version of the page before you changed anything. It appears the problem on the server has been corrected, so any other changes you might have made in the meantime will only cause problems now.
Just start over with the original version of the page. There was never anything wrong with the pages themselves or the code on them.
purgero
06-04-2009, 11:45 AM
Ray,
In order to avoid any decoding errors on my part (taking out the additional code you or I added), I took your advice and pulled the original Products_Insert.php file out of my downloaded purchase, and uploaded it "as is".
I got a blank page when I hit Submit.
So I put the debug code you gave me:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
if($_SERVER["REQUEST_METHOD"] == "POST"){
var_dump( $_FILES);
die();
}
?>
back at the top of the original page I took out of the downloaded purchase, and I'm getting the following errors, again:
array(2) { ["ProductThumb"]=> array(5) { ["name"]=> string(24) "cover_roll_woven2034.jpg" ["type"]=> string(11) "image/pjpeg" ["tmp_name"]=> string(18) "C:\TEMP\php14C.tmp" ["error"]=> int(0) ["size"]=> int(128681) } ["ProductImage"]=> array(5) { ["name"]=> string(24) "cover_roll_woven2034.jpg" ["type"]=> string(11) "image/pjpeg" ["tmp_name"]=> string(18) "C:\TEMP\php14D.tmp" ["error"]=> int(0) ["size"]=> int(128681) } }
Ray, if I add the code that Jason gave me back in the beginning of this incident:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
then I get the following:
Warning: getimagesize() [function.getimagesize]: open_basedir restriction in effect. File(C:\TEMP\php18A.tmp) is not within the allowed path(s): (c:\inetpub\wwwroot\HCRESELLER\acalamed\acalamedic al.com) in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 87
Warning: getimagesize(C:\TEMP\php18A.tmp) [function.getimagesize]: failed to open stream: Operation not permitted in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 87
Fatal error: Call to undefined function WA_DFP_Resize() in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\DB_Admin\Products_Insert.php on line 76
I am at a complete loss again.
Thanks
Ray Borduin
06-04-2009, 01:56 PM
This is the permissions problem in the folder that you specified as the default upload folder. C:\TEMP.... again this is not a problem with your page it is a problem with the server configuration. Don't change any code, but add permissions to the C:\TEMP folder so that the internet user has read,write, and execute permissions on that folder.
purgero
06-04-2009, 02:23 PM
Ray,
After checking the permissions on the folder, my user account was listed there with the correct permissions (read, write, execute). The Products_Insert.php page is putting the images in the \images\Upload folder, under my www directory.
In that folder, there are about 16 image variations (all with a different number at the end) from todays date. So that is showing me that they are going to the correct folder that is stated in the products_insert file.
So I deleted them all, just to see what would happen. Now, the only error I get is:
Fatal error: Call to undefined function WA_DFP_Resize() in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\DB_Admin\Products_Insert.php on line 76
Here is line 76: WA_DFP_Resize($WA_DFP_UploadStatus["WA_UploadResult1"],400,400);
When I looked back into the \images\upload folder, there aren't any images there now.
Thoughts?
Ray Borduin
06-04-2009, 02:29 PM
Make sure to get the Digital File Pro include from the powerstore. It includes a function that is not included in the latest version of digital file pro, so it may have been overwritten when you were editing the Digital File Pro functionality on the page.
If you are editing with the most recent version of Digital file pro, you can set the "Fit to box" settings to 400 x 400 and remove the resize line added in powerstore.
Powerstore was originally created with DFP v1 which didnt' have resize options, so we added a quick resize function. The more recent version has all that built into the extension and uses different function names.
purgero
06-05-2009, 08:49 AM
Ray,
Where is the include? I opened my downloaded zip, and can't find it.
Ray Borduin
06-05-2009, 09:53 AM
WA_DigitalFilePro/HelperPHP.php
purgero
06-05-2009, 08:51 PM
We're close, Ray...
I upgraded to DFP 1.1.3, from 1.1.1. Uploaded the Helper.php and the Products_insert.php file. When I insert a product, I get sent back to the insert page (nothing added to the URL), but I get the following at the top of the page (with the insert page showing below it):
Warning: getimagesize() [function.getimagesize]: open_basedir restriction in effect. File(C:\TEMP\php2C1.tmp) is not within the allowed path(s): (c:\inetpub\wwwroot\HCRESELLER\acalamed\acalamedic al.com) in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 87
Warning: getimagesize(C:\TEMP\php2C1.tmp) [function.getimagesize]: failed to open stream: Operation not permitted in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 87
Warning: getimagesize() [function.getimagesize]: open_basedir restriction in effect. File(C:\TEMP\php2C0.tmp) is not within the allowed path(s): (c:\inetpub\wwwroot\HCRESELLER\acalamed\acalamedic al.com) in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 87
Warning: getimagesize(C:\TEMP\php2C0.tmp) [function.getimagesize]: failed to open stream: Operation not permitted in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 87
Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php:87) in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\DB_Admin\Products_Insert.php on line 148
Now, the products show up on the live page (which they didn't before). The images are there, but they aren't showing (I can tell because if I right click on the white space, it shows me the properties of the image along with the image upload file name). Plus, the images are in the proper folder inside the www directory.
One thing I've noticed, is there are three of these in the products_insert page:
<?php require_once("../WA_DigitalFilePro/HelperPHP.php"); ?>
I've tried removing one, then 2 of them, but still the same error message.
We're close now, Ray...don't give up on me! I know you can figure it out! :)
Thanks,
Paul
Ray Borduin
06-08-2009, 06:09 AM
Is this a shared server? I think if you specified a directory within your wwwroot as your default image upload directory, then these errors will go away. That may be the easiest fix.
purgero
06-08-2009, 08:48 AM
Ray,
This is a shared server...
The page DOES have a default directory for the image uploads..here it is:
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFile("WA_UploadResult1", "ProductImage", "", "../Images/Upload/", "[FileName]", "2", "[FileName]_[Increment]", "1024", "true", "400", "400");
}
?>
I tried removing it...putting a forced size for the resizing...now I'm getting:
Warning: getimagesize() [function.getimagesize]: open_basedir restriction in effect. File(C:\TEMP\php4A3.tmp) is not within the allowed path(s): (c:\inetpub\wwwroot\HCRESELLER\acalamed\acalamedic al.com) in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 90
Warning: getimagesize(C:\TEMP\php4A3.tmp) [function.getimagesize]: failed to open stream: Operation not permitted in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\WA_DigitalFilePro\HelperPHP.php on line 90
Fatal error: Call to undefined function WA_DFP_Resize() in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\DB_Admin\Products_Insert.php on line 76
Here is line 90 of the helperphp.php file: $imageSize = getimagesize($uploadedFile["tmp_name"]);
Here is line 76 of the Products_Insert file: WA_DFP_Resize($WA_DFP_UploadStatus["WA_UploadResult1"],400,400);
Any thoughts?
Ray Borduin
06-08-2009, 08:51 AM
I meant in your php.ini file. The error appears to be because of the default file directory in the php.ini file not on the page.
purgero
06-08-2009, 09:33 AM
I changed the php.ini file on the server to the \Images\Upload directory in my www folder. Now I'm getting:
Fatal error: Call to undefined function WA_DFP_Resize() in C:\Inetpub\wwwroot\HCRESELLER\acalamed\acalamedica l.com\www\DB_Admin\Products_Insert.php on line 75
Here is line 75:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
LINE 75 --> WA_DFP_Resize($WA_DFP_UploadStatus["WA_UploadResult1"],400,400);
}
?>
Ray Borduin
06-08-2009, 09:50 AM
Delete that line of code. (or those lines of code) It is not needed now that you are using DFP v2.
purgero
06-08-2009, 11:19 AM
Ray,
I deleted both sets (for the image and the thumbnail)...it uploads and shows the images (not in the correct size), but I'm still getting errors.
Is it time for another on-line connection to fine tune this?
Paul
Ray Borduin
06-08-2009, 11:52 AM
If you can give me a call soon I am free for about an hour.
purgero
06-08-2009, 05:43 PM
Ray,
Thanks for all your help in getting the situation rectified. It was amazing watching you work on my computer.
I have 2 questions (since you know my setup so well now)...
1. When I update a products content, the images disappear.
2. The categories are wider than the menu width. Where would I find the setting to make the drop-down wider?
Again, thanks.
Paul
Ray Borduin
06-09-2009, 07:33 AM
1) I think it may have overwritten the updates I made to the include file once you applied DFP to the update page. I'll attach an updated version of that file to your support incident and see if replacing the file fixes the problem.
2) If you have CSS Menu Writer you can update the menu using our user interface... if not you can update the menu .css or add inline style references to the list used for the menu from the include file.
purgero
06-09-2009, 04:24 PM
Ray,
Updating the CSS Menu screwed everything up (I'm sure it was my fault). I was able to fix it, except for the fact that when I went to any other pages, everything from the menu down doesn't show.
I like the fact of the Powerstore being a "plug-n-play" type store. I was able to drag some of the files I needed out of the zipped download, upload them, and everything worked.
Unfortunately, Ray, the timeout is happening again. Can you give me the code that you added to the original files (before I replaced them), and tell me where to put it (the code I mean)?
Am I not seeing a "checkout" button, or an option to show what is in the cart, for any particular reason?
Thanks
Ray Borduin
06-10-2009, 06:34 AM
I have sent the file to you in an email.
The checkout button should be on the cart.php page.
You can just create a link to the cart page or checkout page to show the cart or allow checkout.
purgero
06-10-2009, 10:11 AM
Got the file Ray...thanks. I replaced it in the WA_DigitalFilePro folder, and uploaded it. The cart still shows empty when I add a product.
Did I miss something?
Thanks
Ray Borduin
06-10-2009, 10:15 AM
Add:
session_commit();
before the line of code:
header(...
on the page where the add to cart button is pressed. For some reason your session isn't being stored automatically, but adding session_commit() should force it to keep the cart in tact.
purgero
06-10-2009, 01:27 PM
It worked Ray. Thanks.
The other day when we were talking, you commented on how it is supposed to work "right-out-of-the-box". Mostly, it does.
One (hopefully) last question...as I mentioned earlier, I used the CSS Menu Writer to update the width of the menu, and it changed everything...the images I mean. In the css file, which is the section to change the width of the drop-down menus? My categories are too wide.
Thanks again for everything.
Ray Borduin
06-10-2009, 01:31 PM
Do you have menu writer v2?
You might want to just edit the menu code by hand if not.
purgero
06-10-2009, 03:05 PM
I have writer 1.0.4. When I open the templates to edit the menu, it doesn't show the menu that came with Powerstore. I found the setting in the css file. But if I wanted to edit it in CSS writer, do I have to have v2.0?
Thanks
Ray Borduin
06-10-2009, 04:05 PM
Yes. The menu was created with v2 and includes dynamic menus which weren't supported in v1. This means you really can't edit it with menu writer v1.
purgero
07-29-2009, 01:56 PM
Hey Ray,
I upgraded to PS2, and uploaded it to our new server. All went fine (surprisingly for me). But I'm am dealing with 2 issues:
1. All the pages work, except I'm getting this at the bottom of each page, including the admin pages:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0
If this is MYSQL, why is it asking for php_MSsql.dll?
2. I'm getting the same errors about uploading images, that I had on the old server (Please enter a valid file (.gif, .jpg, .jpeg, .png).
I made sure that the php.ini file has the C:/temp/ for the uploads. I've even used the test images that come with the store.
I have DFP 2.01 as well.
Do you recall what you had me do last time to fix this? I thought this was fixed in DFP 2.
Thank!
Paul
Ray Borduin
07-29-2009, 03:23 PM
1) that error isn't related to the powerstore... it doesn't use or reference php_mssql
2) probably a permissions error on either the default upload folder specified in the php.ini or for the final destination directory.
purgero
08-05-2009, 11:10 AM
Ray,
Once I added the permissions to the images\upload directory, the products_insert.php page reloads with the following error:
PHP Fatal error: Call to undefined function imagecreatefromjpeg() in C:\Inetpub\wwwroot\hcprivate\purgero\urgero.com\ww w\WA_DigitalFilePro\HelperPHP.php on line 844
case IMAGETYPE_JPEG:
line 844 --> $src = imagecreatefromjpeg($imageFilePath);
break;
There are images in the upload folder too, now. Although they seem to be encrypted.
I searched the webassist forum, and found the response about uncommenting the: gd.jpeg_ignore_warning = 0 in the php.ini file. I did that, but no change.
Thanks
Ray Borduin
08-06-2009, 01:05 PM
This means that the GD2 library is not enabled on your php installation. This is another setting in your php.ini
purgero
08-07-2009, 08:29 AM
We installed the gd library, and I was able to get past the inserting a new product admin page.
But, the images don't show up (I'm getting the red x image on the page), and I get the following error at the bottom of the products_detail.php page:
PHP Notice: Undefined index: ../Admin2/PHP_SELF in C:\Inetpub\wwwroot\hcprivate\purgero\xxxxxx.com\ww w\Admin2\Products_Detail.php on line 580
Note, that our server has a built in "/admin directory, so I have to change the folder in PowerStore to admin2.
Line 580 is:
<form name="WA_Store_Cart_1_ATC_<?php echo $row_WADAProducts["ProductID"]; ?>" id="WA_Store_Cart_1_ATC_<?php echo $row_WADAProducts["ProductID"]; ?>" method="POST" action="<?php echo $_SERVER["../Admin2/PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>" onsubmit="return false;">
In the code, it originally said: ../admin, so I changed it to ../admin2 and I still get the same error.
Thoughts?
Ray Borduin
08-07-2009, 10:16 AM
"<?php echo $_SERVER["../Admin2/PHP_SELF"]; ?>"
should probably be:
"../Admin2/<?php echo $_SERVER["PHP_SELF"]; ?>"
purgero
08-07-2009, 10:40 AM
Ray, I changed it. Just the section you wrote. Now when I try and upload the images, it took about 5 minutes of trying to upload, and I get the following:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.\
Here is the complete line 580:
<form name="WA_Store_Cart_1_ATC_<?php echo $row_WADAProducts["ProductID"]; ?>" id="WA_Store_Cart_1_ATC_<?php echo $row_WADAProducts["ProductID"]; ?>" method="POST" action="<?php echo $_SERVER["../Admin2/PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>" onsubmit="return false;">
Ray Borduin
08-07-2009, 11:05 AM
update:
action="<?php echo $_SERVER["../Admin2/PHP_SELF"]; ?>
to:
action="../Admin2/<?php echo $_SERVER["PHP_SELF"]; ?>
purgero
08-07-2009, 02:06 PM
Ray,
Error on webpage:
PHP Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Inetpub\wwwroot\hcprivate\purgero\xxxxxx.com\ww w\Admin2\Products_Detail.php on line 580
Updated code (in its entirety) line 580:
<form name="WA_Store_Cart_1_ATC_<?php echo $row_WADAProducts["ProductID"]; ?>" id="WA_Store_Cart_1_ATC_<?php echo $row_WADAProducts["ProductID"]; ?>" method="POST" action="<?php echo $_SERVER["../Admin2/<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>" onsubmit="return false;">
Ray Borduin
08-07-2009, 02:36 PM
Update:
<?php echo $_SERVER["../Admin2/<?php echo $_SERVER["PHP_SELF"]; ?>
to:
../Admin2/<?php echo $_SERVER["PHP_SELF"]; ?>
Really I'm just trying to correct the problems you introduced adding the subdirectory. Really I think you made a mistake editing the page at all. Why did you add the "../Admin2/" in the first place again?
I think that was a mistake in general. I'm having you move it to a place that makes more sense, but really you shouldn't have to add it because: <?php echo $_SERVER["PHP_SELF"]; ?> should return the current page path, which should be correct without adding anything.
purgero
01-13-2010, 10:37 AM
Ray,
I know this issue has become a pain...but I still am unable to upload images...I've been trying to trouble-shoot it with no luck.
Could you give me another few of your time?
Here is where I'm at:
On a products page in the Admin section, none of the pictures show up, and at the bottom of the page, I get:
PHP Notice: Undefined index: ../Admin/PHP_SELF in C:\Inetpub\wwwroot\hcprivate\AcalaMed\acalamedical .com\www\DB_Admin\Products_Detail.php on line 260 PHP Notice: Undefined index: ../Admin/PHP_SELF in C:\Inetpub\wwwroot\hcprivate\AcalaMed\acalamedical .com\www\DB_Admin\Products_Detail.php on line 308
Keep in mind, I had to change the ADMIN folder in Powerstore to DB_Admin because our Windows server automatically creates a folder called ADMIN when it creates the web account. So why is the line above, pointing to admin\PHP_Self? I have changed it in both places to: DB_Admin\PHP_Self, but it doesn't make a difference.
Now, when I try and add a new product, I get the following:
PHP Parse error: syntax error, unexpected $end in C:\Inetpub\wwwroot\hcprivate\AcalaMed\acalamedical .com\www\DB_Admin\Products_Insert.php on line 611
There is no line 611 in this file.
Thanks
Paul
Ray Borduin
01-13-2010, 11:57 AM
I have opened a support incident so that someone can help you debug the code directly.
purgero
01-19-2010, 05:01 PM
Update...
Jimmy has been helping me trouble shoot this problem. His last suggestion was to try re-uploading the V1.02 to a new test site, and see what happens since we had reinstalled our Windows server.
I did, and was able to trouble shoot all the php errors and fix them, but I'm still not able to upload images properly.
Through the admin site, the images are being uploaded to the images/upload directory on the server (the server is mine, so I logged directly on to it and looked in the folder), but when I open them up from the images/upload folder, they are black squares. Since they are there, and the black squares are showing up on the website, it is telling me that the permissions are all set properly, and everything is working fine, except the images are coming up solid black. I've even saved one from the website to my computer to see if it was viewable...it isn't.
Has anyone else had this problem? I've tried it with jpg's, gif's and png's. They are all coming out the same. The image is somehow being corrupted on it's way to the server.
My laptop is a 64bit Windows 7 machine...I've tried it on 32bit machines, Vista, XP...from different IP addresses...Nothing.
This issue has been going on for quite a while now, and I need to fix it soon, so if anyone has had this issues, I'd appreciate their input.
Paul
Jimmy Wu
01-27-2010, 01:49 PM
Sorry for this taking so long to look into. We are working on this in the backend ticket still and will bring Ray into the conversation if needed.
Jimmy Wu
01-28-2010, 01:51 PM
We were able to get the PowerStore v2 working after modifying some permissions on directories and replacing the HelperPHP.php file for Digital File Pro. For PowerStore v1, which uses Digital File Pro v1, we had to replace the existing Digital File Pro v1 server behaviors with Digital File Pro v2 server behaviors.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.