When we open this url : http://localhost/index.php/test=2

Yep index.php/test=2 not index.php?test=2

Apache open the page index.php one time for every broke link he find in the
index.php page.  Example :

  // Simple PHP test page
<TITLE>Simple PHP test page</TITLE>
  <P>Simple PHP test page</P>
  <IMG SRC="image1.gif"><br>
  <IMG SRC="image2.gif"><br>
  <IMG SRC="image3.gif">

  // Keep a log

  /* Log table

CREATE TABLE `simple_log` (
  `sl_url`  VARCHAR(255) NOT NULL


  // Current time
  $now = time();

  // Database configuration
  $host     = 'localhost';
  $username = '';
  $password = '';
  $database = '';

  // Open a database connection
  $linkd = mysql_connect($host, $username, $password);
  mysql_select_db($database, $linkd);

  // Insert a log
  $sql = "INSERT INTO simple_log (sl_time, sl_url) VALUES ('$now',
  mysql_query($sql, $linkd);

  // Close the database connection

Images are broke because the path http://localhost/index.php/image1.gif
does not exist.  In this case, Apache open 4 times the page index.php.

Here the listing of the log table :

sl_time    sl_url
1005924055 /index.php/test=2
1005924055 /index.php/image1.gif
1005924055 /index.php/image2.gif
1005924055 /index.php/image3.gif

We have the same problem on 3 differents servers.

Compilation script :

'./configure' '--with-mysql=/virtual/mysql' '--enable-bcmath' '--with-gd'
'--with-dbase' '--with-curl' '--with-xml' '--with-pgsql=/virtual/postgres/'
'--with-imap' '--with-apxs=/virtual/apachedev/bin/apxs'

Apache version :


Php version :

4.0.6 and 4.2.0-dev

Do you have any suggestion to block the recusive call?  Thank you

Francis Grignon [[EMAIL PROTECTED]]
Analyse programmeur
Groupe iWeb Technologies Inc.

ICQ : #74395718
Tel : +1 514-286-4242

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to