include failing to include...

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a virtual server with an ISP and I had a web based application
available for a customer to try out - it worked fine up until three
weeks ago - nothing has changed since then (I am the only one with
root password unless the ISP took control without my permission but
I'd doubt this).

I have Virtual (Named) Hosting enabled and I can test it via
individual url's responding appropriately.

On one specific URL I have an include as the first line... and there
are no error messages in the error log file, the html is rendered just
fine but various variables defined during the include are expected to
help fill in the html.  This was not happening hence I investigated.

To start with, my index.htm file includes a standard.php file.

The standard.php file leads with <? die("here I am"); ?> and I still
get my index.htm page and no "here I am".  I have tried a phpinfo()
too, and nothing happens.

In my index.htm file I have placed phpinfo and that works... as does
the "die()" too.

I know my pages are being caught by the php engine because I can call
a temp file with .htm or .php and both are rendered as expected by

The only thing I do know that might be related to this is if some safe
mode (php_safe?) was enabled.  My standard.php file lives outside my
directory tree... I've printed the include statement so that I can
confirm the full path and file name to be included is correct... so I
know its requesting the include properly... and because there is no
error message in my log file I know it is either 1) finding the file
but not doing anything with it or 2) ignoring the include request for
anything outside my document root.

can anyone guide me forward on this? is there something i am not
looking at?


Re: include failing to include...

oh... for the record:

Apache/2.0.54 (Fedora)
PHP Version 5.0.4

And... this is interesting as phpinfo reports "Virtual Directory
Support" as being "Disabled"... but if my application worked fine
before, why does it not work now?

Compiled by the ISP with the following

./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-
linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--
prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/
sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/
include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--
localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/
man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--
with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-
scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath'
'--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-
dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-
gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/
usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/
usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--
enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-
track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-
pear=/usr/share/pear' '--with-kerberos' '--enable-ucd-snmp-hack' '--
with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--
enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/
httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-
xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--
without-odbc' '--disable-dom' '--disable-dba'

Re: include failing to include...

This is my last bit before I put my head down for the night... its
driving me crazy...

My error log shows the following:

[client x.x.x.x] PHP Fatal error:  Call to undefined function
mysql_js_array() in /data/www/www.mydomain.moc/htdocs/register/
index.htm on line 106, referer: http://www.mydomain.moc/

The thing is...

# ls -ld /data/www/www.mydomain.moc/htdocs/register/index.htm
-rw-r--r--  1 apache apache 5481 Aug 28 23:26 /data/www/

How can this be?

Re: include failing to include...

Quoted text here. Click to load it

Well, is the function mysql_js_array() defined somewhere?

Re: include failing to include...

Quoted text here. Click to load it

Yes... it is contained within the include file... perhaps now you can
see my confusion!

I have given up for the moment as the access to the remote server is
slow making diagnosis, let alone a solution frustrating to find.

It is interesting to note that I
- have my local dev and remote prod server both configured similarly
(meaning same paths for apache/php/mysql and my document roots)
- unfortunately they don't use same versions of the middle ware
- after tinkering around and pulling my hair out I even took the easy
route more associated with microsoft boxes and rebooted but that
didn't help either.

My guess is my php.ini file has changed but I have no reason to
believe this is true (I am only one to have access).  I'll check into
it further and see where it goes...


Re: include failing to include...

Quoted text here. Click to load it

Are you sure the file is included succesfully? What does  
get_included_files() show right before your first attempt to use  
mysql_js_array()? A difference in servers often means a difference in  
Rik Wasmus

Site Timeline