[thelist] configuration php.ini

Eveline e.vanhemel at pandora.be
Tue Nov 18 02:10:50 CST 2003

Hi guys,

I have the following problem. I developed an e-commerce site using php. I tested it first on my pc (with Apache 1.3.20 and PHP 4.0.6 installed) and everything went fine. Afterwards I migrated the site to our webserver (with Apache 1.3.23 and PHP 4.1.2 installed). But then the problem started. A have a page (register.php) that I use quite regularly as an include file throughout the site. To avoid that I had to hard code all the links to which the formfield variables are sent, I thought of the following solution:

$submitpage = $_SERVER['SCRIPT_FILENAME'];

Afterwards I use the variable $submitpage as follows:

PRINT "<form method='post' action='$submitpage'>";

On my pc this works fine. Say for instance the page register.php is included in the page cart.php then the value of $submitpage is cart.php, on the other hand on the webserver the variable has the following value:  /home/www/www.studiogrfx.be/htdocs/store/cart.php. In other words it exposes the full path to the page. Clearly everything goes wrong from this point. 

Because of this I was pretty sure that the problem had something to do with a configuration option in php.ini. I compared both php.ini files but I can't seem to find where the problem lies. Does anybody know where I have to look for?

Thanks in advance,

Eveline Vanhemel     

More information about the thelist mailing list