Jump to content

jim_d

Members
  • Content count

    25
  • Joined

  • Last visited

Everything posted by jim_d

  1. My web host gave me the path to Netpbm ( /usr/share/netpbm ), but I don't know what to do with it. How do I get this contribution (HTML Editor + UltraPICs Combined Contribution) to work with Netpbm?
  2. As mentioned before, Netpbm doesn't have to be "installed." Rather, you can find and download the files already compiled for different systems. You simply put the files in the catalog/netpbm folder and set the permissions to the folder and files to 755. There are nine netpbm files that you need - less if you don't use all four image formats. Look at the thread that I started on April 15, 2005, and finally resolved today. http://forums.oscommerce.com/index.php?showtopic=146492 It has the details spelled out. Based on looking through these posts, I think I may have solved a problem that is very common.
  3. I found a solution! I found two problems. The first problem is that the Netpbm directory is not properly specified, and the second problem relates to the use of the shell_exec command in catalog/admin/htmlarea/popups/lister.php. From what I can tell from some of the User Contributed Notes in the online PHP documentation of the shell_exec command ( http://www.php.net/manual/en/function.shell-exec.php ), there are cases where PHP needs to reference the FULL PATH to the application it's calling. I think this may be dependent on the type of system that it's on as well as perhaps some other factors. In order to solve these two problems, make the following changes in catalog/admin/htmlarea/popups/config.inc.php: find and replace with find and replace with Also, make sure that the permissions in the Image folders that you plan to use are set to 777. The nine Netpbm files above are the only ones you'll need in your Netpbm folder.
  4. I'm finally able to get Netpbm to work after weeks of learning and testing. At this point, it appears that the problem is related to changing the directory to the Netpbm directory and then trying to execute the Netpbm command files. It doesn't seem to work for some reason. So, I changed the commands to include the Netpbm path and like magic . . . it works! Next, I'm going to try to integrate what I've learned back into UltraPics. I've learned a bit about file permissions. Before, I was setting all permissions to 777 just to be sure there weren't any problems, but generally that isn't necessary. However, for consistency here in this forum, I'm still working with everything in the public_html directory. That means that the usual 755 permission will not be enough for test_netpbm.php to work. That's because test_netpbm.php writes to test_pic_dest.jpg. In other words, if you want to test this file for yourself without any modifications, you'll need to set your permissions in your public_html folder to allow reading, writing, and executing (use 777), and also make sure you put a valid jpeg file named test_pic_src.jpg in your public_html folder. Here's the new test_netpbm.php:
  5. Up until now, I?ve been wondering if there is a problem with the way Netpbm is configured on my server. So, today I did this experiment to determine if that?s the problem: I installed Gallery on my site and it was set up to use the Netpbm files located in /usr/share/netpbm. I was able to resize and rotate images without any problems. Then, I changed the configuration for Gallery to use the Netpbm files located in /home/xxplans/public_html/netpbm. Again, no problems. So, Netpbm appears to be functioning properly. That tells me that there really is something wrong with the Ultra-Pics contribution, or at least with my implementation of it. And, there?s something wrong with my stripped down test_netpbm.php file. I think I?ll focus on test_netpbm.php for now because there is so little there. It shouldn?t be that hard to figure out . . . but it is for me! I?ve been trying to get a better understanding of php syntax, shell_exec, and particularly sprintf. Often, I?ll make changes that seem logical to me, and I?ll get parsing errors or alternatively an error that says I?m trying to call an undefined function (jpegtopnm). In any case, I?d appreciate any hints, tips, advice, or solutions!
  6. OK, I got into lister.php, and stripped it down to its essence so that someone who knows what they're doing should be able to look at the code and quickly understand it, and hopefully be able to figure out what's wrong with it. I've posted the entire file below. I named it test_netpbm.php and put it in public_html. I also put a JPG file named test_pic_source.jpg in public_html. I set the permissions for public_html, test_netpbm.php, and test_pic_source.jpg to 777. I verified that jpegtopnm, pnmscale, and pnmtojpeg are located in /usr/share/netpbm/ and executable as my web hosting provider claims. (I used php is_executable to verify.) The results are the same. That is, the new file test_pic_dest.jpg is created, but it is empty. Does anybody see what the problem is? test_netpbm.php:
  7. Here are a few of the things that I have tried, but so far nothing has worked. (That is, I haven?t been able to upload images using the resize feature.) 1. I tried finding the correct Netpbm files for the server that I?m on, but can only find RPM versions. From what I can tell, you need more authority than I have to unpack an RPM file. 2. In admin/. . . /config.inc.php I changed define("NETPBM_DIR", trim(DIR_FS_CATALOG)); to define("NETPBM_DIR",'/usr/share/netpbm/'); 3. I wrote some php code (!) which copied the Netpbm files located at /usr/share/netpbm to the Netpbm directory that came with this contribution. (And of course changed config.inc.php back to the way it was originally.) It turned out that I couldn?t change the permissions on the files with CPanel. (All of the permissions were at 644.) So, I moved the entire netpbm directory to another location, created a new netpbm directory under public_html, and finally copied the netpbm files over to the new directory. I was then able to chmod all of the files (and of course the directory) to 755. 4. I noticed that if I chdir(trim(DIR_FS_CATALOG)); echo getcwd() . "\n"; then I get /home/xxplans/public_html as the result. So, I tried changing the config.inc.php again. This time I changed define("NETPBM_DIR", trim(DIR_FS_CATALOG)); to define("NETPBM_DIR",'/home/xxplans/public_html/netpbm/'); 5. I tried a few other things that make even less sense than the other attempts, but so far, nothing appears to make any difference at all. I?ve been pushing my knowledge limits, and am quickly running out of ideas. I?ve started looking at lister.php, but haven?t really done much with that yet. Also, I?ve noticed that I dont have ALL of the netpbm files that I see in config.inc.php. But I do have all of the ones shown for NETPBM_JPG. JPEGs are the only files I?ve tried uploading so far. Any ideas other than ?Bump??
  8. How can I force product quantities to always be one? I’ve tried the Download Controller and the Drop Down Button in Shopping Cart contributions. I’ve also tried a change I found on this forum that prevents users from changing the number in the quantity column of the shopping cart. However, in all cases, if the user “Adds to Cart” a product that’s already in the cart, the quantity gets incremented. I want the quantities to always be “1” since all I have are downloadable documents. Ideally, each product should have it's own attribute that determines the maximum quantity that can be ordered. I don't need that level of sophistication at this time though. For now, I'd be happy if all products are limited to a quantity of one. Am I overlooking something on this forum or a contribution?
  9. Thank you. That works great! I had been trying (unsuccessfully) to figure out where (in what file) the increment was taking place. I didn't even look in "application_top.php." That brings me to another question. I gather from other posts in the forum that there is no flowchart for the osCommerce code. But, is there perhaps a description of the function of each file? The only thing that I know about is "tep_database-pr2.2-CVS.pdf," which only gives me insight into database structure, not functionality.
  10. How should a person go about using multiple contributions? In my case, starting from a fresh installation of osC, I used the Echo Payment contribution with good results. Then, I tried using the Download Controller contribution, which overwrote some of the Echo files. Therefore, my Echo Payment module quit working properly. I reverted back so that the Echo Payment module works again. So, I figure that in order to use any new contribution that uses a files that has already been modified, I would have to go through line by line to figure which lines to use, etc. A person would have to be pretty good programmer to do that without creating more problems than solving. How are you supposed to do it?
×