Quick search:

This is Wonderful!!! but I have a problem.

2005-08-07 05:08:28
First of all, I have to say what a great job has been done putting this together.  It is a work of art!  Thank you very much for putting it out for others to use.

So, now my problem.

I'm using windows xp sp2;php 5.04;mysql 5;apache 2, ie6.

In example 1, I can see the 4 rows of data.  I can edit a row.  I put a new value in the row.  (or add a new row for that matter, doesn't matter, both return me to a warning page).  I never get back to the list.  It shows this URL while I'm typing in detail data:


And, when I press Update (or create).  the screen goes to a "http 404 - file not found" error.  The actual update did take place.  the URL showing is:  http://localhost/phpPeanuts_1_1/example1/index.php

Could this have to do with me not having the file baseurl.txt?

Also, the error logging shows on my screen, but nothing gets written to the file.  At first the file was not there and it errored writing.  Now it does not error, just nothing shows up.

Thanks again for a great product.  The is my first PHP experience so I appologize if the answers are obvious and I just don't get it.

-Peter Kellner

2005-08-07 19:27:32
Hi Peter,

As you suggested, the error you are describing probably has to do with your baseurl.txt. A common cause of problems is that the file must only contain one line and no carriage returns or line feeds. Some editors tend to put a carriage return in when you load the file, then when you save it you may not have noticed it and the redirect that happens after the SaveAction has been successfull sends an incorrect url to the browser, resulting obviously in a 404 - file not found error from apache.

Because the baseurl.txt is error-phrone, i have improved phpPeanuts 1.1 not to need in most cases.  But with 1.1 beta 2 you will still need to get the baseurl.txt file right, and it is not included in 1.1 so you have no example, sorry about that! Please read through the thread "redirect after buttonexecution" on this forum for more information.

Then the error logging problem: the class ErrorHandler in the classes root folder contains the following line:

        var $developmentHost = 'localhost';

This line defines host 'localhost' as your development server. On a development server you get the error messages on your screen so that  you do not have too look into the error log. But this should not stop the error handler from writing to the error log. Did you activate the code in Site::setErrorHandler ? If you want to debug the problem yourself, you may experiment with the code in PntErrorHandler::handleError and PntErrorHandler::logError to see if it actually runs through that code and what it tries to do with which file. It may also be an idea to replace the relative path to the errorlog file in Site::setErrorHandler by an abslolute path. If you use NTFS, also check if the file is writable to the user apache is running on (or to Everyone) (if you run apache as a service, see its properties in
All Programs/Administrative Tools/Services in your (system administrator) start menu).


Henk Verhoeven.
Add a Reply
Loading form, please wait
The website will not send you an e-mail when a reply is added to this topic

Back to Topics List