Web Hosting Talk







View Full Version : php share/pear error


sir_han
02-24-2005, 03:18 AM
Hi there, I'm having some problems running my PHP files. I'm getting this error:

Warning: Failed opening '.php' for inclusion (include_path='.:/usr/share/pear') in /path/to/php/file.php on line 123

For some reason, it worked on my other server, but it's giving me this error on my new server.

here is the list of PHP configure commands:

'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-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/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'

Any ideas? What should i be looking at?

gabbar
02-24-2005, 03:28 AM
Hi,

There's a similar thread on this site. Please have a look at the following link:

http://www.webhostingtalk.com/archive/thread/171092-1.html

The document contained might be helpful in this case.

Regards,
Gabbar

sir_han
02-24-2005, 03:58 AM
It is replacing $page with nothing and then trying to open .php (I assume)

<?php include ("$page.php"); ?>

is becoming:

<?php include (".php"); ?>

Try....

<?php

$page='name-of-the-page';

include ("$page.php");

?>

And that will try and load name-of-the-page.php rather than just .php

i tried that, but whatever i named the $page= will only bring that page up.

I want it to be able to bring up the page that goes on the end of the url, for example:

in index.php i have:

<? include('$page.php');?>

and here's the URL:

http://mysite.com/index.php?page=home (will give me home.php page)

http://mysite.com/index.php?page=contact (will give me contac.php page)

etc.

Is it something with Redhat 9 Linux or compilations that is missing? This worked 100% fine on my Redhat 7.3 Linux server. hmmm

gabbar
02-24-2005, 04:08 AM
Hi,

Since it worked fine with RedHat 7.3, then I guess it should be working here! I'm sorry I won't be able to help out with RedHat 9, as I never used that. Try doing a bit more searching. Php.net might have an answer on this or the redhat mailing list.

Best wishes,
Gabbar