FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


an annoying problem - PLEASE help





progman89
Hello, I just received my free hosting. I had been putting the final touches on a PHP Advanced Transfer Manager system yesterday and everything was going fine. Today, I got back on and tried to log in and immediately encountered a problem after using login.php:

Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@progman89.frihost.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


So I went to the server error log in CPanel and got these logged as the last errors:

Quote:

[2005-09-05 03:02:30]: error: file is writable by others: (/home/progman8/public_html/phpATM/index.php)
[2005-09-05 03:01:05]: error: file is writable by others: (/home/progman8/public_html/phpATM/login.php)


It seems that the server is automatically CHMODing my index.php files and login.php files to 755...but for Advanced Transfer Manager to work they must be CHMODed to 777 (only the ones for Advanced Transfer Manager). I'm almost certain that's the problem. It wasn't doing this yesterday...any ideas? I would really appreciate some help since this is making my site useless Very Happy

Update
I let the server do the auto CHMODing and tried to login. I got this.

Quote:
Warning: fopen(pool_users/progman89): failed to open stream: Permission denied in /home/progman8/public_html/phpATM/include/functions.php on line 616

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 617

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 618

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 619

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 620

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 621

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 622

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 623

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 624

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 625

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 626

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 627

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 628

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 629

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 630

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 631

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 632

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 633

Warning: fwrite(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 634

Warning: fclose(): supplied argument is not a valid stream resource in /home/progman8/public_html/phpATM/include/functions.php on line 635

Warning: Cannot modify header information - headers already sent by (output started at /home/progman8/public_html/phpATM/include/functions.php:616) in /home/progman8/public_html/phpATM/login.php on line 395



Here are the lines referenced:

lines 616-635 from functions.php wrote:
$fp = fopen($userfilename, "w+"); // File named as User Name
fwrite($fp, $enc_user_pass); // 1st line: Encrypted user password
fwrite($fp, "\n");
fwrite($fp, $enc_logged_user_id); // 2nd line: Encrypted user session ID, 0 - if user logged out
fwrite($fp, "\n");
fwrite($fp, $user_email); // 3rd line: User E-Mail address
fwrite($fp, "\n");
fwrite($fp, $user_status); // 4 line: account status: 0 - Administrator, 1 - Power User, 2 - Normal User, 3 - Viewer (view only), 4 - Uploader (upload only)
fwrite($fp, "\n");
fwrite($fp, $activationcode); // 5 line: 1 - if account active, 0 - if disabled, other value - activation code
fwrite($fp, "\n");
fwrite($fp, $user_temp_info); // 6 line: any temporary information
fwrite($fp, "\n");
fwrite($fp, $user_wish_receive_digest); // 7 line: User wish to receive files digest via e-mail
fwrite($fp, "\n");
fwrite($fp, $user_account_creation_time); // 8 line: The time when user account created
fwrite($fp, "\n");
fwrite($fp, $language); // 9 line: Lingua selezionata
fwrite($fp, "\n");
fclose($fp);


line 395 from login.php wrote:
header($header_location.'index.'.$phpExt.'?'.SID);
budazz
thats a big problem....the admin is the only person who can help...i think Smile
orno
getting the same errors with my Gallery Installation (v1.5) installed through Fantastico

was working fine 2 days ago, and then late last night/today morning, i started receiving this error too...

will post my server error log as soon as i get home and access cpanel..
Bondings
Can you give me the url's of the files? I'll try to look at it.
orno
http://orno.frihost.net/gallery/

still the same error btw
Bondings
orno wrote:
http://orno.frihost.net/gallery/

still the same error btw

Remove the files and then the directory. After that, recreate it and put back the files. *This should work, hopefully.*
Daniel15
This is caused because the server is not letting the PHP scripts run with the file permissions (set using CHMOD) set to 0777. This is because you set both write access and executable access on the file (so every user on the server can write to your file). The server is just being a bit paranoid (and as well as this, hackers with an account on the server could theoretically put any code they want into your files).

Unfortunately, scripts that edit themselves need to be set up like this. I don't think that PHP scripts need to have the executable bit set (because they're not really run as scripts, but rather parsed by the PHP engine). Try CHMOD'ding to 0766 and try again. This sets full access for the owner of the file (you) and read and write access for the world (and your 'group' but that doesn't really apply here). Hopefully, that will work.
progman89
Sorry, I was off for a bit. I tried CHMODing to 766 but that didn't work--it just created further errors. I was afraid I might have to just recreate the directory...I'll try that and post the results. Thank you all very much for your help!
Sunny
Quote:
[2005-09-05 03:02:30]: error: file is writable by others: (/home/progman8/public_html/phpATM/index.php)
[2005-09-05 03:01:05]: error: file is writable by others: (/home/progman8/public_html/phpATM/login.php)


Quote:
Sorry, I was off for a bit. I tried CHMODing to 766 but that didn't work



If you chmod the file to 766 it will still have write permissions, rather chmod it to 744. and i think it will be fixed!. Good Luck!


Chmod 766 =
Owner: read, write, execute.
Group: read, write, ---
World: read, write, ---


Chmod 744=
Owner: read, write, execute.
Group: read, ---, ---
World: read, ---, ---
progman89
OK, I deleted the whole thing and uploaded it again. After CHMODing many various files to 755 that I never had problems with previously, it seems to be working. But I won't make that final because that's what I said last time and it didn't work the next day Very Happy So we'll see. But now I have another annoying problem that's not nearly as serious but I would still like fixed...I can't delete two of the directories for the old phpATM. Like, when I try I get an error message that the directories aren't empty, and them when I try to delete the files in them so they will be empty, it just won't let me delete the files. Any ideas while I'm waiting to see if ATM will continue to work?
progman89
I fixed it...for future reference to anyone that happens to, you have to use File Manager in CPanel to delete the files.
progman89
It seems to continue to be working fine, thank you all very much for your help!
Related topics
simple php problem, please help...
Please help. I have a problem with installing FreeBSD
Problem with MySQL Server Please Help!!
Someone please help
A problem.. please help
Help please,"Forbidden You don't have permission to acc
Please help regarding editing of index file
encrypt and decrypt PROBLEM plss HELP!
Which is the source of the problem???PLEASE HELP ME!!!
Anyone please help me!
Internal Server Error in Joomla, Please help!
undecided on what to use ---> please help
Please help me
Help! This small script has logical problems. Please help
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.