PHP won't see one include

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

PHP won't see one include

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

short tags problem?
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Post by dstefani »

feyd wrote:short tags problem?
Could you explain? "Short Tags".

Thanks,

- dstefani
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

<? vs <?php
short tags vs standard tags
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply