homepage Welcome to WebmasterWorld Guest from 54.227.215.140
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Server upgrade: Will cgi/php scripts stop working?
HoHum

5+ Year Member



 
Msg#: 3666562 posted 11:12 am on Jun 4, 2008 (gmt 0)

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?

 

henry0

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



 
Msg#: 3666562 posted 12:00 pm on Jun 4, 2008 (gmt 0)

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

HoHum

5+ Year Member



 
Msg#: 3666562 posted 1:18 pm on Jun 4, 2008 (gmt 0)

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.

henry0

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



 
Msg#: 3666562 posted 2:20 pm on Jun 4, 2008 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved