Forum Moderators: coopster
thanks.
Forbidden
You don't have permission to access /intan/online3112/<br /><b>Notice</b>: Undefined variable: PHP_SELF in <b>d:/apache group/apache/htdocs/intan/online3112/la_addnewsite.php</b> on line <b>261</b><br /> on this server.
actually, the story is like this:
i have copied the original php files (my programs) into another pc and run them. the 2nd pc is already installed with apache 1.3.23 and mysql for win32. it doesn't work like it should be (it works fine in 1st pc). after i run them in the 2nd pc, one of the errors is:
Notice: Undefined variable: rowP in d:\apache group\apache\htdocs\latest_060204\online3112\mam_display_existingsite2.php on line 233
and most of the errors are regarding to undefined variables, including the PHP_SELF. (fyi, $rowP = mysql_fetch_array($db)).
the difference between the 1st and 2nd pc is the location of where Apache is installed (1st pc in C:/ and 2nd pc is in D:/). but i guess it is not the matter of where the apache is installed, right?
what's going on? what do i have to do?
Like coopster said, try replacing PHP_SELF with $_SERVER['PHP_SELF']. It depends on the server configuration how you can access this variable, sometimes you need to do it through $_SERVER['PHP_SELF'] (and sometimes just through $PHP_SELF).
It looks as if you are only receiving notice errors so the first thing I would check is the PHP error_reporting level. Second, register_globals. You'll find both directives in the php.ini and both can be overridden. There is a PHP Troubleshooting [webmasterworld.com] tip on error_reporting in the PHP Forum Library. There is an overview and plenty of links to help you understand how PHP reports errors.