close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File Paths Incorrect

Thread began 11/21/2009 12:07 pm by rc1data | Last modified 11/23/2009 2:18 pm by Justin Nemeth | 3547 views | 11 replies |

rc1data

File Paths Incorrect

The paths to the galleries created by the wizard are not correct. Previews and galleries don't work because nothing is pointing to the right place. I can't find a "Globals" file to make any changes.

I am able to make things work when I install PowerGallery in the root of my hosting account. The problem is that I host several sites in this account, and would like to be able to have a gallery within a sites directory.

I own every WA product, and I'm pretty comfortable with PHP. I'm happy to dive into the code if needed.

Thanks for any help you can offer.

Sign in to reply to this post

Office Guy-172461

I'm just getting started myself but have a look at /admin/global.php

Sign in to reply to this post

rc1data

Global.php

I found the Global.php file right after my post. I haven't figured out how to change the code to stop using the document root as the default path.

Thanks

Sign in to reply to this post

rc1data

Only works in hosting root

I am unable to get this tool to work in my customer's websites. It will only work in the root of the hosting account. This renders the tool useless for me.

Sign in to reply to this post

Office Guy-172461

Found this:

  In order for your gallery to display within a PHP page, the page has to be stored within the same website as your PowerGallery files. For pages on other servers, it is advised that you link directly to your gallery using the link provided.  

When you say "root of the hosting account" it sounds like you are saying that you can't upload to the root of the domain. If that is the case, there must be something wrong with the way the hosting account is setup.

I'll do some more testing when I get to the office. Maybe the WA guys can shed some light on the folder requirements.

Just to be clear:

  1. You created your DB under the domain account
  2. Uploaded the files to a folder
  3. Ran the installation wizard


and it didn't work in that configuration?

p.s. are you saying host account as in one account on the web host provider's server, or hosting account as in a reseller's account with multiple domains?

Sign in to reply to this post

rc1data

Paths

Thanks for the reply. The DB stuff and install is all fine. The install process is slick isn't it? No issues there at all.

I have a hosting account with GoDaddy. I have unlimited space, so I host about 20 websites under that one hosting plan. So, within what I am calling the root folder of the hosting account, I have a folder for each website I host.

The globals.php file sets the path for everything based on $_SERVER['Document_Root']. This causes paths to be created that don't actually exist.

When I install PowerGallery under the domain name that the hosting account is built on, and run it under that domain, it works fine.

I just need to make some adjustments to that Globals.php file, but my php skills just aren't strong enough.

I hope this makes a little more sense.

Sign in to reply to this post

Office Guy-172461

I just tested it in a sub folder and it works fine.

Steps I took:

  1. Created a folder call powergallery
  2. Gave it full permissions
  3. Created Database through cPanel
  4. Added user with full permissions to the database
  5. Uploaded PowerGallery into the newly created powergallery folder
  6. In browser, went to domianname.com/powergallery/install
  7. Followed wizard
  8. Hit Preview to look at my new gallery


Yes the new wizard is slick.

BTW I have heard many problem associated with GoDaddy hosting. GoDaddy as a registrar - good
GoDaddy hosting - not-so-much

Almost forgot. Don't forget to delete the install folder after the installation part is finished.

Sign in to reply to this post

rc1data

Actual code generated

Looking at the code generated when trying to preview the gallery, I can see where the problem is. The agerelief folder does not exist in the www.agerelief.com domain. That is the root folder that the domain lives in.

Here are a few examples:

Is:
<script type="text/javascript" src="/agerelief/PowerGallery100/js/mootools-core.js"></script>

Should be:
<script type="text/javascript" src="PowerGallery100/js/mootools-core.js"></script>

Is:
<img alt="" src="http://agerelief.com/agerelief/PowerGallery100/images/1/670656794_airshow2009friday_1235_782p.jpg" />

Should be:
<img alt="" src="http://agerelief.com/PowerGallery100/images/1/670656794_airshow2009friday_1235_782p.jpg" />

Sign in to reply to this post

rc1data

Fix

I have no problem with subdirectories, it is more like a subdomain problem.

I am able to embed a gallery if I add the following code to the page.

$_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0 - strlen($_SERVER['PHP_SELF'])));

I would like to find a way to make this change globally.

Sign in to reply to this post

Justin Nemeth

Try adding that code to the galleries/global.php file on line 14. That should reset your DOCUMENT_ROOT and be a global change that affects all the front end gallery designs.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...