Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hello,

 

I successfully logged out and tried to login.  When I click to login it brings me to the default index.asp page with a  "The website cannot display the page".  When I just click on login without the email or PW it takes me to the default index.php page with no problems.  The registration worked with no problems.

 

The admin sections are not checking if I am an admin since the add pdf and add page sections show up with no problems and I have not set anyone up as an admin.

 

These "require" as opposed to "includes" seem to not work with IIS - is there some setting I need to check? 

  • Upvote 1
Link to post
Share on other sites

I'm not that familiar with IIS and wouldn't be inclined to use it myself. I have no idea why the require and include lines wouldn't work. That's pretty odd.

 

Also, to be clear, are you pretty comfortable with PHP and MySQL already? This book does assume that. 

 

And I'd also recommend developing locally instead of using GoDaddy. It'll be easier, cheaper, and faster. 

Link to post
Share on other sites

Hi Larry,

 

Yes I am pretty familiar with PHP and MySQL - I have never got into the e-commerce portion before.  Many other tutorials I have done do not have code in the header so that is why I am experiencing that now.  I am developing locally and on GoDaddy at the same time just to see if it is possible to create a system for someone in the future.  I am pretty sure that it is some issue with IIS.  The Godaddy person said I should learn Linux but I am a little old to go down that road. I will updated when I have a solution.

Link to post
Share on other sites

I installed Bitnami WAMP  - when it tries to connect to MySQL it bombs on this line

 

mysqli_set_charset($dbc, 'utf8');

 

it gives this error

 

mysqli_set_charset() expects parameter 1 to be mysqli, boolean given

 

I googled it but can't find any current info - it did work fine under IIS

Link to post
Share on other sites

I have found that when you use IIS and try the exercise with WAMP, LAMP etc is that you have default port settings for mysqli commands.  If you are running IIS then those default ports are taken.  If you are running a WAMP you have to go into the PHP inside the WAMP (IIS php is the regular php install) and change the port settings to the ones you selected when you installed WAMP.

 

For example default ports are 80, 3306 and 443 - With a WAMP install most people choose 8080, 3307 and 4443 - in the php.ini you have to set the mysqli to 3307 instead of 3306 or the mysqli command to connect to the DB will not work.

 

As for login problems - these have to be commented out - just in case anybody misses it like I did.

// To test the sidebars:
//$_SESSION['user_id'] = 1;
//$_SESSION['user_admin'] = true;
//$_SESSION['user_not_expired'] = true;
$_SESSION=array();

 

So far everything is working fine - but I will be back with the harder example in part III since it is much more Apache server and I am just learning it now.

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...