Christopher Bergin Posted August 2, 2013 Share Posted August 2, 2013 I was able to get most of the scripts to work. Registration works properly. When I attempt to log in, I receive a blank page; no errors, no information. After the login is submitted, the URL http://localhost/site1/index.php reflects the index page as designed, just no content. When the site is initially visited, the index page displays properly. Any ideas? Link to comment Share on other sites More sharing options...
Larry Posted August 2, 2013 Share Posted August 2, 2013 What debugging techniques have you tried and what were the results? Link to comment Share on other sites More sharing options...
Christopher Bergin Posted August 3, 2013 Author Share Posted August 3, 2013 Since I wasn't receiving error messages from my error handler, I went about commenting out certain conditions such as the script that redirects unauthorized users. What I did find was that a syntax error could prevent the page from rendering. A couple of times in other parts of the project, I just used the author's script and it cleared up problems. I'll report back if I still get stuck. Link to comment Share on other sites More sharing options...
Larry Posted August 3, 2013 Share Posted August 3, 2013 Excellent. Thanks for sharing. Make sure display_errors is enabled on your server, too, which will help you debug these issues. Link to comment Share on other sites More sharing options...
Christopher Bergin Posted August 13, 2013 Author Share Posted August 13, 2013 I noticed that the error_display setting in my php.info page is set to Off. I thought it would be as simple as opening up the php.ini file and editing the feature to read On but it doesn't seem to be working, even after shutting down the server and restarting. What could I being doing wrong? Link to comment Share on other sites More sharing options...
Larry Posted August 14, 2013 Share Posted August 14, 2013 You could be editing the wrong php.ini file or your changes may not be being saved due to permissions issues. Link to comment Share on other sites More sharing options...
Christopher Bergin Posted August 14, 2013 Author Share Posted August 14, 2013 neither of these apply unfortunately. Do I need to write and run a PHP script with the specific instructions in order to effect the necessary changes? Link to comment Share on other sites More sharing options...
Larry Posted August 14, 2013 Share Posted August 14, 2013 No. The changes are made by editing the correct php.ini script, making the correct edits within that script, saving it, and restarting the web server. Link to comment Share on other sites More sharing options...
Christopher Bergin Posted August 14, 2013 Author Share Posted August 14, 2013 I should probably add that I'm using MAMP and not MAMP PRO. I'd hate to think that a utility as critical as error display would only be available with the paid version. Link to comment Share on other sites More sharing options...
Antonio Conte Posted August 14, 2013 Share Posted August 14, 2013 A simple tip is trying with ini_set() and see if that affects something. You've obviously tried restarting Apache since you changed it? ini_set('display_errors', 1); Link to comment Share on other sites More sharing options...
Christopher Bergin Posted August 14, 2013 Author Share Posted August 14, 2013 yes, I created a script and placed in htdocs with the rest of the scripts and ran it but I saw no results. <?php ini_set('display_errors', '1'); echo 'the setting has been set!'; ?> the version of PHP is 5.4.10 in the preferences tab on the MAMP widget and also reflected in the phpinfo document. The php.ini file I'm modifying is 5.4.10 in the config folder and the permissions setting reads admin and Christopher Bergin with read/write capabilities. Link to comment Share on other sites More sharing options...
Larry Posted August 15, 2013 Share Posted August 15, 2013 i'm not sure what you think that script is supposed to do. It should just echo the message. But ini_set() doesn't permanently change a setting; it just changes a setting for the duration of that script. Link to comment Share on other sites More sharing options...
bklyn08 Posted August 26, 2013 Share Posted August 26, 2013 When I attempt to log in, I receive a blank page; no errors, no information. I may be able to help with this. When I tried running index.php at the end of chapter 3, I also received a blank page, without errors or anything. Inspecting the source code showed that none of the php ran: <html> <body> </body> </html> Initially I tried to enable error messaging, but that wasn't the problem. The real error (for me) was a syntax error in my header.html file: I mistakenly typed $foreach instead of foreach. Instead of letting me know an error occurred, the entire script simply failed to run. I suggest that you try and find out which file you might have an error in (by commenting out different portions of different files), and then very closely inspect it for any missing brackets, semi-colons, and other syntax errors. Cheers! Greg PS: re: your post #11 You say the script doesn't show any results. Here's what I suggest you do. Create a file called '.htaccess' and place it in your webroot directory. In that file, paste this code: AddType application/x-httpd-php .html .htm This is what I did when my footer.html did not run the php scripts. Let me know if this works! Link to comment Share on other sites More sharing options...
Christopher Bergin Posted September 21, 2013 Author Share Posted September 21, 2013 I was able to resolve my issue. I noticed on the first screen of the phpinfo file that the correct path to the php.ini file is listed in plain sight. The file that I was editing was located at /Applications/MAMP/conf/php.ini. The file that I needed to be editing is /Applications/MAMP/bin/php/php5.4.10/conf/php.ini. All set for now. Link to comment Share on other sites More sharing options...
Larry Posted September 23, 2013 Share Posted September 23, 2013 Excellent. Glad to here it. The thing with MAMP is that it uses its own php.ini file which it then copies over. You have to make edits to the ini file within MAMP. Link to comment Share on other sites More sharing options...
Recommended Posts