php return 500 error but no error log

I am having an issue when I have a php application that is returning an internal server error (500) however nothing is showing up in the error log.

Now I know there are error with what I am trying to run, I know I have missing some files and what not but something should show in the apache error log (otherwise how are I supposed to know exactly what I am missing).

I created a test script is errors it in under the same vhost configuration and those error show up fine so everything seems configured right as far as php/apache. Are there certain php errors that does show up in the error log (php is configure to display any type of notice, warning, , error, fatal error, etc...)?

This is running on ubunut 10.04 with the standard apache and php from the ubuntu repo with apt-get.

Apache VirtualHost 403 Forbidden

I recently tried to set a test server up with Apache. The site must run under domain I always get a 403 Forbidden error. I am on Ubuntu 10.10 server edition. The doc root is under dir /var/www. The following are my settings:

Content of /var/www

ls -l /var/www/

total 12
drwxr-xr-x 2 root root 4096 2011-08-04 11:26
-rwxr-xr-x 1 root root 177 2011-07-25 16:10 index.html

Content of the host file on the server (with IP

cat /etc/hosts localhost americano

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Site config

<VirtualHost *>
ServerAdmin [email protected]

DocumentRoot "/var/www/"

ErrorLog /var/log/apache2/mytest-error_log
CustomLog /var/log/apache2/mytest-access_log combined

# This should be changed to whatever you set DocumentRoot to.
<Directory "/var/www/">
Options -Indexes FollowSymLinks
AllowOverride None

Order allow,deny
Allow from all

I have no .htaccess file in my doc root. The permissions are set correctly (readable by www-data).

If I type in the IP address from my desktop, the site shows up correctly. I changed the hosts file on my desktop to point to the server's IP. When I use it, I get 403. Since many functions of this site are sitename-sensitive, I have to be able to access the site by the domain name.

Another funky thing is, even if all log files are created properly, they have no information regarding this error.

I am stuck. Can anybody help?

file_exists() returns false, but the file DOES exist

I'm having a very weird issue with file_exists(). I'm using this function to check if 2 different files in the same folders do exist. I've double-checked, they BOTH do exist.

echo $relative . $url['path'] . '/' . $path['filename'] . '.jpg';
Result: ../../images/example/001-001.jpg

echo $relative . $url['path'] . '/' . $path['filename'] . '.' . $path['extension'];
Result: ../../images/example/001-001.PNG

Now let's use file_exists() on these:

var_dump(file_exists($relative . $url['path'] . '/' . $path['filename'] . '.jpg'));
Result: bool(false)

var_dump(file_exists($relative . $url['path'] . '/' . $path['filename'] . '.' . $path['extension']));
Result: bool(true)

I don't get it - both of these files do exist. I'm running Windows, so it's not related to a case-sensitive issue. Safe Mode is off.

What might be worth mentioning though is that the .png one is uploaded by a user via FTP, while the .jpg one is created using a script. But as far as I know, that shouldn't make a difference.

Any tips?