Forums

PHP

This topic is locked

Problem with live data viewing

Posted 25 Jul 2001 07:39:51
1
has voted
25 Jul 2001 07:39:51 Patrick Meunier posted:

Hi,

I made a inscription page. It is simple. Login,pass and email. I've inserted php server behavior "insert record PHP". When I launch live data in the view menu it tell me that there is an error.

"Fatal error: Failed opening required './file:///D|/Program%20Files/EasyPHP/www/Club%20de%20science-fiction/adodb/adodb.inc.php' (include_path='') in d:\program files\easyphp\www\club de science-fiction\zone membre\inscription.php on line 7"

It seems to be a problem with database driver...can you tell me how I can correct that??

Patrick
-------------
Reset! The one magical button!!!


Replies

Replied 25 Jul 2001 16:56:59
25 Jul 2001 16:56:59 Tim Green replied:
It's not a problem with the database driver. It is in fact a problem with the way that you first implemented the page.

The clue is in the path :-
file:///D|/Program%20Files/EasyPHP/www/Club%20de%20science-fiction/adodb/adodb.inc.php

This tells me that you applied database interaction behaviours to the page before you saved it. But no problem, there is a solution.

Open up your file 'inscription.php' towards the top of the page you should see the following lines :-

<?php


// Copyright (c) Interakt Online 2001
// www.interakt.ro/

