ruadork Posted February 3, 2004 Posted February 3, 2004 Hello. I am trying to switch from CDML to PHP. It's going SLOOOOOW! Using this link: server ip/bookmarks/bookmarks.php?Category=Teacher+Resources I get 81 links in my database. That's what is supposed to happen. But I do not want all 81 showing at the same time, so I am limiting the number that are displayed. I can't get the equivalent of [FMP-LinkNext] to work. I copied the code from the FX documentation and adapted it to my database: if (strlen($BookmarksData['linkNext']) < 1) { echo "<span class="medgraytext">Next</span>n"; } else { echo '<a href="'.$BookmarksData['linkNext']."" class="bbody">Next</a>n"; } My problem: The link that is returned looks like this: server ip/php/php.exe?skip=30&Category=Teacher+Resources I'm guessing it should look like this: server ip/bookmarks/bookmarks.php?skip30&Category=Teacher+Resources although I'm not even sure about that because I'm not sure that the skip is working the way it's supposed to. Any suggestions? Andrew
Mariano Peterson Posted February 3, 2004 Posted February 3, 2004 It sounds like the installation of PHP is a bit off, or perhaps you're calling your PHP script in an odd manner. The FX class generates 'linkNext' by taking the name of the current script and appending the query string to the current PHP script name, and adjusting the "skip" parameter in the query string. Since your 'linkNext' contains the path to the PHP.EXE, I think your web server might be forwarding requests to the PHP engine incorrectly. What web server and version of it are you using? What version of PHP are you using? Which platform are you using it on? Did you install PHP as a plug-in or as a module on the web server? How are you accessing the web page? Are you opening a local browser window and typing in a url like "http://localhost/bookmarks/bookmarks.php?category=teacher+resources"? Or are you calling the PHP.EXE program in some other manner (perhaps from the command line)?
ruadork Posted February 3, 2004 Author Posted February 3, 2004 I am using Apache 2.0.48 on WinXP. PHP is 4.3.4. I installed it as a plug-in. I'm accessing the webpage by opening a browser window and going to http://localhost/bookmarks/index.php On this page are 7 categories. Clicking on a category such as "Teacher Resources" takes me to http://localhost/bookmarks/bookmarks.php?Category=Teacher+Resources This page (bookmarks.php) contains the 'linkNext' error.
Fenton Posted February 3, 2004 Posted February 3, 2004 I don't know if this will help. I'm on Mac OS X; but while looking at a PHP FAQ site, I saw the following, which directly answers the question why the .exe is there on Windows, and a work-around. http://www.faqts.com/knowledge_base/view.phtml/aid/734/fid/28
ruadork Posted February 4, 2004 Author Posted February 4, 2004 Intersting. Thanks for the link. Looks like exactly what I need. Andrew
Recommended Posts
This topic is 7590 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now