473,385 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

imagepng/jpeg/gif, permissions, Apache and CRON scripts - help

[PHP]
if ($this->isSuccessful && !$hasMogrified) {
// SMACK IT ALL TOGETHER
@imagecopyresampled($newImage, $image, $config['posX'],
$config['posY'], 0, 0, $config['width'], $config['height'],
$origWidth, $origHeight);
// SAVE TO FILE
$imageEvalStr = 'if (@!image' . $extArray[$type] . "(\"$newImage\",
\"$this->thumbLocationPath/$this->fileName\", $thumbDimensionInt))
{\n" .
' $this->isSuccessful = false;\n' .
' $this->setErrorArray(array(\'action\' => \'Could not
seem to save image "$this->fileName" onto
"$this->thumbLocationPath"\'));' . "\n" .
' echo "Could not seem to save image \"$this->fileName\"
onto \"$this->thumbLocationPath\";\n' .
"} else {\n" .
" echo 'I am trying to save \"$this->fileName\" onto
\"$this->thumbLocaitonPath\"\n';\n" .
"}\n";
eval($imageEvalStr);
}
[/PHP]

What this snippet is supposed to do is do either imagepng, imagejpeg,
imagegif, imagebmp or imagetiff PHP functions which will save the
image resource object binary contents onto the actual physical image
file.

However, consider this:

I am running a CRON script that runs outside of the document root,
owned by me "phil" who is part of the Apache group. It will
instantiate a class object whose method contains that snippet that
will auto-run that feature, which is found within the document root,
owned by me "phil", and manipulate images that are owned by me "phil"
in directories owned by Apache; the directories having permissions of
0770, the images permissions of 0644.

Nothing happens.

No errors, no warning, no notices, nothing. No images are generated,
nothing at all occurs within the directories whatsoever. I am
suspecting permissions errors but since no errors are being produced I
can't verify what is going on.

What I need to know from someone is this:

How can a CRON script, outside the document root, ultimately affect
images within the document root that the CRON script's owner does not
himself own (but is in the same group as the images' owner)?

I really need help as usual.

Thanx
Phil
Jul 17 '05 #1
0 1636

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: LRW | last post by:
Sorry to crosspost, but I have no idea if this is more a PHP question of general Linux question. I have a script that makes changes to image files, montages them into a jpg, and creates a Web...
3
by: Mike Wasilewski | last post by:
I created a (real estate) site which has an area that is used by the agent to post and edit property listings. They have the ability here to upload pictures. If the listing is new, it is...
2
by: gruddo | last post by:
Hi this is my first post. I have two webservers. I can run php code fine on one but not the other. Both webservers can read files only one can write. I have looked around at other posts and they...
9
by: jab3 | last post by:
So I'm considering a small project that involves online file storage. Let's say I wanted to set up a site that allows people to log-on, create an account, and then have space to upload files. The...
11
by: Dave Schwimmer | last post by:
I am relatively new to PHP. One of the things that seems glaring obvious to me (coming from a C/C++ background) is how 'open' everything seems - (AFAIK). For instance, URLs typically have the name...
7
by: none | last post by:
Hello: I had a nice php application running on my server here at home, and I uploaded it to a shared public type server and it started to break all over the place. It turns out that some...
6
by: kwest | last post by:
I just setup a new server with PHP 5 and ran into a problem with includes. Everytime I call something like require_once './includes/test.inc' I get a permissions message like this: Warning:...
3
by: eholz1 | last post by:
Hello PHP Group, I am having trouble setting permissions correctly so that the magickwand api (php 5.2) can read and write images. I usually read a file from one directory, create a magickwand...
30
by: Adam Baker | last post by:
Hello, I'm writing a site where a handful of people will be able to edit the content using PHP scripts (FCKeditor). The content is stored as individual files in a directory. I'd like to validate...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.