473,386 Members | 1,720 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,386 software developers and data experts.

cannot do system() exec() or anything +cannot unlink

Hey I've been searching the internet and manuals for help for hours
and I'm still clueless. I wanted to delete a file in /var/www/html/
lista from a script /var/www/html/lista-drop.php. Apache runs as user
& group apache. I've chowned & chgrouped the file and parent directory
(lista). I've chmodded 777 both. I did so from both shell and the
script. From the script, I can read files from the folder, I can
create a file and delete it. It turned out the created file and the
old file have the same group & user yet I cannot delete the old file.
No other script is running at the meantime, no process blocks the
file. Originally the old file was created by root in other folder and
moved to /var/www/html/lista/. PHP is not running in safe mode, at
least /etc/php.ini & ini_get('safe_mode') say so. I have no idea why
this is happening. By the way I discovered any system() command
returns error code 127 (e.g. system("ls") or system("who") or
system("pwd") or system("rm ....")). Similarly exec(), popen() and
some other methods do nothing and don't show any output. What's going
on? Oh, my installation is: Fedora Core 6, PHP 5.1.6, Apache 2.2.3. I
attach the output of phpinfo() to http://www.tran.cba/apache.html
Jan 13 '08 #1
4 1972
Sorry, here's the correct link: http://www.tran.cba.pl/apache.html
Jan 13 '08 #2
On Jan 12, 5:37 pm, lukas...@gmail.com wrote:
Sorry, here's the correct link:http://www.tran.cba.pl/apache.html
sometimes, server config overide php.ini, and scripts not allowed to
execute, if they are under server user permission.. or you try to run
a scripts from server user permission into root permission..
Jan 13 '08 #3
sometimes, server config overide php.ini, and scripts not allowed to
execute, if they are under server user permission.. or you try to run
a scripts from server user permission into root permission..
Well how can I check this? It is a default Apache+PHP instance from
Fedora Core, only I've upgraded PHP.
Jan 13 '08 #4
On 13 Ene, 04:55, lukas...@gmail.com wrote:
sometimes, server config overide php.ini, and scripts not allowed to
execute, if they are under server user permission.. or you try to run
a scripts from server user permission into root permission..

Well how can I check this? It is a default Apache+PHP instance from
Fedora Core, only I've upgraded PHP.
every platform or even the same platform, have different location or
path,
so path maybe different to you

sample of My Path

/usr/local/www/vhosts/domain.com/conf/ ---------sometimes server
config here..
/home/sites/web/conf/ ---------sometimes server config here..

php.ini
/usr/local/etc/

but sometimes is, you have to configure it on plesk.. safemode off,
not with php.ini
Jan 16 '08 #5

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

Similar topics

2
by: Eric | last post by:
Hello, I created a form to upload files. The formfield contents are stored as records in an Ascii file "data.dat"; for reasons I am not using a MySql database. The upoaded file itself is stored...
5
by: Phil Powell | last post by:
print_r(is_file("$logPath/$logFileName")); // RETURNS 1 unlink("$logPath/$logFileName"); // RETURNS WARNING: PERMISSION DENIED This code should tell me that the file located at...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
2
by: Hendri Adriaens | last post by:
Hi, I succeeded in finding a workaround for the quotation bug in exec that caused an error in the apache error logs. here it is: exec('start "zip" /B "'.$winzip_path.'\wzzip" -m -s'.$password.'...
4
by: nitinpatel1117 | last post by:
Hi I am trying to delete a csv file using the unlink() function, but i keep getting a permission denied warning Warning: unlink(UsedNOS200704191.CSV): Permission denied in...
1
by: kw.housing | last post by:
I have all the library already in path: $ ls -l /opt/IBM/db2/lib64 | grep libdb2o -r-xr-xr-x 1 bin bin 7757295 Jul 12 2006 libdb2osse.a* -r--r--r-- 1 bin bin ...
2
by: TP | last post by:
Hi everybody, The following code does not redirect the output of os.system("ls") in a file: import sys, os saveout = sys.stdout fd = open( 'toto', 'w' ) sys.stdout = fd os.system( "ls" )
0
ashitpro
by: ashitpro | last post by:
Writing System Call Wrappers in User Space. Recently I saw a post in Linux/Unix section to know the user who deleted the file in linux. Currently there is nothing in linux which could achieve...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.