View previous topic :: View next topic |
Author |
Message |
Xatinei -
Joined: 19 Jun 2003 Posts: 1 Location: Buxton, UK
|
Posted: Fri Jun 20, 2003 7:41 am Post subject: Erm...PHP, don't work :-( |
|
|
Im having a problem, and I wondered whether anyone could help me.
I am using this web server to host my site and my cousin's site. He uploaded a few .php files.
I installed php using the guide on this site, but now I get
Quote: | The page cannot be found |
My cousin gets the same error.
So I decided to uninstall php from the server, and the page loaded but the script didn't work.
Im not sure if I need to configure php in any way because I have never used it before.
I would really appreciate any help given. |
|
Back to top |
|
|
lord -
Joined: 14 Jun 2003 Posts: 9 Location: Norway
|
Posted: Sat Jun 21, 2003 2:46 pm Post subject: |
|
|
I had the same problem, and after spending a lot of time troubleshooting it I tried to move php from c:/php to c:/program files/php and then it worked... Don't know why tho....:) Remove the old php.ini file before you reinstalls php |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Jun 23, 2003 11:00 pm Post subject: Re: Erm...PHP, don't work :-( |
|
|
Are you sure that you put the PHP file in the right place and used the correct URL to reach it? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rockslammer -
Joined: 19 Jun 2003 Posts: 5
|
Posted: Wed Jun 25, 2003 12:19 am Post subject: |
|
|
php.exe runs fine from c:\PHP
**note if you are following the php config directions for the server make sure that you match the path
the example shows php's path as being in Program Files you would have to path it in the server config to C:\PHP\php.exe if that is where it is actually installed. Same applies for Perl.
##the following my be redundant but worth mentioning###
As to the php index not being found is php a permitted index file in the servers config - did you add it? same applies for .shtml or .exe being index files.
the servers default index files are only .htm and .html
I have a question for any php gurus that may read this ;0)
why isn't my php reading my file and authorizing?
<?php
$auth = false; // Assume user is not authenticated
if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) {
// Read the entire file into the variable $file_contents
$filename = 'C:\\Program Files\\Abyss Web Server\\cgi-bin\\dp\\members.dat';
$fp = fopen( $filename, 'r' );
$file_contents = fread( $fp, filesize( $filename ) );
fclose( $fp );
// Place the individual lines from the file contents into an array.
$lines = explode ( "\n", $file_contents );
// Split each of the lines into a username and a password pair
// and attempt to match them to $PHP_AUTH_USER and $PHP_AUTH_PW.
foreach ( $lines as $line ) {
list( $username, $password ) = explode( ':', $line );
if ( ( $username == "$PHP_AUTH_USER" ) &&
( $password == "$PHP_AUTH_PW" ) ) {
// A match is found, meaning the user is authenticated.
// Stop the search.
$auth = true;
break;
}
}
}
if ( ! $auth ) {
header( 'WWW-Authenticate: Basic realm="Private"' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
exit;
} else {
echo '<P>You are authorized!</P>';
}
?>
.dat is an added MIME and is working with other scripts from its current directory, so read write is not an issue....
what im thinking is that the server wants an encrypted password and sees my ANSI text as bogus?
permission denied php echos
(I get the ehco so PHP works phpinfo() works too).
Authorization Required.
not a server error page.
O/S WIN NT 5.0 NTFS
NT permissions bug? I followed the PHP install directions to the letter on the file permissions...cgi_force is enabled in the php.ini file
<?????? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jun 25, 2003 5:50 pm Post subject: |
|
|
rockslammer,
It is really difficult to understand what are you asking for. Please rewrite your questions and try to be as clear and as concise as possible. Help us help you. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
markjones -
Joined: 26 Jun 2003 Posts: 2 Location: Springfield, MO
|
Posted: Thu Jun 26, 2003 2:19 am Post subject: php |
|
|
Well I have tried to install php. I ran the installer. It put it in c:\php and put the php.ini file in my windows directory. It didn't work so I then reinstalled and put php in e:\program files\php and the new php.ini file reflects this new location. I then changed it in Abyss CGI settings.
I followed the instructions for installing PHP from this web board. Checked and double checked all settings. All I get is
File not found webbot showing up in my browser and my Abyss log file shows Post Webbot and that is it.
What am I doing wrong?
I have hosted my website using Abyss for several months and it has worked very well.
I am using MIcrosoft Publisher and I want to add a text box form that has a submit button that will email me their email address if they want a update notification of the program I host and distrubute.
Unless I have missed it big time.. I assume I need PHP to run this form script? Abyss changes my website pages and displays pictures etc just fine as well as email notification. This form thing has me wondering what I am doing wrong.
Any help will be very much appreciated.
also index.php do I need to create that file in my website directory? Does it run instead of my index.html file?
As you can tell I am very new to this type of programing. Is there a WYSIWYG for PHP scripting?
Mark Jones |
|
Back to top |
|
|
rockslammer -
Joined: 19 Jun 2003 Posts: 5
|
Posted: Thu Jun 26, 2003 6:00 am Post subject: re the PHP script that wont authorize? |
|
|
Assuming that the intent of the script is clear-
Is there any way that the script that I posted could work?
OR it's call to the server's AUTH can only be TO the server's config file where the user:pass is stored. ie: it's not going to look at members.dat..
I just ran the script on my FreeBSD/Apache production server and got a mis match on the user:pass in the error log.
The reason for this exercise in futility, is to allow a new user access to a specific directory when they register without me having to manually input their user:pass into the htacces.
Back to the drawing board using the post method and a perl redirect for an index.shtml in that directory I guess, unless someone has seen a way for the PHP script that I posted to work..
thanks,
rock |
|
Back to top |
|
|
rockslammer -
Joined: 19 Jun 2003 Posts: 5
|
Posted: Thu Jun 26, 2003 6:25 am Post subject: Re: php |
|
|
also index.php do I need to create that file in my website directory? Does it run instead of my index.html file?
Mark Jones[/quote]
Home > Server Configuration > Advanced > Server Parameters
enable .php as an index
Normally you post the data from an HTML page with a form, a PHP form works too...
the script does the sendmail
you might want to try formprocessor
http://www.freescripts.com/scripts/
this is in perl I have used it a lot with sucess in UNIX. I haven't had a chance yet on ABYSS. Note it does reqire sendmail.exe or a simular sendmail program to be installed |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Jun 26, 2003 2:27 pm Post subject: Re: php |
|
|
The form designed with Publisher is using webbots which are related to FrontPage extensions. These extensions are only supported on Microsoft web servers (IIS). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|