Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Re: [klausre] Article Manager - changing paths

 

 


mpercyit
User

Nov 10, 2006, 6:22 AM

Post #1 of 6 (1103 views)
Shortcut
Re: [klausre] Article Manager - changing paths Can't Post

Another nice feature would be, during the install have an automated way to adjust all the PHP locations in all the files. In v1.x it wasn't bad to do manually because there were only a few places to do it, but v2 has a lot of locations to change and it is very time consuming to do it. Maybe when you request an upgrade, you could prompt for the PHP location and create a build with the PHP set correctly.


(This post was edited by Theo on Nov 10, 2006, 4:32 PM)


Damon
Staff / Moderator


Nov 10, 2006, 12:49 PM

Post #2 of 6 (1079 views)
Shortcut
Re: [mpercyit] Article Manager v2.1 - New features on the way... [In reply to] Can't Post

Hi,

If you are looking for a way to easily replace SSI with PHP includes, there is a handy feature to do just that in 2.02.

In Admin > Publishing, go to the Advanced Commands dropdown list on the bottom of the page. Choose Templates: Convert SSIs to PHP includes. Click Go.

Next set php as your Publish File Extension in the Admin > Server Settings section.

Last step to have PHP includes appear on the search engine page:
In the Admin > General Settings section, set Dynamic SSI Parsing to Server Resolved and the Temporary File Extension to php. Save and your done.

I hope that helps. Let me know if you have any other questions.

--------------------------------------------------- 
Cheers
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/


mpercyit
User

Nov 10, 2006, 3:48 PM

Post #3 of 6 (1063 views)
Shortcut
Re: [Damon] Article Manager v2.1 - New features on the way... [In reply to] Can't Post

That's not what I'm looking to do. In all your php files you have a path to where PHP is installed on the server (the first line in all the files). PHP is in a different location on the server so I have to go in and adjust that path to the correct location. Now that you have so many php files that need to be updated, it makes loading an update a pain. That is why I was hoping you would provide an automated way to do that. Even if I had to hard code it for the admin stuff and the rest could read it from a variable, if that is possible.


Damon
Staff / Moderator


Nov 10, 2006, 4:04 PM

Post #4 of 6 (1061 views)
Shortcut
Re: [mpercyit] Article Manager v2.1 - New features on the way... [In reply to] Can't Post

Whoops, sorry about that.

How about using a "My Placeholder" to publish the path to PHP? You can add a custom placeholder to the templates and control what content (path to PHP) is published from the My Placeholders section.

To do this, go to Admin > My Placeholders
Example placeholder to add:
Placeholder name: my.pathtoPHP
Placeholder Value: enter the actual path to PHP
Then save.

Now you can use $my.pathtoPHP$ in any of the publish templates and control what content (path to PHP) is published here in the My Placeholders section.

After adding $my.pathtoPHP$ to the templates, log back into Article Manager and Publish All.

Hopefully I got it right this time. :) If you have any other questions, let me know.

--------------------------------------------------- 
Cheers
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/


mpercyit
User

Nov 10, 2006, 4:16 PM

Post #5 of 6 (1057 views)
Shortcut
Re: [Damon] Article Manager v2.1 - New features on the way... [In reply to] Can't Post

I still don't think you have it. Since the path to PHP is in the PHP files, not the article files, a placeholder doesn't seem like it would do any good. If the path is incorrect in the PHP file, then the PHP programs will not work correctly, therefore you couldn't publish or do anything else for that matter.

For example at the top of every PHP page, the following code is there:

#!/usr/bin/perl
# ----------------------------------------------------------------------------
# This software is Copyright (C) 2006, All Rights Reserved
# ----------------------------------------------------------------------------
# This program is protected by local and international copyright laws. Any
# use of this program is subject to the the terms of the license agreement
# included as part of this distribution archive. Any other uses are strictly
# prohibited without the written permission of the Vendor and all
# other rights are reserved.
# -----------------------------------------------------------------------------
# Warning : Modifying this program violates your license agreement!
# -----------------------------------------------------------------------------



I need it to read something like this:

#!f:\perl\bin\perl.exe
# ----------------------------------------------------------------------------
# This software is Copyright (C) 2006, All Rights Reserved
# ----------------------------------------------------------------------------
# This program is protected by local and international copyright laws. Any
# use of this program is subject to the the terms of the license agreement
# included as part of this distribution archive. Any other uses are strictly
# prohibited without the written permission of the Vendor and all
# other rights are reserved.
# -----------------------------------------------------------------------------
# Warning : Modifying this program violates your license agreement!
# -----------------------------------------------------------------------------

We are not modifying any of the code, just the path to PHP.


Theo
Project Manager / Moderator


Nov 10, 2006, 4:30 PM

Post #6 of 6 (1053 views)
Shortcut
Re: [mpercyit] Article Manager v2.1 - New features on the way... [In reply to] Can't Post

I think there's some confusion here...PHP and Perl are two different scripting languages. That line has nothing to do with PHP at all.

If your path to Perl is in a non-standard location (and won't run automatically), it's pretty much going to have to be updated by hand in each of the CGI files (admin.cgi, search.cgi, and upgradeFromVersion1_41.cgi). But many servers will run from #!/usr/bin/perl, even if Perl isn't installed in that location.


Theo Wiersma
Project Manager

(This post was edited by Theo on Nov 10, 2006, 4:32 PM)