Jump to content
Larry Ullman's Book Forums

Chapter 4 / Example 1


Recommended Posts

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

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

  • 2 weeks later...

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

  • 2 weeks later...
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

  • 4 weeks later...

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

 Share

×
×
  • Create New...