Re: [PHP] [phplib template] file does not exist
First go to the file that generates the error and find out how it knows the template file does not exists roel wrote: Hi, i'm having a problem. I just installed a webserver with mysql and php. I copied my files that i had stored on another webserver to my new. I didn't change anything to these files and the files worked fine on the other server. Now in this server i get this error with a template: Template Error: filename: file ./templates/nav_left_body.tpl.php does not exist. Halted But that file does exist. I can see it through ftp an i can get to it via http browser. What could be wrong? Could it be a config failure in my php.ini? Or in httpd.conf? In case it is the config, what could it be? Thanks in advance!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [phplib template] file does not exist
Thank you, this helped me to find the problem. It seemed that i had to set the $root variable in the templated class, although i never had to do this on the other server, but it works now. Thanks!! Marek Kilimajer [EMAIL PROTECTED] schreef in bericht [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... First go to the file that generates the error and find out how it knows the template file does not exists roel wrote: Hi, i'm having a problem. I just installed a webserver with mysql and php. I copied my files that i had stored on another webserver to my new. I didn't change anything to these files and the files worked fine on the other server. Now in this server i get this error with a template: Template Error: filename: file ./templates/nav_left_body.tpl.php does not exist. Halted But that file does exist. I can see it through ftp an i can get to it via http browser. What could be wrong? Could it be a config failure in my php.ini? Or in httpd.conf? In case it is the config, what could it be? Thanks in advance!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPlib sessions without a DB?
On Friday 26 April 2002 2:25 pm, Alan McKay wrote: Folks, I was going through PHPlib for the first time to assess whether or not I can use it on a current project, and it looks pretty clear to me that you need a DB in order to use the session management. My environment will be a Windows NT 4.0 SP5 box running Apache and PHP. I have no DB on the box, and am not allowed to introduce one, nor am I allowed to rely on an external DB of any sort. Is there a way to use PHPlib sessions in this environment? Hi Alan I think this is primarily due to the fact that the phplib sessions were around before php built in sessions. In the current CVS for phplib there are some files that allow you to utilise php's built in sessions. This enables you to use file storage for sessions. I've been using the session4 stuff with phplib for a while and works well, but this is using db storage. I wouldn't imagine there will be a problem just using a different session container. As for the default distribution of phplib I don't know if this can use files for session storage I haven't had the need to find out. HTH matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phplib
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Kunal Jhunjhunwala blurted hey... i was wondering, is there any way to check wether the replacing of a variable failed or no? example : {one} $t-set_var(one, 1); I want to know wether one was replaced by 1.. or wether the term one exists at all in the template.. any ideas on how to find this out? No. Not AFAIK What are the circumstances Kunal? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8VH7vHpvrrTa6L5oRAttnAJ0cE6ispcu22bd+mnnuN8PEljOx+QCfUKvE 69/xTQAg2jM28XU2rglVFtQ= =EUJK -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phplib
Well, when giving the flexibility to the user to change the look of a program, it is impossible to track wether the user leaves your program copy right code in the template... so, if the {copyright} variable doesnt exist, just display the copy right info.. if {copyright} exists, replace it... simple... Regards, Kunal Jhunjhunwala - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: php-list [EMAIL PROTECTED] Sent: Monday, January 28, 2002 3:57 AM Subject: Re: [PHP] phplib -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Kunal Jhunjhunwala blurted hey... i was wondering, is there any way to check wether the replacing of a variable failed or no? example : {one} $t-set_var(one, 1); I want to know wether one was replaced by 1.. or wether the term one exists at all in the template.. any ideas on how to find this out? No. Not AFAIK What are the circumstances Kunal? - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8VH7vHpvrrTa6L5oRAttnAJ0cE6ispcu22bd+mnnuN8PEljOx+QCfUKvE 69/xTQAg2jM28XU2rglVFtQ= =EUJK -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phplib
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Kunal Jhunjhunwala blurted hey... im tryint to lay some conditions for the html output... example : if ($check == 1) { some html } else { some other html } The problem here is, I want the html in both cases to be customisable by the user... so I would have to make it a part of the template file... and if i do that, even if the conditions fail, the html will show up..any ideas on a fix for this? I'm not 100% certain I understand your Q. but how about this: I take it from the subject you are using a PHPLib template so if you were to have a teplate var called {htmlOutput} you could do this, if($check=1) { $htmlOutput=EOF your html here EOF; } elseif($check=2) { $htmlOutput=EOF your altenate html here EOF; } else { $htmlOutput=EOF your default html here EOF; } and then in your template code. $t-set_var(htmlOutput, $htmlOutput); Hope that's what you mean - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UtA5HpvrrTa6L5oRAr/TAJ0RBC3OzWQashl7fFc0e9wcrow6LgCdFjY1 xjqg6qEwLRKI+R4g0NWYRoM= =haum -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phplib
Hi Nick, I found the solution. Thanks for your reply though. Basically, what I wanted to do was simple : the admin of my program can decided wether they want a feature on or off. Now, depending on that, a lil section of the html would change. Using phplib, I have seperated all my html from the php. The problem comes up, when the html changes dependin on wether the feature is on or off. How does one alter the html content in the template file? one cant... The solution I found is, add a open comment tag above and and close comment tag under the dynamic html code... commenting it out depending on wether the feature is on or off...simple eh? :) Regards, Kunal Jhunjhunwala - Original Message - From: Nick Wilson [EMAIL PROTECTED] To: php-list [EMAIL PROTECTED] Sent: Saturday, January 26, 2002 9:20 PM Subject: Re: [PHP] phplib -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Kunal Jhunjhunwala blurted hey... im tryint to lay some conditions for the html output... example : if ($check == 1) { some html } else { some other html } The problem here is, I want the html in both cases to be customisable by the user... so I would have to make it a part of the template file... and if i do that, even if the conditions fail, the html will show up..any ideas on a fix for this? I'm not 100% certain I understand your Q. but how about this: I take it from the subject you are using a PHPLib template so if you were to have a teplate var called {htmlOutput} you could do this, if($check=1) { $htmlOutput=EOF your html here EOF; } elseif($check=2) { $htmlOutput=EOF your altenate html here EOF; } else { $htmlOutput=EOF your default html here EOF; } and then in your template code. $t-set_var(htmlOutput, $htmlOutput); Hope that's what you mean - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8UtA5HpvrrTa6L5oRAr/TAJ0RBC3OzWQashl7fFc0e9wcrow6LgCdFjY1 xjqg6qEwLRKI+R4g0NWYRoM= =haum -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHPLib
Hey guys, Has anyone used this before?? If so, is it a pain in the a$$? I read the documentation.. and sounds like you would need to re-code your authentication system, sessions blah blah to work with it? or am i going waay of target here?? All i wanna do is, customize my html... i dont wanna recode my sessions code PHPLib is a collection of classes. You can use some parts of it without using all of it. I don't know what it offers in the way of tools to customize HTML. PHP's native sessions are easier to work with than PHPLib's sessions, IMHO, so yes, stay away from the session management. You'll just have to see if there is anything there useful to you, then figure out if that piece can be broken out separately. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] phplib???
It is a external library with useful PHP functions. It was designed by some German guys, but you can now forget it. Main feature was the session function and that function is now integrated in the PHP extensions. Maybe not quite forget as easily as that. PHPLib offers very good user management and authentication. It also allows to use native php session management. m: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] phplib???
Went to www.google.com. Searched phplib. The first result returned was http://sourceforge.net/projects/phplib. -Original Message- From: Duane Douglas [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 1:59 PM To: [EMAIL PROTECTED] Subject: [PHP] phplib??? hello, can someone please explain phplib to me? what is it used for? i apologize if this question has been asked many times before. thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phplib???
http://phplib.sourceforge.net/ At 4:59 PM -0500 12/13/01, Duane Douglas wrote: hello, can someone please explain phplib to me? what is it used for? i apologize if this question has been asked many times before. thanks in advance. -- ++ | Steve Edberg [EMAIL PROTECTED] | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | ++ | Restriction of free thought and free speech is the most dangerous of | | all subversions. It is the one un-American act that could most easily | | defeat us.| | - Supreme Court Justice (1939-1975) William O. Douglas | ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] phplib???
At 03:23 PM 12/13/2001 -0800, Nathan Cassano wrote: Went to www.google.com. Searched phplib. The first result returned was http://sourceforge.net/projects/phplib. i went to the site and the description of phplib was rather sparse. i'm wondering if anyone can provide a more comprehensive description. thanks. Duane Douglas ASP / SQL Server Tutoring and Training -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] phplib???
From: Duane Douglas [EMAIL PROTECTED] At 03:23 PM 12/13/2001 -0800, Nathan Cassano wrote: Went to www.google.com. Searched phplib. The first result returned was http://sourceforge.net/projects/phplib. i went to the site and the description of phplib was rather sparse. i'm wondering if anyone can provide a more comprehensive description. thanks. It is a external library with useful PHP functions. It was designed by some German guys, but you can now forget it. Main feature was the session function and that function is now integrated in the PHP extensions. -Egon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHPLIB and Auth
Can it be that my Apache server is not well configured? I think you have to allow methods like GET and POST ? -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 19 maart 2001 10:26 To: PHP Mailing Listl (E-mail) Subject:[PHP] PHPLIB and Auth Hi Guys, I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong ?php class TIMEKEEPER_AUTH extends Auth{ /* Declare variables */ var $classname="TIMEKEEPER_AUTH"; var $magic="TIMEKEEPER_MAGIC"; var $lifetime=15; //Maximum 15 minutes idle time !!! var $database_class = "TIMEKEEPER_DB"; var $database_table = "auth_user"; function auth_loginform() { global $sess; include("loginform.ihtml"); } function auth_validatelogin() { global $username, $password; if(isset($username)) { $this-auth["uname"]=$username; } $uid = false; $this-db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this-database_table, addslashes($username), addslashes($password))); while($this-db-next_record()) { $uid = $this-db-f("user_id"); $this-auth["perm"] = $this-db-f("perms"); } return $uid; } } /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db-query("select count(*) as count from auth_user"); $db-Next_Record(); $count = $db-f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db-Next_Record(); $uid = $db-f("user_id"); //uid gives ... which is correct SO OK --- The must be something wrong with my loginform it does not submit the right values WHY ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHPLIB and PHPMyAdmin
On Tue, 16 Jan 2001, Kevin Cawthorne wrote: Hi, I want to install PHPLIB but one of the configuration notes says "turn off magic quotes in the php.ini file". OK But I'm, using phpMyAdmin, which I understand NEEDS magic quotes on to work. Has anyone done this using the two together? Yes, I use .htaccess files to control phplib (you can have multiple phplibs) Tarique = B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHPLIB and PHPMyAdmin
How can you control 'magic quotes' with .htaccess? I thought this is a php.ini command? I kind of have the same problem. My web host has magic quotes off and I would like to use phpMyAdmin. Is it possible to turn them on without accesing the ini file? Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 7:16 AM To: Kevin Cawthorne Cc: [EMAIL PROTECTED] Subject: Re: [PHP] PHPLIB and PHPMyAdmin On Tue, 16 Jan 2001, Kevin Cawthorne wrote: Hi, I want to install PHPLIB but one of the configuration notes says "turn off magic quotes in the php.ini file". OK But I'm, using phpMyAdmin, which I understand NEEDS magic quotes on to work. Has anyone done this using the two together? Yes, I use .htaccess files to control phplib (you can have multiple phplibs) Tarique = B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHPLIB and PHPMyAdmin
Since phpmyadmin doesn't use an include path and an auto prepend file but phplib does, what we do is run them under separate sub directories. Under the phplib subdir we use an .htaccess to specify the phplib directives needed to make it run and under the phpmyadmin subdir we don't specify anything since phpmyadmin doesn't require this. What we don't do is put the phplib .htaccess with it's directives under the web root "/". That way we can specify varying configurations under various sub directories. So, you can have magic quotes on under one dir and off under another. Use .htaccess for configuration. best of both worlds. Matt Friedman Spry New Media - Original Message - From: "Ignacio Vazquez-Abrams" [EMAIL PROTECTED] To: "Kevin Cawthorne" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, January 16, 2001 9:24 AM Subject: Re: [PHP] PHPLIB and PHPMyAdmin On Tue, 16 Jan 2001, Kevin Cawthorne wrote: Hi, I want to install PHPLIB but one of the configuration notes says "turn off magic quotes in the php.ini file". OK But I'm, using phpMyAdmin, which I understand NEEDS magic quotes on to work. Has anyone done this using the two together? Kevin Cawthorne Knowing which web server you're using helps, but if you're using Apache, the way to do it is to turn it off in php.ini and then turn it on in httpd.conf or .htaccess or wherever for the directory/location phpMyAdmin is in. -- Ignacio Vazquez-Abrams [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]