Now i normally use this metod but at the moment i am using my mac as a server so i am using MAMP. The problem is , i have a main file (index.php) that includes config.php and list.php. When i view the page it says that the varibles in config.php dont exist in list.php. Is there some kind of option in php.ini that might be doing this?
note: i have also tried require and no errors are displayed
Don’t enable register globals - there’s absolutely no need for it. Your problem lies elsewhere. It’s probably not a php.ini setting, assuming you’ve left it at php defaults. I’d be starting with directory permissions… make sure you have the appropriate user + permissions set. It may be surpressing the errors trying to include the file.
Set your error level to the most verbose (E_ALL), that should pick up anything it’s missing.
Actually, I’m kind of assuming with the above advice, that your files aren’t including correctly.
Sniper Jo, could you by chance post the code you’re working with? It might help more in finding a solution. With the information you posted it could be a number of things and seeing the code you’re using may help us out more.
I would assume, like ironikart said, that’s it’s probably not a php.ini problem if you left the default settings alone, but just incase open your php.ini file and have a look for your “include_path”. Make sure that the include_path is set to work for relative includes. Meaning it should have a dot ( . ) as part of the path.
I’m not on a Mac but my include_path in my Windows php.ini file looks like so:
**My Linux include_path looks like so: include_path=“.:/php5/includes”
Notice the . before the ; (on windows) and the : (on linux). That makes sure that you’re allowing relative includes.