Click to See Complete Forum and Search --> : newbie type problem


balsa8
05-08-2006, 08:40 AM
Hi all:

I downloaded and unzipped a project called phpcollab. I was trying to get it to run on my web server. I follow the directions to install it. I use Mozilla to go to /installation/setup.php.
After filling out the form, i hit submit and i get the warning:

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/apache2-default/installation/setup.php on line 249

At lines 248-249 is the code:

$fp = @fopen("../includes/settings.php",'wb+');
$fw = fwrite($fp,$content);

i grep-ed for "apache" looking for some path definition and I find a line of code in the same file which looks like it so i changed it to:

\$fullPath = "/var/www/apache2-default"; //no slash at the end

since that is where i have always put php scripts. i took a community college course that included PHP MySQL programming. I look at this thing with over 500 script files - whoa! this ain't like the homework assignments!

regards

bokeh
05-08-2006, 08:56 AM
What is your include path?

balsa8
05-08-2006, 09:27 AM
not really sure, where is it defined? I don't have access to system at the moment.

bokeh
05-08-2006, 09:29 AM
remove the @ and read the error message!

balsa8
05-08-2006, 09:38 AM
thanks! i will try that, but I cannot do it at the moment since i don't have access to the system.

regards

bokeh
05-08-2006, 10:08 AM
thanks! i will try that, but I cannot do it at the moment since i don't have access to the system.

regardsYou don't need system access to edit a PHP file.

balsa8
05-08-2006, 10:20 AM
i guess you mean remove "@" from the line of code:

$fp = @fopen("../includes/settings.php",'wb+');

then access the PHP file w/ a browser and see what error occurs? I don't see how i can do that without a system running apache, PHP5, etc which the laptop i have now does not have these things. Thanks!

Anyway, what you said helped me google search and find reference to include_path variable which i shall try grep-ing.