Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Need some help, trying to add a file but it keeps redirecting to zc_install/index.php

    Hi,

    I list items that I also sell on my ZC shop on several third-party sites.
    I have created a little php file called stockcheck.php that I use to display the number of items I currently have in stock in those third party site listings.

    Currently I have the stockcheck.php file in the root directory, my ZC shop is also installed in the root directory and it works fine, but I'm reorganizing my site and would like to move many files including stockcheck.php to a subdirectory called 'pages'.

    If I move the file to '/pages' it no longer works and I get this error message:
    "The requested URL /pages/zc_install/index.php was not found on this server."

    The file is very simple, basically just the following(there's a bit more that I've omitted for the sake of simplicity):
    PHP Code:
    require('includes/application_top.php');
    $stockleft zen_get_products_stock($_GET['product_id']);
    echo 
    $stockleft;
    require(
    'includes/application_bottom.php'); 
    When I move the file to the /pages directory, I edit the path to application_top.php and application_bottom.php to:
    '../includes/application_top.php', but I get the error I mentioned above.

    Can someone tell me if I'm doing something wrong? I am I putting the path correctly? Is it even possible to have my stockcheck.php file working if I move it to another directory other than the root folder?

    Sorry if this seems like a dumb question, my php knowledge is very, very little.

    Thanks for any input on this.

  2. #2
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: Need some help, trying to add a file but it keeps redirecting to zc_install/index

    Its best to keep it in the ZC root since its actually calling includes/application top

    you could try this

    require('/home/username/public_html/foldername ( if applicable)includes/application_top.php');

    this is of course for a cpanel type setup but you get the idea
    Zen cart PCI compliant Hosting

  3. #3
    Join Date
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Re: Need some help, trying to add a file but it keeps redirecting to zc_install/index

    Thanks Merlin, and yes, I do use Cpanel. :)

    Actually I had already tried that:
    require('/home/myusername/public_html/includes/application_top.php');

    But I got the same results as when I used
    require('../includes/application_top.php');

    The 404 error - The requested URL /pages/zc_install/index.php was not found on this server.

    I'm really not sure why it seems to redirect to /pages/zc_install/index.php

    I'll keep it in the root folder for now since it seems to work there.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 2 Jul 2009, 07:28 PM
  2. index.php redirects to zc_install/index.php
    By wmorris in forum General Questions
    Replies: 24
    Last Post: 17 Oct 2007, 01:38 AM
  3. /index.php not comes: some configure file problem
    By vr4indian in forum Basic Configuration
    Replies: 1
    Last Post: 30 Oct 2006, 03:03 PM
  4. Replies: 3
    Last Post: 4 Sep 2006, 11:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg