RE: [PHP] Sourcing Image file to <IMG> tag

From: Date: Wed, 11 Oct 2000 06:33:45 +0000
Subject: RE: [PHP] Sourcing Image file to <IMG> tag
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19579@lists.php.net to get a copy of this message
Folks, I am really at my wits end here. For the life of me, I cannot understand why PHP is misbehaving on my system. It functions properly in some senses, but fails to perform at all in others, >>with no indication of any reason for a problem<<. I'm running php under Linux 2.2.5. I've posted similar problem reports before, but here is a very stripped down set of files that reproduces the difficulties I'm having: ----------- 1) I have a "cgi-bin" type directory in which I store utility php scripts, php scripts that define classes, etc. It is /home/httpd/php. I have ScriptAliased this directory to /php/ in httpd.conf. 2) I have a simple file called /home/httpd/php/test.php which contains only the following: <? phpinfo(); ?> 3) I have a simple html file called /home/httpd/html/test1.html which contains only the following: <html> <script language="php"> include("test.php"); </script> </html> When accessed from a browser, test1.html behaves properly. 4) I have another simple html file called /home/httpd/html/test2.html which contains only the following: <html> <img src="/php/test.php"> </html> Before anyone thinks I've taken leave of my senses, I >>expect<< this to cause a problem. I started out with test2.html setting the src property to an "inline" image-generating php file. When I couldn't get that to work, I opted for the simplest thing I could find to demonstrate the problem. Accessing test2.html in a browser shows a broken image icon (whose path, BTW, appears to be www.mydomain.com/php/test.php, which is clearly wrong). But no error! (And no error in the httpd error_log, either). 5) Another oddity: I cannot log php errors to a file. They display properly in the browser -- which I don't want in a production environment -- but turning on file logging doesn't work. Do you have to turn >>off<< display error logging to get >>file<< error logging? ------------- What is particularly maddening about this whole thing is that I had this entire shebang working fine a few weeks ago. So it's my fault that I've obviously tweaked something that royally screwed it up. But I can't imagine using a piece of software in a production environment that fails to perform and gives absolutely no indication anywhere of why it's failing, and doesn't even allow you to log errors to a file to try and figure out what the heck has gone wrong! I'd sooner just rip all my hair out today and be done with it. But I'd also really like to use php, since it's a very slick concept. So I'd like to suggest to the php developers that they need a >>significant<< enhancement of php's error tracking and error reporting code. And I'd also >>love<< to get some suggestions on what's causing my (current) problem. - Mark

« previous php.general (#19579) next »