dichevc Posted October 19, 2013 Share Posted October 19, 2013 Hi Larry, I am using EsyPHP for both Ex1 and Ex2. I have configured the server and set up the data base. My problem is in example2. The index.php is working but It doesn't link properly to Coffee, Goodies, Sales etc. I localized the problem - it is in .htaccess (copied from the book downloads) . The .htaccess file itself is enabled and recognized. However the Rewrite Rules are not working. For example when I click “Sales” the generated URL is http://localhost:8080/shop/sales/. The same result with “Goodies”- http://localhost:8080/shop/goodies/. Please help! What might be wrong with my settings. Thank you, Christo P.S. I checked the problems posted in the list but I was not able to find an adequate response addressing my problem. Link to comment Share on other sites More sharing options...
HartleySan Posted October 19, 2013 Share Posted October 19, 2013 Hello, and welcome to the forums. Could you please post what you feel to be the relevant code? Thank you. 1 Link to comment Share on other sites More sharing options...
dichevc Posted October 21, 2013 Author Share Posted October 21, 2013 I fixed the "rewrite rules" problem it by replacing the partial absolute path /shop/coffee/ by the full path /web/Ex2/html/shop/coffee/ Link to comment Share on other sites More sharing options...
HartleySan Posted October 21, 2013 Share Posted October 21, 2013 Very cool. Thanks for sharing. Link to comment Share on other sites More sharing options...
dichevc Posted October 21, 2013 Author Share Posted October 21, 2013 Now I got another problem. (I am using the ex2 code from the book downloads.) When I browse "Goodies" an then click "View All Mugs Products" I got the following error message: An error occurred in script 'C:\web\Ex2\html\views\list_products3.html' on line 62:Undefined index: sale_price How can I fix it. Please help! Thank you, Christo Link to comment Share on other sites More sharing options...
Larry Posted October 22, 2013 Share Posted October 22, 2013 On line 62 of list_products3.thml, you reference $row['sale_price'] (presumably), but that array element doesn't exist. Link to comment Share on other sites More sharing options...
Recommended Posts