Page 1 of 1

PHP won't see one include

Posted: Thu Jan 25, 2007 9:32 pm
by dstefani
Hello,

Mac OSX 4.8 PPC
PHP 5.2 http://www.entropy.ch Release 3 (using his php.ini)
MySQL 5.0.27-max via socket

My system won't see my db connection function.

I use a 'require_once' to call a file with just one function in it, my db connection function.

It tells me:
Fatal error: Call to undefined function db_connect() in...
If I leave everything as it is, and just copy and paste the function into the page that has the require in it, all the other required page are called just fine.

It must not even be seeing that file, because if I used the same function twice I get an error for doing that.

This is the second site I've tried to reinstall from backup since I rebuilt my entire OS last weekend with Tiger.
I forgot to mention that this install of PHP is a fresh one this week.

Can someone tell me what's up?

Thanks,

- dstefani

Posted: Thu Jan 25, 2007 10:17 pm
by feyd
short tags problem?

Posted: Thu Jan 25, 2007 10:20 pm
by dstefani
feyd wrote:short tags problem?
Could you explain? "Short Tags".

Thanks,

- dstefani

Posted: Thu Jan 25, 2007 10:23 pm
by feyd
<? vs <?php
short tags vs standard tags

Posted: Thu Jan 25, 2007 10:28 pm
by dstefani
OK, you are soooooooooooo right on!:D

Is this a PHP5.2 thing or a php.ini thing?

I know his php.ini has comments about being strict and safe, etc...

So cool.

My incConnect file is really old, I've been using it for some time now. (some long time)

Thanks!

- dstefani

Posted: Thu Jan 25, 2007 11:11 pm
by feyd
The short tags directive has been turned off by default for quite some time now. It will be removed entirely in future major versions of PHP.