Topic: Load Schemas error

Sorry Judd I haven't used php in a while but I am trying to install the blog app and I keep getting:

Run this script from your top-level app directory (eg, /var/www/html/app)

or

Could not open input file: ../blog/pronto/bin/load_schemas.php

I have the blog app in /home/user/public_html/blog

so I cd there and issue php ../pronto/bin/load_schemas.php -a which produces the second error.

What am I doing wrong.

Thanks

Re: Load Schemas error

Okay, so these are your paths.  Correct me if I'm wrong.

Web root: /home/user/public_html/blog
Pronto: /home/user/public_html/blog/pronto
App: /home/user/public_html/blog/app

So you're cd'ing into /home/user/public_html/blog/app and running "php ../pronto/bin/load_schemas.php -a" and it produces the error.

Can you show me all the directives in app/config/config.php that start with DIR_ please?

Re: Load Schemas error

I don't know if cu3edweb ever found a solution to this problem, but I encountered the same thing today after moving the contents of the pronto-0.6.tar.gz file to my hosting server.

I know with the 0.5 tar there was a problem with the DS definition on MS/WIN platforms that made one of the scripts fail to recognize a relative path versus a fully qualified path (starting at root with a "\") -- unfortunately, I can't remember which script it was that I "fixed" to resolve that. I'm wondering if the '~' in a Linux path was having a similar adverse effect (or if dirname() supports that), but I didn't have time to really investigate the issue.

So, after monkeying around a while, I realized I just didn't have time to keep troubleshooting; instead, I edited two files to hard-code fully-qualified paths into them.

In .../app/profiles/cmdline.php, I replaced each dirname() call with fully-qualified (constant) paths for both config.php and access.php.

In .../pronto/bin/load_schemas.php, I added full paths to the first file_exists() call (to get to my .../app/profiles/cmdline.php) and to the require_once() call which follows it. These are the lines which specifically generate the error message that kicked off this topic.

I realize this is a major hack (my apologies to JV), and maybe someday I'll go back and figure out what was happening. But, if you just need to get things up & running, this worked out for me.

Last edited by spectrum-nashville (2010-03-08 05:39:15)

Re: Load Schemas error

Hi Spectrum,

Let me know if you're still fighting with this at all, or if you want to remove your hardcoded hack -- Maybe we can meet on IM or IRC and work on the problem in realtime.


- J

Re: Load Schemas error

Hi J.

I haven't revisited the path issue in a while, although it popped up again when I was looking at generating CRUD files from the generator script.

I'm sure I've just messed something up, but I'd be happy to work through it at some time with you.

I plan on moving a fresh installation of Pronto onto a development server in a week or two. If it goes smoothly, I'll post an update here to let you know what I learned.

If I hit the problem again on the fresh installation, I'll try to reach you and schedule an IM session.

Thanks for your help and your amazing work on this framework. With any luck, maybe I'll become savvy enough to be helpful with it someday!

- Keith

Re: Load Schemas error

Hi Keith,

Sure, that would help.  I've had no problems with path issues myself, but my setups are pretty boring, so more testing is needed.

I've moved the source code repository to GitHub, so you can grab the latest code there.

http://github.com/jvinet/pronto


- Judd

Re: Load Schemas error

Judd:

I downloaded the latest off GitHub today and installed in plain-vanilla form on a local test server (LAMP). All the paths worked fine after I tweaked the /app/config/config.php file as needed. The schema loading script took off from the start.

In my prior configuration, I was trying to put the /pronto code in a subdirectory outside the web server's html realm, which didn't look like it would cause a problem. It did, however, seem to make the pathing troublesome. I will make an effort to re-create that scenario and report to you what I find.

I have noticed a bug with the Ajax dialog for the User module, however. I guess I'll start another topic for that one, just to keep everything organized better within the forum.

Will be in touch!
- Keith

Re: Load Schemas error

Hi Keith,

Yes, some of the AJAX code could certainly use an overhaul.  The state of web technologies moves so quickly, that many techniques used a mere two years ago are already inferior compared to what we (can) do today.  smile

I regularly leave the Pronto code outside the web root, often sitting somewhere more central, like /usr/share/pronto.  To set this up, I normally do something like this:

1. Checkout the full GIT repo to /usr/share/pronto.  So the Pronto code itself will be in /usr/share/pronto/pronto
2. Copy everything except for the "pronto" subdir to my web root.
3. Edit app/config/config.php (in the webroot, not /usr/share/pronto) and set DIR_FS_PRONTO to /usr/share/pronto/pronto.

Hope that helps.