require("./file:///D|/Program%20Files/EasyPHP/www/Club%20de%20science-fiction/adodb.inc.php";
require("./file:///D|/Program%20Files/EasyPHP/www/Club%20de%20science-fiction/Connections/connTest.php";
?>

Delete them. Now save your page.

Look in the Server Behaviour Palette, and you should see that there is now a red exclamation mark next to one (or more) of your behaviours.

Double click on the first item marked with the exclamation mark, it should open the server behaviour, and there will immediately pop-up an error message.

Click OK to remove the error message.

Click OK to reapply the behaviour.

Save the file again.

All the exclamations should now be gone, and if you look at the code of your page you will see that the path to the adodb.inc.php file is now a relative path instead of an absolute one.

I hope this helps,

Tim Green
Webmaster
www.rawveg.org (Coming Soon)

Edited by - rawveg on 07/25/2001 16:58:01
Replied 25 Jul 2001 18:16:27
25 Jul 2001 18:16:27 Patrick Meunier replied:
Hi Rawveg

I found the problem yesterday night...;0) I forgot to put a recordset! Thanks for your help, I take note of details...



Patrick
------------
Reset! The one magical button!
Replied 25 Jul 2001 20:45:10
25 Jul 2001 20:45:10 Patrick Meunier replied:
Hi,

I have another problem now!<img src=../images/dmxzone/forum/icon_smile_blackeye.gif border=0 align=middle>

Here is the two errors:

"Warning: open(/tmp\sess_2d3de4a81987efc1f32afdc1cc49db1b, O_RDWR) failed: m (2) in d:\program files\easyphp\www\club de science-fiction\zone membre\membre.php on line 11

Warning: Cannot add header information - headers already sent by (output started at d:\program files\easyphp\www\club de science-fiction\zone membre\membre.php:11) in d:\program files\easyphp\www\club de science-fiction\zone membre\membre.php on line 40"

I don't know what is it...



Patrick
------------
Reset! The one magical button!
Replied 25 Jul 2001 21:36:20
25 Jul 2001 21:36:20 Tim Green replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
"Warning: open(/tmp\sess_2d3de4a81987efc1f32afdc1cc49db1b, O_RDWR) failed: m (2) in d:\program files\easyphp\www\club de science-fiction\zone membre\membre.php on line 11
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

This error is occurring probably because you don't have permissions to write to the /tmp directory. You're using file based sessions on the page in question, so you need to either change the permissions on the /tmp directory so that your webserver & php can write there or get your system administrator/ISP to do it for you.

The second error happened because the first error sent output to the browser, preventing headers being sent.

Tim Green
Webmaster
www.rawveg.org (Coming Soon)
Replied 25 Jul 2001 22:18:01
25 Jul 2001 22:18:01 Patrick Meunier replied:
Thanks a lot Rawveg!<img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>

Patrick
------------
Reset! The one magical button!
Replied 26 Jul 2001 09:13:55
26 Jul 2001 09:13:55 Patrick Meunier replied:
Hi Rawveg,

Finally, I've not understand.<img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

I'm administrator of my computer...the only user who serve is that one...so administrator have all power and permissions....I found on an hints on the forum of my application server easyphp....it is probably an path error... Do you know how I can correct that??

Patrick
--------------
Live Data is begin to make me crazy!!!

Patrick
------------
Reset! The one magical button!
Replied 26 Jul 2001 10:49:25
26 Jul 2001 10:49:25 Tim Green replied:
OK, let's get one thing straight. Live Data is not the problem, rather it is the peculiar configuration of your system.

Unfortunately, from the details supplied I can't help you any further on this. If there is a path error, then this must be coming from your installation of EasyPHP.

The error message causing the problem :-
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
"Warning: open(/tmp\sess_2d3de4a81987efc1f32afdc1cc49db1b, O_RDWR) failed: m (2) in d:\program files\easyphp\www\club de science-fiction\zone membre\membre.php on line 11
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Actually states quite clearly that opening a file from the directory /tmp failed. This occurs usually because the webserver process hasn't the permissions to access the /tmp directory as it is undoubtedly outside the WebRoot.

The only other reason it would fail, would be because the folder doesn't exist. Which is another possibility.

I guarantee you that the problems you are having are nothing to do with Live Data (I use it daily).

Check to see if anyone on the EasyPHP forum have been having the same problem with the /tmp directory. If so, they should have a resolution.

Sorry I can't be of more help.

Tim Green
Webmaster
www.rawveg.org (Coming Soon)
Replied 26 Jul 2001 12:07:03
26 Jul 2001 12:07:03 Bruno Mairlot replied:
bizz876,

could you please tell us what system you're running your PHP server ?

If it is on Linux, this is indeed a very strange problem.

The fact that /tmp is outside WebRoot doesn't matter because /tmp should be world writeable (every process uses it)

If you're on Windows /tmp is NOT accessible, you muse configure PHP to use C:\WINDOWS\TEMP instead (or whatever TEMP directory you want as long as you have access to this dir)

I know that this is a very common problem for storing session under Win32 because, PHP is by default configured to use /tmp for session.

I'm using Apache/PHP/Win2K and I can use Live Data daily too.
Here is a quote from php-dist.ini :

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored.
<b>session.save_path = /tmp</b>


; Whether to use cookies.
session.use_cookies = 1
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Change session.save_path to your directory. It should work fine !



"First they laugh at you, then they fight you, then you Win..." Ghandi
Replied 27 Jul 2001 00:47:31
27 Jul 2001 00:47:31 Patrick Meunier replied:
Hi,

I run easy php on win2k. Easy php is an application server like cold fusion server ...I think!<img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

It install php/apache/phpmyadmin/mysql. Like when you install it one per one. The big problem is that I have a php.ini but it's empty! So I can't change the path of /tmp...

If I insert the code who is normally in php.ini would it correct that problem?? And if it yes can you give me this code??

Thanks for your help guys<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Patrick
--------------
Live data is cool, but I have weird things to manage it!!<img src=../images/dmxzone/forum/icon_smile_shy.gif border=0 align=middle>

Patrick
------------
Reset! The one magical button!
Replied 27 Jul 2001 00:51:11
27 Jul 2001 00:51:11 Bruno Mairlot replied:
Well,

First make sure your php.ini will correctly be read by PHP when Apache launch.

Second, php.ini is a bit long and a bit off topic to post here, but neverthless, you can download the full php distro on www.php.net, and in the zip file, you should find a correct php-ini.dist file.

If you can't find it, I can send you one.

Bruno

"First they laugh at you, then they fight you, then you Win..." Ghandi
Replied 28 Jul 2001 08:45:59
28 Jul 2001 08:45:59 Patrick Meunier replied:
Thanks all!!!<img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>

All is under control now (I think,who can be sure of the future!!<img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle> ...I've find a php.ini on php.net and its okay....I've buy a book on PHP4 and MYSQL too....a VERY good tool!!!

I thank you all for help and hints you give me!

Patrick aka bizz876
------------------------
Live data will be easy for me in few days!!!<img src=../images/dmxzone/forum/icon_smile_shock.gif border=0 align=middle>

Patrick
------------
Reset! The one magical button!

Reply to this topic