Welcome to WebmasterWorld Guest from 54.162.248.199

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Server upgrade: Will cgi/php scripts stop working?

     
11:12 am on Jun 4, 2008 (gmt 0)

10+ Year Member



Hi

After complaining my hosts have offered to move our site to a new faster server. Good.

However, the php security has increased and I am wondering whether some of the scripts we use will stop working.

Our site is updated every night in a 'hybrid' fashion. We number crunch and pull data out of mysql databases using php and create static html files. This works fine for us.

we overcame the 'nobody' file permission problem by using a cgi script to execute the php file (nothing else we tried had enough permission). I didn't write it so I don't fully understand why that works but it does!

it runs something like

os.system( "php /create_pages.php > /out.txt" )

the create_pages.php script can then do whatever it likes to the files.

The new server stats (snippet) are as follows

"PHP5 & 4 with suphp mode
MySQL 5

server setup with max security so

Max file permessions : 644
Max dir permissions : 755
No PHP directives are allowed in .htaccess anymore
Won't allow [$IPADDRESS...] invocations anymore
Won't allow nobody file ownership"

Is this enough information to determine whether it will stop the file creation scripts from working?

Can anyone offer any advice?

12:00 pm on Jun 4, 2008 (gmt 0)

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I do not really understand, are you asking a question
without even testing what the output of your test could be?
anyway, you should try to use fopen [us2.php.net]
if the file exists then it could be open, read, written.
if the file does not exist then php will try to create it.
Using:
if(!fopen( etc...
you will have the answer
1:18 pm on Jun 4, 2008 (gmt 0)

10+ Year Member



the point you are missing, I think, is that we haven't moved to the new server yet.

before accepting the server upgrade I wanted an idea of whether the cgi/php scripts would stop working i.e. no longer be able to create files.

2:20 pm on Jun 4, 2008 (gmt 0)

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



OK got it :)

When a file is created, 644, means the owner can read and write the file, but all others can only read the file

 

Featured Threads

Hot Threads This Week

Hot Threads This Month