Hi John - thanks for keeping us posted.
I think you are almost there. The reason you are getting the file not found
error is because when you point your browser to http://www.yourserver.org it will
automatically look for a file called index.html or index.php, but perhaps
not index.cgi. Below I've described the steps I'm taking to fix the problem
in the long term. In the short term, you might try these additional work
around steps (sorry this is such an ordeal!!):
1. Create a file called index.html and place it in the same directory as
your index.cgi file. The index.html file should have the following code:
<HTML>
<HEAD>
<TITLE>Meta Redirect</TITLE>
<META HTTP-EQUIV="refresh" CONTENT=0;URL="index.cgi">
</HEAD>
<BODY>
</BODY>
</HTML>
This should take care of the file not found problem.
2. Edit your pt_config.inc file. Scroll down to the part where it says
$ptconf["indexname"]. Change the value "index.php" to "index.cgi". You can
ignore the test.php for now.
Below is the LONG TERM solution:
I did some work on this issue this weekend and am planning on having a fix
for the next version of Pagetool (should be ready in 2-3 weeks).
For the new version:
1. I isolated all the code involved with uploading files and put it in one
file called pt_upload.php. When the program needs to upload a file, it goes
directly to this file (that file is not included, it is a stand alone file).
2. During setup, Pagetool will detect whether or not you are running PHP in
safe mode.
3. If you are not running in safe mode, then nothing new happens. the
pt_upload.php file remains as is and you don't notice anything different.
4. If you are running in safe mode, it will prompt you for the place you
would like to keep your pt_upload.cgi file (it seems from your email that on
your server, you can put a cgi file anywhere in your web tree, but most
setups will only run cgi files from the cgi-bin).
5. Then, it will detect the location of your php program and automatically
add the #!/usr/bin/php (or whatever location it is), copy this file to your
cgi-bin, and rename it with the .cgi extension.
I haven't worked everything out, but I'm getting there!
Jamie
> -----Original Message-----
> From: pagetool-devel-admin@...
> [mailto:pagetool-devel-admin@... Behalf Of John
> Edwards
> Sent: Saturday, July 28, 2001 3:50 PM
> To: pagetool-devel@...
> Subject: [Pagetool-devel] Another update on the media upload.
>
>
> Hi everyone,
> I received a reply to the post I had from Troy (who seems to
> be the guy
> who knows how to fix all this stuff) and heres what he told me:
>
> "Am I correct in thinking that pagetool has just one PHP file
> (index.php)
> and
> the rest are includes?
>
> If that is the case then you have to rename that index.php to
> index.cgi and
> place the "#!/usr/bin/php" line at the top of it.
>
> You may want to put the "pt_functions.inc" file back as it was, otherwise
> the cgi modifications may cause some problems.
>
> -Troy"
>
> I tried this, first by putting the ".inc" files I had changed
> back to their
> original state (not to hard because I kept a back up copy of them
> on my HD).
> Next, I added the line "#!/usr/bin/php" to the top of my
> "index.php" file
> and uploaded it to the server then renamed it "index.cgi". The
> only problem
> I encountered was when I tried to login as the admin I got a
> "page could not
> be found screen". So now I am back to square one.
>
> There is one other thing that I just realized, that I might try.
> I am going
> to go back to the forums and cross-reference the exact line that
> Troy wanted
> me to put at the top of the "index.cgi" file. I think that what may have
> happened was a simple spelling mistake that may have occured in
> the "/usr/"
> aspect of the code. Hopefully this will be the case and
> everything will be
> resolved.
>
> (I'm going to try and ue you guys' closing)
> Cheers,
> John
>
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> _______________________________________________
> Pagetool-devel mailing list
> Pagetool-devel@...
> http://lists.sourceforge.net/lists/listinfo/pagetool-devel
>
|