PDA

View Full Version : php problems



francesco
03-29-2008, 07:27 AM
Hi,

I've just uploaded my php scripts (already tested on my local machine) and I have the following errors:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/devisliv/public_html/index.php:10) in /home/devisliv/public_html/php/identify/SessionLoader.php on line 4

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/devisliv/public_html/index.php:10) in /home/devisliv/public_html/php/identify/SessionLoader.php on line 4

Warning: require(MDB2.php) [function.require]: failed to open stream: No such file or directory in /home/devisliv/public_html/php/db/PearConnection.php on line 2

Fatal error: require() [function.require]: Failed opening required 'MDB2.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/devisliv/public_html/php/db/PearConnection.php on line 2




PearConnection doesn't seem to find MDB2.php, but the file is in the php folder.

So, I have 2 problems:

1) why PearConnection doesn't find MDB2.php
2) why I have a warning when I try to open a session

Can somebody please help me?

Thanks,
Francesco

linFox
03-29-2008, 07:58 AM
The first two errors are caused by something that's being echo'd/print'ed to the page before the session is started - ensure the session_start or similar comes before any and all output.

The second two errors are simply because the file can't be found - it's not in the same directory as PearConnection.php (that's the way it's being called, same directory), and it's not in include_path. You'll have to add the absolute path to MDB2.php in PearConnection.php on line 2.

francesco
03-30-2008, 08:39 AM
thanks a lot.

the first 2 errors were caused by an "echo" and the last 2 by a problem during the module install