HyperSurf Internet Services
Get Residential DSL from HyperSurf Internet Services
Monday July 07, 2008     
    Support  |   Contact Us  |   News   |   Policies   |   Local Access Numbers  |
Customer Login Search Our Site Join Us Today! Look at our billing policies HyperSurf Internet Services

Services


Dial-Up Services

Web Hosting

AT&T Territory Home DSL

AT&T Territory Business DSL

Verizon Territory DSL

Verizon Territory Business DSL

T1 Service

Co-Location

Dedicated Servers

Palace Hosting

Domain Registration

E-Commerce

Consulting

Other Services

FAQ's about PHP


Q. What is PHP ?

A. PHP is an open source, server-side, cross-platform, HTML embedded scripting language that is often used as a front-end for databases, such as Mysql. < DD >  


Q. What extension should I use for PHP scripts? 

A. PHP Scripts need to have a .php extension..


Q. What version of PHP is on the server ?

A. It is version 4.12 


Q.I'm trying to install a PHP script and I'm getting the following error: "Warning: SAFE MODE Restriction in effect". What does this mean? Can you disable safe mode for my site. do I access my WWW/FTP site ?

A. For safety we run our servers in safe mode.When in safe mode PHP checks to see if the owner of the current script matches the owner of the file to be operated on by a file function.

For example:
-rw-rw-r--    1 rasmus   rasmus       33 Jul  1 19:20 script.php 
-rw-r--r--    1 root     root       1116 May 26 18:01 /etc/passwd
Running this script.php
<?php
 readfile('/etc/passwd'); 
?>
results in this error when safe mode is enabled:
Warning: SAFE MODE Restriction in effect. The script whose uid is 500 is not 
allowed to access /etc/passwd owned by uid 0 in /docroot/script.php on line 2

However, when you wish to write or modify a file using PHP, you need to use the CGI version of the facility, so that you can perform the operation using your own account user ID. This allows you to use secure permissions on writable files.

When using the CGI version of PHP, you can modify files with standard "owner write" permissions (chmod 644) and write files in directories that have standard permissions.

We've installed the CGI version of PHP at "/usr/local/bin/php4.cgi". You can call it from a stub executable in your cgi-bin. Create a text file in your cgi-bin called "php4.cgi" containing this line "#!/usr/local/bin/php4.cgi". Chmod it 700, and then you can use a URL similar to:

http://www.hypersurf.com/cgi-bin/php4.cgi/~username/filename.html

In the example above, PHP code in "filename.html" will be processed by PHP. Substitute the word "username" with your own account user name. This will allow you to execute PHP commands as your own account ID in the same way that CGI scripts are executed on our system.

 

Back to Technical Support FAQ's


Copyright 2004 HyperSurf Internet Services.