Topic: Problems viewing index.php page on local and web server

I recently purchased the PayPal Shopping Cart tutorial which is awesome and exactly what I needed.
However, there are some issues with Mac OS 10.5 and the MAMP application. I have been unable to view any files locally other than the Index directory listing. And on that listing the PHP files show question marks on the page icons.

I have never had any trouble with MAMP on Mac OS 10.4 (Tiger), so there is obviously bugs in the application.
At any rate, I want to upload the source files from the video onto a web server and try to work from there, but I am also having issues.
Once again I am unable to view anything on a web page except an error or the same  the Index directory listing showing question marks on the file icons


*Warning*: require_once(http://www.johnashbey.com/onlineorders/functions/functions.php) [function.require-once <http://www.domain.com/site_flash/online … quire-once>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in*/home2/user/public_html/domain/site_flash/onlineorders/index.php* on line *2*

*Fatal error*: require_once() [function.require <http://www.domain.com/site_flash/online … on.require>]: Failed opening required 'http://www.domain.com/onlineorders/func … ctions.php' <http://www.domain.com/onlineorders/func … ons.php%27> (include_path='.:/usr/lib/php:/usr/local/lib/php') in*/home2/user/public_html/domain/site_flash/onlineorders/index.php* on line *2*



Can you please help?  As far as uploading the files, I have tried uploading the source files "as is" in their original directories,
I have also tried placing the index.php file in the sites root directory but I keep getting this error. Thanks

Vote up Vote down

Re: Problems viewing index.php page on local and web server

I haven't personally seen this tutorial...

...that said, my impression is that perhaps you need to edit a config file to include your correct website details.  For example, the link "http://www.domain.com/onlineorders/func … ctions.php" indicates to me that there is a PHP variable set somewhere that you need to change to use the correct domain details. "Domain.com" doesn't make sense -- it sounds like a temporary value to me.

Were there any included instructions specifying what you needed to do to run the demo application?

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down

Re: Problems viewing index.php page on local and web server

Hi, and thanks for your reply. I replaced the actual domain name with "domain" for the purposes of posting here on the forum. <p>I don't see any other instructions regarding uploading on the server but I assume that the file directory would be the same on the web server as it would be on my localhost using MAMP. The tutorial explains where he places the index.php file which is in the root directory of the site. I have watched the tutorial videos but most of it was coding the shopping cart and editing. Perhaps I missed something. In the meantime, I'll go back and check it out. Thanks

Vote up Vote down

Re: Problems viewing index.php page on local and web server

Hmm, didn't realize you changed the domain in your example. If it isn't a config file issue, I'd suggest going through and making sure that you uploaded the files correctly -- make sure that the required files are in the correct locations as
the error messages show.

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down

Re: Problems viewing index.php page on local and web server

Thanks! Well I kind of knew it was a file directory problem, I finally solved it. I placed all the files "as is" in a folder named "cart" which is on the root of the site. I did NOT pull out the index.php, i left it in the html folder where it was originally. So when I typed the url as follows: http://www.mydomain/cart/html/index.php, I am able to view the template and it works.

For some reason I thought the index.php needed to be on the root of the site. I now realize that the links to all the directories and pages are within the code. Of course I should have looked for it first!  Basically the problem was I tried to set up my local host as is suggested in the video just so I can go along and learn, but there is a real problem with MAMP for the Mac on Leopard. So I went and tried to upload to the server to learn...unfortunately I had to look a little further before I could even do that. Thanks for you help!!

Vote up Vote down

Re: Problems viewing index.php page on local and web server

Glad to hear you got it working. smile

If you have any questions in regards to MAMP, let me know -- I have it running on my machine with no problems.

Benjamin Falk | Falken Creative : Twitter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter

Vote up Vote down