Jump to content

VikR

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Everything posted by VikR

  1. It's working now. I needed to provide full path info to gnuplot. Code currently being used: $shellCommmand = "/usr/local/bin/gnuplot '" . $pathToCommandFile . "'"; $output = system($shellCommmand . " 2>&1");
  2. Checking httpd.conf, I see: <IfModule !mpm_winnt.c> <IfModule !mpm_netware.c> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don't use Group #-1 on these systems! # User myAdminUsername Group #-1 </IfModule> </IfModule> Next to "User" it shows the same admin name I use when logging in. I would think this would mean it would have full access to all files and folders. What could I be missing?
  3. I am running Apache via MAMP, a local amp stack running on my development system on my iMac. I am running MAMP and the Terminal in my own user account. Will Apache have different permissions for accessing files on the disk, than I have when I am running a command via the Terminal?
  4. When executed from the terminal, the following command works perfectly: gnuplot '/Applications/IPG/htdocs/ftp/company_name/Charts/gnuPlotCommandFile.gp' However, when I run it from inside PHP with: exec("gnuplot '/Applications/IPG/htdocs/ftp/company_name/Charts/gnuPlotCommandFile.gp'"); ...or: system("gnuplot '/Applications/IPG/htdocs/ftp/company_name/Charts/gnuPlotCommandFile.gp'"); ...nothing seems to happen. How can I correct this? Note - exec is enabled on my system, according to the following function: function exec_enabled() { $disabled = explode(', ', ini_get('disable_functions')); return !in_array('exec', $disabled); } Thanks very much in advance to all for any info.
  5. This is my first time using GD. I've got an image with a transparent background. All the other pixels are the identical color (#8bc4ed). I want to replace all those pixels with a given color, say #CCC5AC. Here's my code that doesn't work yet: $filepath = $_SERVER['DOCUMENT_ROOT'] . "/images/source_image.gif"; $image = imagecreatefromgif($filepath); $indexToSearchFor = imagecolorat($image, 3, 0); imagecolorset($image, $indexToSearchFor, 204, 197, 172); $filepath = $_SERVER['DOCUMENT_ROOT'] . "/images/target.gif"; imagegif ($image, $filepath); The output image is identical to the input image - no color is replaced. What is the correct way to do this? Here is a link to the image I'm trying to change in case you can tell anything from it: http://www.generalwebapps.com/images/header_2_selected.gif. Thanks very much to all in advance for any info!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.