[PHP] Gd2 Fonts
Hi, I'm a newbie to linux and I have a question related to gd2 and ttf fonts under this operating system. I hava a php script that writes a text on a picture using functions like and i don't know how and where to install ttf fonts for this script to work. i've tried to put them in the same dir as the script and also in other dirs that contained ttf files and it didn't work. Also another question: is there a way to find a list with email accounts on a server using PHP. I want to be able to delete accounts, change passwords, etc. Can anyone help me with that or is there an appropriate mailing list that deals with that kind of problems (probably linux?) Thanx, Alex. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to use PHP-Nuke in safe mode
Jordi Canals wrote: Porcupine PC wrote: How can i use PHP-Nuke in this safe mode? You must try to ask this in a PHP-Nuke especific list ... But the answer is NO, cannot be used in safe mode. Weird, I've seen php-nukes running in safe mode. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting PHP on Windows to talk to MS SQL?
I'm trying to get PHP (for Windows) to talk to MS SQL Server. This is proving to be non-trivial... I downloaded and installed the Windows binary package on my machine (the machine is running Microsfot Windows XP Professional), and jumped through the hoops to get it running under Apache 2.0. So far, so good. Now, the first thing I noted was that the mssql functions actually don't seem to exist in the binary... and apparently you have to compile them in to PHP, after having built FreeTDS. This seems a bit odd, as it's not at all clear to me that FreeTDS actually will build under Windows at all (it being a UNIX solution). I did try building it under cygwin, which ended with a flurry of error messages in bsqldb.c, so this assumption seems correct. All right, approach #2... maybe I can use COM objects to try to connect to an ODBC data source, something like an example I found on the php documentation for mssql: $db = new COM(ADODB.Connection); $dsn = DRIVER=SQL Server; SERVER=my.local.server;UID=user;PWD=passwd; DATABASE=dbname; $db-Open($dsn); $rs = $db-Execute(SELECT * FROM project LIMIT 1); while (!$rs-EOF) { echo $rs-Fields['project_id']-Value.BR; $rs-MoveNext(); } This seems to at least kick up no errors up to a point... and that point is when I try to wind through that loop. Any ideas what the right best way to do this is? I'd prefer to use the mssql functions if I can... Thanks, Weston -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gd2 Fonts
On Friday 23 July 2004 14:37, Alexandru Boulescu wrote: I'm a newbie to linux and I have a question related to gd2 and ttf fonts under this operating system. I hava a php script that writes a text on a picture using functions like and i don't know how and where to install ttf fonts for this script to work. i've tried to put them in the same dir as the script and also in other dirs that contained ttf files and it didn't work. 1) How exactly did your script not work? 2) what did the php error log say? I will hazard a guess - you need to specify the full path to your font file. However somewtime between version 4.3.2 and 4.3.4 this requirement was dropped. Also another question: is there a way to find a list with email accounts on a server using PHP. I want to be able to delete accounts, change passwords, etc. Please ask different questions in separate posts. A quick answer to this would be: it is completely dependent on your mailserver setup. You should learn more about your mailserver first. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I'd love to go out with you, but the man on television told me to say tuned. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting PHP on Windows to talk to MS SQL?
On Friday 23 July 2004 15:15, [EMAIL PROTECTED] wrote: Questions which are DB related should be posted to the php-db list. I'm trying to get PHP (for Windows) to talk to MS SQL Server. This is proving to be non-trivial... [snip] Have you gone through the suggestions in the user notes on the online manual? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Why is it called a TV set when you only get one? -- Why Why Why n39 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting PHP on Windows to talk to MS SQL?
Hi Weston, maybe this page can help you http://in.php.net/manual/en/function.odbc-connect.php On Fri, 23 Jul 2004 02:15:11 -0500, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm trying to get PHP (for Windows) to talk to MS SQL Server. This is proving to be non-trivial... I downloaded and installed the Windows binary package on my machine (the machine is running Microsfot Windows XP Professional), and jumped through the hoops to get it running under Apache 2.0. So far, so good. Now, the first thing I noted was that the mssql functions actually don't seem to exist in the binary... and apparently you have to compile them in to PHP, after having built FreeTDS. This seems a bit odd, as it's not at all clear to me that FreeTDS actually will build under Windows at all (it being a UNIX solution). I did try building it under cygwin, which ended with a flurry of error messages in bsqldb.c, so this assumption seems correct. All right, approach #2... maybe I can use COM objects to try to connect to an ODBC data source, something like an example I found on the php documentation for mssql: $db = new COM(ADODB.Connection); $dsn = DRIVER=SQL Server; SERVER=my.local.server;UID=user;PWD=passwd; DATABASE=dbname; $db-Open($dsn); $rs = $db-Execute(SELECT * FROM project LIMIT 1); while (!$rs-EOF) { echo $rs-Fields['project_id']-Value.BR; $rs-MoveNext(); } This seems to at least kick up no errors up to a point... and that point is when I try to wind through that loop. Any ideas what the right best way to do this is? I'd prefer to use the mssql functions if I can... Thanks, Weston -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] good PHP to PDF libary?
Im looking for some good and complete and advanced PHP to PDF libarary. So far, i have seen pdflib and ros pdf class. But i really would like to hear from you guys what is best? my only main goal for this is to create a low - res pdf and a hi - res business card pdf template. thanks -- Louie Miranda http://www.axishift.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trouble with Apache, PHP, pear
When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL worked, and when I tried the phpinfo() function, I got a page that looked OK. I could create simple php pages and serve them up. Then I tried to install pear, and things started to be not OK after all. phpinfo() told me that the 'Configure Command' had both the following in it: --with-pear=/usr/share/pear --without-pear So I tried to install pear manually, and when I tried the command: $ lynx -source http://go-pear.org/ | php I got the following response: bash: php: command not found I went looking for the executable so I could run it from that directory, and I couldn't find it anywhere. I apparently have the following rpms installed: apache2-2.0.48-6.3.100mdk apache2-common-2.0.48-6.3.100mdk apache2-manual-2.0.48-6.3.100mdk apache2-mod_cache-2.0.48-6.3.100mdk apache2-mod_disk_cache-2.0.48-6.3.100mdk apache2-mod_perl-2.0.48_1.99_11-3mdk apache2-mod_php-2.0.48_4.3.4-1mdk apache2-mod_proxy-2.0.48-6.3.100mdk apache2-mod_ssl-2.0.48-6.3.100mdk apache2-mod_suexec-2.0.48-1mdk apache2-modules-2.0.48-6.3.100mdk apache-conf-2.0.48-2mdk Also the following php-related rpms: libphp_common432-4.3.4-4.1.100mdk php-imap-4.3.4-1mdk php-ini-4.3.4-1mdk php-mysql-4.3.4-1mdk php-xml-4.3.4-1mdk php-xmlrpc-4.3.4-1mdk When I use rpmdrake to search for other packages to install, I see the following choices: mod_php-4.3.4-1mdk php432-devel-4.3.4-4.1.100mdk php432-devel-4.3.4-4mdk php-calendar-4.3.4-1mdk php-cgi-4.3.4-4.1.100mdk php-cgi-4.3.4-4mdk php-dbg-4.3.4_2.11.5-1mdk php-manual-en-4.3.4-1mdk phpMyAdmin-2.5.4-1mdk php-pear-4.3.4-3mdk php-pear-Date-1.4-4mdk php-pear-HTML_Common-1.2.1-3mdk php-pear-HTML_Select-1.2-3mdk There are a bunch of other php modules available, but I don't think I need them right away. Here's my question: Should I just uninstall Apache and reinstall it, then install php and pear? Should I compile Apache myself? If I do that, I'm not sure of all the configuration options I should choose. Or should I just install the new rpms that I think I want, and rpmdrake will make everything work nicely together? Sorry if this is too Mandrake-centric, but I'd like to use RPMs if possible, I'm hoping that makes it easier to upgrade in the future. Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] log.
I am learning php. I need to log all actions on my page. (like ip, browser, time, pages etc). question is: how can i identify a user and when he is on my page(s) to log all his actions. p.s. sorry for my english. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and images
I have problem with jpg pictures in php pages. Path and picture is correct but when i want see picture in php script picture don't show. I use PHP4.3.4 on apache server 2.0.44 on Windopws 2000 Server. Thanks for help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: good PHP to PDF libary?
Louie Miranda [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Im looking for some good and complete and advanced PHP to PDF libarary. So far, i have seen pdflib and ros pdf class. But i really would like to hear from you guys what is best? my only main goal for this is to create a low - res pdf and a hi - res business card pdf template. thanks PDFlib is very good, but costs quite an amount of money. But there is a free trial version available so that you can test anything beforehand and if it works you can buy the license. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php and images
Roman Duriancik [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have problem with jpg pictures in php pages. Path and picture is correct but when i want see picture in php script picture don't show. I use PHP4.3.4 on apache server 2.0.44 on Windopws 2000 Server. Thanks for help. Check if your JPEGs are in CMYK color mode - must be RGB. Does your browser display the image when you open it with File / Open...? Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP4 : Installing LDAP without recompiling ?
Hi everyone, I have currently a production server running PHP 4 with MySQL and other extension support enaoubled. This server is working and used by number of users. Can I enable LDAP support without having to recompile PHP ? Very thanks for your help Regards, Ange. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP4 : Installing LDAP without recompiling ?
On Friday 23 Jul 2004 02:40, ange wrote: Hi everyone, I have currently a production server running PHP 4 with MySQL and other extension support enaoubled. This server is working and used by number of users. Can I enable LDAP support without having to recompile PHP ? Try running phpize in the ext/ldap dir, then do the ./configure make make install dance. You should end up with a nice little ldap.so that you can load with dl() Very thanks for your help Regards, Ange. -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP4 : Installing LDAP without recompiling ?
Very thanks, this seems a perfectly suitable solution I will try this way just after lunch :) I may need further help about loading the .so lib with dl, but since I have not yet installed openldap, this seems a bit prematurate. Thanks again for your help. ange. Evan Nemerson [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] On Friday 23 Jul 2004 02:40, ange wrote: Hi everyone, I have currently a production server running PHP 4 with MySQL and other extension support enaoubled. This server is working and used by number of users. Can I enable LDAP support without having to recompile PHP ? Try running phpize in the ext/ldap dir, then do the ./configure make make install dance. You should end up with a nice little ldap.so that you can load with dl() Very thanks for your help Regards, Ange. -- Evan Nemerson [EMAIL PROTECTED] http://coeusgroup.com/en -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Disk serial number
I receive an error: Warning: dl(): Not supported in multithreaded Web servers - use extension statements in your php.ini Tom Rogers [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Friday, July 23, 2004, 8:26:56 AM, you wrote: R Hi, R Is there a way to get with PHP script ( maybe with some module) serial R number of the hard disk? R Thanks in advance! On windows you can use the win32api like this: ?php dl(php_w32api.dll); $api = new win32; $api-registerfunction(long GetLastError Alias GetError () From kernel32.dll); $api-registerfunction(long GetVolumeInformationA Alias GetVolumeInformation (string a, string b, int c, int d, int e, int f, string g, int h) From kernel32.dll); $drive = C:\\; $serialNo = 0; $MaximumComponentLength = 0; $FileSystemFlags = 0; $VolumeNameSize = 260; $VolumeNameBuffer = str_repeat(\0, $VolumeNameSize); $FileSystemNameSize = 260; $FileSystemNameBuffer = str_repeat(\0, $FileSystemNameSize); if(!$result = $api-GetVolumeInformation( $drive, $VolumeNameBuffer, $VolumeNameSize, $serialNo, $MaximumComponentLength, $FileSystemFlags, $FileSystemNameBuffer, $FileSystemNameSize)){ $error = $api-getError(); echo $drive.' Oops error: '.$error.\n; } echo Drive $drive (.trim($VolumeNameBuffer).) Serial number $serialNo\n; ? (The stock win32api dll will probably crash with that many variables so let me know if you want a working version.) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Trouble with Apache, PHP, pear
Hi Ron, Sounds like you've done everything correctly, just PHP wasn't installed as a CLI. Just to be sure, do a $ find / -name php Then, if it is found, $ lynx -source http://go-pear.org/ | /path/to/php If it's not found, just grap a PHP rpm (make sure it's a CLI version, or --with-cli) and install that. Hope that's helpful, Aidan Ron King [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL worked, and when I tried the phpinfo() function, I got a page that looked OK. I could create simple php pages and serve them up. Then I tried to install pear, and things started to be not OK after all. phpinfo() told me that the 'Configure Command' had both the following in it: --with-pear=/usr/share/pear --without-pear So I tried to install pear manually, and when I tried the command: $ lynx -source http://go-pear.org/ | php I got the following response: bash: php: command not found I went looking for the executable so I could run it from that directory, and I couldn't find it anywhere. I apparently have the following rpms installed: apache2-2.0.48-6.3.100mdk apache2-common-2.0.48-6.3.100mdk apache2-manual-2.0.48-6.3.100mdk apache2-mod_cache-2.0.48-6.3.100mdk apache2-mod_disk_cache-2.0.48-6.3.100mdk apache2-mod_perl-2.0.48_1.99_11-3mdk apache2-mod_php-2.0.48_4.3.4-1mdk apache2-mod_proxy-2.0.48-6.3.100mdk apache2-mod_ssl-2.0.48-6.3.100mdk apache2-mod_suexec-2.0.48-1mdk apache2-modules-2.0.48-6.3.100mdk apache-conf-2.0.48-2mdk Also the following php-related rpms: libphp_common432-4.3.4-4.1.100mdk php-imap-4.3.4-1mdk php-ini-4.3.4-1mdk php-mysql-4.3.4-1mdk php-xml-4.3.4-1mdk php-xmlrpc-4.3.4-1mdk When I use rpmdrake to search for other packages to install, I see the following choices: mod_php-4.3.4-1mdk php432-devel-4.3.4-4.1.100mdk php432-devel-4.3.4-4mdk php-calendar-4.3.4-1mdk php-cgi-4.3.4-4.1.100mdk php-cgi-4.3.4-4mdk php-dbg-4.3.4_2.11.5-1mdk php-manual-en-4.3.4-1mdk phpMyAdmin-2.5.4-1mdk php-pear-4.3.4-3mdk php-pear-Date-1.4-4mdk php-pear-HTML_Common-1.2.1-3mdk php-pear-HTML_Select-1.2-3mdk There are a bunch of other php modules available, but I don't think I need them right away. Here's my question: Should I just uninstall Apache and reinstall it, then install php and pear? Should I compile Apache myself? If I do that, I'm not sure of all the configuration options I should choose. Or should I just install the new rpms that I think I want, and rpmdrake will make everything work nicely together? Sorry if this is too Mandrake-centric, but I'd like to use RPMs if possible, I'm hoping that makes it easier to upgrade in the future. Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: log.
Hi Ulitin, When a user visits your page, you can create a session. This session will identify the user throughout his visit. Most people tend to log all actions to an IP address, or a hostname, this is probably easier. To get the IP, browser, referer, etc, look at: http://aidan.dotgeek.org/lib/?file=Visitor.php http://pear.php.net/package/Net_UserAgent_Detect Hope that helps (ps. your english was fantastic :p) Regads, Aidan Ulitin S.S. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am learning php. I need to log all actions on my page. (like ip, browser, time, pages etc). question is: how can i identify a user and when he is on my page(s) to log all his actions. p.s. sorry for my english. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: log.
Aidan Lister [EMAIL PROTECTED] ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:[EMAIL PROTECTED] Hi Ulitin, When a user visits your page, you can create a session. This session will identify the user throughout his visit. Most people tend to log all actions to an IP address, or a hostname, this is probably easier. To get the IP, browser, referer, etc, look at: http://aidan.dotgeek.org/lib/?file=Visitor.php http://pear.php.net/package/Net_UserAgent_Detect Hope that helps (ps. your english was fantastic :p) Regads, Aidan Thanx very match. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Disk serial number
Rosen wrote: Yes, on Linux there is a command to get this info, but on windows I think there'n no thath command. Is there a module for PHP to do this ? c:\dir c:\test.txt Volume in drive C is Primary Volume Serial Number is 003E-6CEA Directory of c:\ 07/23/2004 01:43 PM11 test.txt 1 File(s) 11 bytes 0 Dir(s) 23,576,174,592 bytes free Just parse that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strlen question
I have successfully hidden some parts of a form based on items being blank with following code: ?php if(strlen($_POST['item01']) 0) { ? ?php } ? (with the help of this forum!!) the form is separated into 5 sections and if there are no items filled out in that section, then i need to hide the title too. I have been playing around with the syntax and am not having any success...any suggestions? here is a sample of what i am trying: ?php if(strlen($_POST['item01', 'item02', 'item03']) 0) { ? ?php } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] log.
Ulitin S.S. wrote: I am learning php. I need to log all actions on my page. (like ip, browser, time, pages etc). question is: how can i identify a user and when he is on my page(s) to log all his actions. Your web server already does all of this, why duplicate it? Just get a log analyzer. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: strlen question
try isset() Bogomil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] good PHP to PDF libary?
[snip] Im looking for some good and complete and advanced PHP to PDF libarary. So far, i have seen pdflib and ros pdf class. But i really would like to hear from you guys what is best? my only main goal for this is to create a low - res pdf and a hi - res business card pdf template. [/snip] http://www.fpdf.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] log.
John W. Holmes [EMAIL PROTECTED] ???/ ? ?: news:[EMAIL PROTECTED] Ulitin S.S. wrote: I am learning php. I need to log all actions on my page. (like ip, browser, time, pages etc). question is: how can i identify a user and when he is on my page(s) to log all his actions. Your web server already does all of this, why duplicate it? Just get a log analyzer. it is not my web server. i dont have access to it (to view logs). and i need to make a special (for my needs) logs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DOMXML API support needed in PHP5
When I had decided to redevelop my website using PHP4's XSLT functions as the templating system (as opposed to Smarty, phplib etc.), I looked at PHP4's two alternatives: 1. XML (Expat) + XSL (Sablotron) 2. DOMXML (libxml2 libxslt) At the time there were early signs that PHP5's XML/XSLT support would be based on libxml2/libxslt (and that is what finally happened). That made me decide to use DOMXML. If the current situation remains, when my hosting company finally replace PHP4 with PHP5 (not in the near future, I hope!) my site will break due to PHP5 not supporting the DOMXML function. This will be repeated for all other sites that use this function. On the contrary, under PHP5, PHP4 scripts based on the XML function will work, even though the underlying library has changed! There should also be a transitional solution for DOMXML users rather than the present lack of either forwards compatibility in PHP4 or backwards compatibility in PHP5. To workaround this problem there are at least two alternatives: 1. A PHP script could be created to check the running PHP version and if it's =PHP5 then translate the PHP4 DOMXML function calls to their equivalent PHP5 DOM function calls. This would allow existing PHP4 scripts to work under PHP5 and ease the transition to replacement scripts based on PHP5's DOM's XML XSLT functions. 2. Have a development system that supports both PHP4 PHP5 and develop PHP5 DOM based replacement scripts. Then work very closely with the hosting company so that at the same time they replace PHP4 with PHP5, the new PHP5 scripts replace the PHP4 ones (or use a PHP script to check the version and then point to either the PHP4 or PHP5 scripts). Neither is a good solution nor are they built-in solutions, therefore they will be repeated, perhaps with slight variations, by all(?) DOMXML users around the world. A much better approach would be for PHP5 to include backwards compatibility for the DOMXML function (at least for the most common function calls eg. domxml_open_file, domxml_xslt_stylesheet_file, result_dump_mem, etc.), as PHP5 does with practically every other PHP4 function. When PHP5 reaches version 5.3 or 5.4, the DOMXML support could be removed to avoid bloat (this has been done before with other functions). By then people would've had sufficient time to replace their old DOMXML code. Under PHP4 it was easy for me to create some initial scripts to test it's two XSLT related functions, on the same local web server software running a single PHP interpreter. It would be as easy to develop DOM based replacement scripts for DOMXML ones if both functions worked under PHP5, rather than the current situation of DOMXML only working with PHP4 DOM only working in PHP5. Sorry if this post is a bit long but I hope you find my suggestion is reasonable? Cheers, Scrumpy :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DOMXML support should be added to PHP5
When I had decided to redevelop my website using PHP4's XSLT functions as the templating system (as opposed to Smarty, phplib etc.), I looked at PHP4's two alternatives: 1. XML (Expat) + XSL (Sablotron) 2. DOMXML (libxml2 libxslt) At the time there were early signs that PHP5's XML/XSLT support would be based on libxml2/libxslt (and that is what finally happened). That made me decide to use DOMXML. If the current situation remains, when my hosting company finally replace PHP4 with PHP5 (not in the near future, I hope!) my site will break due to PHP5 not supporting the DOMXML function. This will be repeated for all other sites that use this function. On the contrary, under PHP5, PHP4 scripts based on the XML function will work, even though the underlying library has changed! There should also be a transitional solution for DOMXML users rather than the present lack of either forwards compatibility in PHP4 or backwards compatibility in PHP5. To workaround this problem there are at least two alternatives: 1. A PHP script could be created to check the running PHP version and if it's =PHP5 then translate the PHP4 DOMXML function calls to their equivalent PHP5 DOM function calls. This would allow existing PHP4 scripts to work under PHP5 and ease the transition to replacement scripts based on PHP5's DOM's XML XSLT functions. A PHP user has added a comment to the online manual that he has created a partial solution that covers XML only. 2. Have a development system that supports both PHP4 PHP5 and develop PHP5 DOM based replacement scripts. Then work very closely with the hosting company so that at the same time they replace PHP4 with PHP5, the new PHP5 scripts replace the PHP4 ones (or use a PHP script to check the version and then point to either the PHP4 or PHP5 scripts). Neither is a good solution nor are they built-in solutions, therefore they will be repeated, perhaps with slight variations, by all(?) DOMXML users around the world. A much better approach would be for PHP5 to include support for the DOMXML function (at least for the most common function calls eg. domxml_open_file, domxml_xslt_stylesheet_file, result_dump_mem, etc.), as PHP5 does with practically every other PHP4 function. When PHP5 reaches version 5.2 or 5.3, the DOMXML support could be removed to avoid bloat (this has been done before with other functions). By then people would've had sufficient time to replace their old DOMXML code. Under PHP4 it was easy for me to create some initial scripts to test it's two XSLT related functions on my PC which runs Apache and a single PHP interpreter. It would be as easy to develop DOM based replacement scripts for DOMXML ones if both functions worked under PHP5, rather than the current situation of DOMXML only working with PHP4 DOM only working in PHP5. Sorry if this post is a bit long but I hope you find my suggestion/request is reasonable. Cheers, Scrumpy :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DOMXML support should be added to PHP5
When I had decided to redevelop my website using PHP4's XSLT functions as the templating system (as opposed to Smarty, phplib etc.), I looked at PHP4's two alternatives: 1. XML (Expat) + XSL (Sablotron) 2. DOMXML (libxml2 libxslt) At the time there were early signs that PHP5's XML/XSLT support would be based on libxml2/libxslt (and that is what finally happened). That made me decide to use DOMXML. If the current situation remains, when my hosting company finally replace PHP4 with PHP5 (not in the near future, I hope!) my site will break due to PHP5 not supporting the DOMXML function. This will be repeated for all other sites that use this function. On the contrary, under PHP5, PHP4 scripts based on the XML function will work, even though the underlying library has changed! There should also be a transitional solution for DOMXML users rather than the present lack of either forwards compatibility in PHP4 or backwards compatibility in PHP5. To workaround this problem there are at least two alternatives: 1. A PHP script could be created to check the running PHP version and if it's =PHP5 then translate the PHP4 DOMXML function calls to their equivalent PHP5 DOM function calls. This would allow existing PHP4 scripts to work under PHP5 and ease the transition to replacement scripts based on PHP5's DOM's XML XSLT functions. A PHP user has added a comment to the online manual that he has created a partial solution that covers XML only. 2. Have a development system that supports both PHP4 PHP5 and develop PHP5 DOM based replacement scripts. Then work very closely with the hosting company so that at the same time they replace PHP4 with PHP5, the new PHP5 scripts replace the PHP4 ones (or use a PHP script to check the version and then point to either the PHP4 or PHP5 scripts). Neither is a good solution nor are they built-in solutions, therefore they will be repeated, perhaps with slight variations, by all(?) DOMXML users around the world. A much better approach would be for PHP5 to include support for the DOMXML function (at least for the most common function calls eg. domxml_open_file, domxml_xslt_stylesheet_file, result_dump_mem, etc.), as PHP5 does with practically every other PHP4 function. When PHP5 reaches version 5.2 or 5.3, the DOMXML support could be removed to avoid bloat (this has been done before with other functions). By then people would've had sufficient time to replace their old DOMXML code. Under PHP4 it was easy for me to create some initial scripts to test it's two XSLT related functions on my PC which runs Apache and a single PHP interpreter. It would be as easy to develop DOM based replacement scripts for DOMXML ones if both functions worked under PHP5, rather than the current situation of DOMXML only working with PHP4 DOM only working in PHP5. Sorry if this post is a bit long but I hope you find my suggestion/request is reasonable. Cheers, Scrumpy :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: DOMXML support should be added to PHP5
Sorry for the repeated posts. I didn't know that they got queued awaiting confirmation of my email address :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: strlen question
sorry, i'm not a coder.that means nothing to me.. try isset() how? Mr. Bogomil Shopov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] try isset() Bogomil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DOMXML API support needed in PHP5
When I had decided to redevelop my website using PHP4's XSLT functions as the templating system (as opposed to Smarty, phplib etc.), I looked at PHP4's two alternatives: 1. XML (Expat) + XSL (Sablotron) 2. DOMXML (libxml2 libxslt) At the time there were early signs that PHP5's XML/XSLT support would be based on libxml2/libxslt (and that is what finally happened). That made me decide to use DOMXML. If the current situation remains, when my hosting company finally replace PHP4 with PHP5 (not in the near future, I hope!) my site will break due to PHP5 not supporting the DOMXML function. This will be repeated for all other sites that use this function. On the contrary, under PHP5, PHP4 scripts based on the XML function will work, even though the underlying library has changed! There should also be a transitional solution for DOMXML users rather than the present lack of either forwards compatibility in PHP4 or backwards compatibility in PHP5. To workaround this problem there are at least two alternatives: 1. A PHP script could be created to check the running PHP version and if it's =PHP5 then translate the PHP4 DOMXML function calls to their equivalent PHP5 DOM function calls. This would allow existing PHP4 scripts to work under PHP5 and ease the transition to replacement scripts based on PHP5's DOM's XML XSLT functions. 2. Have a development system that supports both PHP4 PHP5 and develop PHP5 DOM based replacement scripts. Then work very closely with the hosting company so that at the same time they replace PHP4 with PHP5, the new PHP5 scripts replace the PHP4 ones (or use a PHP script to check the version and then point to either the PHP4 or PHP5 scripts). Neither is a good solution nor are they built-in solutions, therefore they will be repeated, perhaps with slight variations, by all(?) DOMXML users around the world. A much better approach would be for PHP5 to include backwards compatibility for the DOMXML function (at least for the most common function calls eg. domxml_open_file, domxml_xslt_stylesheet_file, result_dump_mem, etc.), as PHP5 does with practically every other PHP4 function. When PHP5 reaches version 5.3 or 5.4, the DOMXML support could be removed to avoid bloat (this has been done before with other functions). By then people would've had sufficient time to replace their old DOMXML code. Under PHP4 it was easy for me to create some initial scripts to test it's two XSLT related functions, on the same local web server software running a single PHP interpreter. It would be as easy to develop DOM based replacement scripts for DOMXML ones if both functions worked under PHP5, rather than the current situation of DOMXML only working with PHP4 DOM only working in PHP5. Sorry if this post is a bit long but I hope you find my suggestion is reasonable. Cheers, Scrumpy :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] Disk serial number
Hi, Friday, July 23, 2004, 8:08:22 PM, you wrote: R I receive an error: R Warning: dl(): Not supported in multithreaded Web servers - use extension R statements in your php.ini You need to add extension=php_w32api.dll to your php.ini and restart the web server -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] log.
I am learning php. I need to log all actions on my page. (like ip, browser, time, pages etc). question is: how can i identify a user and when he is on my page(s) to log all his actions. Along with the other stuff posted, take a look at http://phpsniff.sourceforge.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble with Apache, PHP, pear
You need php-cli rpm, it's not an extension, it's command line binary. Ron King wrote: When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL worked, and when I tried the phpinfo() function, I got a page that looked OK. I could create simple php pages and serve them up. Then I tried to install pear, and things started to be not OK after all. phpinfo() told me that the 'Configure Command' had both the following in it: --with-pear=/usr/share/pear --without-pear So I tried to install pear manually, and when I tried the command: $ lynx -source http://go-pear.org/ | php I got the following response: bash: php: command not found I went looking for the executable so I could run it from that directory, and I couldn't find it anywhere. I apparently have the following rpms installed: apache2-2.0.48-6.3.100mdk apache2-common-2.0.48-6.3.100mdk apache2-manual-2.0.48-6.3.100mdk apache2-mod_cache-2.0.48-6.3.100mdk apache2-mod_disk_cache-2.0.48-6.3.100mdk apache2-mod_perl-2.0.48_1.99_11-3mdk apache2-mod_php-2.0.48_4.3.4-1mdk apache2-mod_proxy-2.0.48-6.3.100mdk apache2-mod_ssl-2.0.48-6.3.100mdk apache2-mod_suexec-2.0.48-1mdk apache2-modules-2.0.48-6.3.100mdk apache-conf-2.0.48-2mdk Also the following php-related rpms: libphp_common432-4.3.4-4.1.100mdk php-imap-4.3.4-1mdk php-ini-4.3.4-1mdk php-mysql-4.3.4-1mdk php-xml-4.3.4-1mdk php-xmlrpc-4.3.4-1mdk When I use rpmdrake to search for other packages to install, I see the following choices: mod_php-4.3.4-1mdk php432-devel-4.3.4-4.1.100mdk php432-devel-4.3.4-4mdk php-calendar-4.3.4-1mdk php-cgi-4.3.4-4.1.100mdk php-cgi-4.3.4-4mdk php-dbg-4.3.4_2.11.5-1mdk php-manual-en-4.3.4-1mdk phpMyAdmin-2.5.4-1mdk php-pear-4.3.4-3mdk php-pear-Date-1.4-4mdk php-pear-HTML_Common-1.2.1-3mdk php-pear-HTML_Select-1.2-3mdk There are a bunch of other php modules available, but I don't think I need them right away. Here's my question: Should I just uninstall Apache and reinstall it, then install php and pear? Should I compile Apache myself? If I do that, I'm not sure of all the configuration options I should choose. Or should I just install the new rpms that I think I want, and rpmdrake will make everything work nicely together? Sorry if this is too Mandrake-centric, but I'd like to use RPMs if possible, I'm hoping that makes it easier to upgrade in the future. Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: strlen question
Well you want to check if the var is not set then don't show the title. // if item01 is not set if(!isset($_POST['item01'])) { // $title = ; } msa wrote: sorry, i'm not a coder.that means nothing to me.. try isset() how? Mr. Bogomil Shopov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] try isset() Bogomil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php-general Digest 23 Jul 2004 07:15:16 -0000 Issue 2893
On 23/07/2004, at 2:15 AM, [EMAIL PROTECTED] wrote: To check if your mail server is actually running, type telnet mailserver.com 25 in your terminal. If it is running, you should get a message like 220 mailserver.com ESMTP Then type quit to get out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] postfix - php
On 23/07/2004, at 2:15 AM, [EMAIL PROTECTED] wrote: Subject: Re: [PHP] postfix with PHP on Mac OS X I'm betting that the problem is with security. By default, Apple ships the mail server configured to NOT be an open relay. Meaning, you need to provide a login name and password in order to send email. This is a very good thing, otherwise your machine would be used to send out spam. In order to send email from php, your mail server (postfix, sendmail, whatever) needs to be configured to allow relaying from the machine your php is running from, since php doesn't have an option to login to the mail server. In sendmail, this is controlled from the /etc/mail/access file. In postfix, I think the file is /etc/postfix/access. Read the file carefully. Then you can add the line x.x.x.x RELAY. With x.x.x.x being the ip address of the machine that php is running on. You can also add lines like spamoffers.com REJECT, to block all email from that domain. To check if your mail server is actually running, type telnet mailserver.com 25 in your terminal. If it is running, you should get a message like 220 mailserver.com ESMTP Then type quit to get out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strlen question
the form is separated into 5 sections and if there are no items filled out in that section, then i need to hide the title too. I have been playing around with the syntax and am not having any success...any suggestions? here is a sample of what i am trying: ?php if(strlen($_POST['item01', 'item02', 'item03']) 0) { ? ?php } ? ?php if(strlen($_POST['item01']) 0 || strlen($_POST['item02']) 0 || strlen($_POST['item03']) 0) { ? ?php } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to use PHP-Nuke in safe mode
Well the problem i am having is: I am using Raven's 7.3 Distro of PHP-Nuke (www.ravenphpscripts.com) I had the software installed and edited the config.php file. I then setup a administrator God account. But then when i try to log in, it said access denied Joe Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jordi Canals wrote: Porcupine PC wrote: How can i use PHP-Nuke in this safe mode? You must try to ask this in a PHP-Nuke especific list ... But the answer is NO, cannot be used in safe mode. Weird, I've seen php-nukes running in safe mode. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php and images
I have a certain difficulties in case of processing large images thru GD2 library. GD2 has some problems with image processing and it results in some exception and GD just crashes. I have to mention, that the crash causes whole php interpreter to crash and execution of the script is terminated without any warning or handlable event :(... I don't know for certain now, which command causes it, but it seems that imagecopyresampled is the origin of the problems. So if you are using GD2 with large images, this may be the issue. regards, m. Roman Duriancik wrote: I have problem with jpg pictures in php pages. Path and picture is correct but when i want see picture in php script picture don't show. I use PHP4.3.4 on apache server 2.0.44 on Windopws 2000 Server. Thanks for help. -- Miroslav Hudak developer designer http://hudak.info -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good PHP to PDF libary?
I have used ros pdf class many times, it is very simple but very effective. Read over the doco's and see how powerful+simple it really is! Cheers, Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strlen question
?php if(strlen($_POST['item01'] . $_POST['item02'] . strlen($_POST['item03'])) { ? I'm shooting for succinctness here. I'd like to see if someone has a shorter solution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strlen question
On Fri, 23 Jul 2004 09:34:24 -0500, Jake Stonebender [EMAIL PROTECTED] wrote: ?php if(strlen($_POST['item01'] . $_POST['item02'] .$_POST['item03'])) { ? That's what I actually meant. Sorry. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installing Php5 over Existing Php4.3.6
Hi, I would like to install Php5 over an existing Php4.3.6 installation on Linux. What is the proper procedure? Do I need to uninstall the previous version first, if so, how? Can I install Php5 into the same location as the previous installation or should I install it into a different PREFIX directory? Any tip would be much appreciated. Francis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best practice to re-write a tutorial website
On Fri, 2004-07-23 at 00:06, Justin Patrin wrote: On Thu, 22 Jul 2004 23:48:54 +0300, EE [EMAIL PROTECTED] wrote: Dears, I am planing to rewrite my website. My site is tutorial-type site I wrote it, when I first learned php3, as an undergraduate research class. I think the code is sloppy as it is mixed with the HTML. I would like to rewrite the site utilizing the good things such OOP classes, template, etc. I would also like to separate my styles (CSS) from the HTML. Do you recommend any any tutorial? I would like to have the following functions: 1. Printer Friendly Version Capability You can use CSS and @media print to have *different* CSS for printing, right from the same site. You could also just have a different stylesheet that you include when the user wants to print. Or you could have multiple templates. Whatever floats your boat. 2. Search-ability A CMS could possibly handle this, but may be a bit big for this. If you want search capabilities, I'd look into a local solution that indexes your site manually. I've had good luck with mnogosearch. How about using MySQL fulltext? 3. Search Engine Friendly https://www.reversefold.com/tikiwiki/tiki-index.php?page=PHPFAQs#id926344 I read the aritcle and it is good. Therefore, I have the following questions: 1. What is the best way to store the tutorials. Should they be in a database or each in a separate HTML file. I'd go for database. But if you do that, you may want to look into some existing CMS software. Do you recommend any? I'll appreciate if you point me to the right track. 2. How to implement the above three points? I know it is a broad question but you can help me on whatever you know? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best practice to re-write a tutorial website
On Fri, 2004-07-23 at 04:57, Justin French wrote: On 23/07/2004, at 6:48 AM, EE wrote: 1. Printer Friendly Version Capability This can be achieved with media specific style sheets stylesheets -- no need for separate templates. Do you recommend any tutorial? 2. Search-ability For the most part, this can be achieved with MySQL's fulltext search capabilities. You just need to wrap it all in a search GUI and results page. 3. Search Engine Friendly This relates back to #1. If you restrict your use of HTML to only semantic page elements (DIVs, H1-6s, Ps, etc), rather that filling it with presentational mark-up (FONT, TABLE, etc) your pages will be lighter, which will allow better indexing by search engines. This is a really quick overview of course, but standards-based web pages with all presentational stuff moved to a CSS file will help SE's index your content accurately, and it will be a pleasure to maintain. How can I restrict my html to semantic elements? My tutorial has tables. I don't mean styling table. I mean engineering data tables? www.eeetc.bjaili.com/tutorial.php?num=7act=dig how can I move presentational stuff to css file? This seems to be a common stylesheet set-up: link rel='stylesheet' media='all' href='css/basic.css' / link rel='stylesheet' media='print' href='css/print.css' / style type='text/css' media='screen'@import url(css/advanced.css)/style But we're getting WAY off topic here. 1. What is the best way to store the tutorials. Should they be in a database or each in a separate HTML file. Either is fine, but searching will be easier in a database -- especially with MySQL's fulltext search built in. Search Google for specific help on any of the above, and you'll be set :) --- Justin French http://indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using Post like Get
With get varaibles, it's possible to always have get variables on a page, even without a form, by simply appending the Get variables to the end of the URL. Is there anyway to do the same with Post variables? For instance, a javascript that onUnload submit, or something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Post like Get
Dennis Gearon wrote: With get varaibles, it's possible to always have get variables on a page, even without a form, by simply appending the Get variables to the end of the URL. Is there anyway to do the same with Post variables? For instance, a javascript that onUnload submit, or something? Your question is not very clear but here goes: Post usually means the data is in the body of the message. In other words after sending the request headers you need to write the data for the 'payload' which may be your variables if you are using www/url-encoded but can be any content type you want it to be. THis is not something that you can do with javascript because you do not get direct access to the streams with javascript. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good PHP to PDF libary?
PDF Lib is very COOL , its give you ability to encrypt an existing pdf file its give you a powerful method to import pages from an existing pdf file and do some thing on it , its have only one problem very expensive price for full power . if they only split php version annd change the price for full power and make it less than $ 50 for full power it will be very fair . - Original Message - From: Chris Partridge [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 23, 2004 5:18 PM Subject: Re: [PHP] good PHP to PDF libary? I have used ros pdf class many times, it is very simple but very effective. Read over the doco's and see how powerful+simple it really is! Cheers, Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RSS and your opinion needed.
Hi, Some time back I came on the list and asked your advise for a class that gets RSS feeds from diff sites, I got quite a few good sites and a particular class that was really good. Unfortunatly I lost it in a webhost change but here is what it did: It got the feed and cached it for a day (or two - not too sure) so that speed and performance was improved instead of fetching it every time, it also allowed me to customize the links out (eg: open in new window) Any idea which class that is and where can I download it? if not that one, can you recommend one that is good? (and free) Lastly, I have never worked with RSS feeds before, can you tell me how many links are ok per page? E.g: I have a page with content and on the right the feeds links will display... I was thinking of putting 9 links per page(3 each from 3 diff sites)...or is that too much? Thanks, Mag __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Post like Get
Dennis Gearon wrote: With get varaibles, it's possible to always have get variables on a page, even without a form, by simply appending the Get variables to the end of the URL. Is there anyway to do the same with Post variables? For instance, a javascript that onUnload submit, or something? You can't just include POST variables in a link, if that's what you're going for. Perhaps some clunky javascript submitting a hidden form on an onclick method would get you close, but why even bother? Maybe you should just say what you're actually trying to achieve and why, then we could offer better alternatives. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good PHP to PDF libary?
Im looking for some good and complete and advanced PHP to PDF libarary. So far, i have seen pdflib and ros pdf class. But i really would like to hear from you guys what is best? my only main goal for this is to create a low - res pdf and a hi - res business card pdf template. Several are listed in this faq: http://www.php.net/manual/en/faq.using.php#faq.using.freepdf Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Post like Get
What I'm trying to achieve is to have the same cookie IDENTIFY a user on different (or same) applications (on the same server), but require them to log in for each application, and get a different session.. Basically, to keep separate 'user trails and in process variables' for different tabs or windows in a browser. www.scotttrade.com does it somehow, and I see no GET variables on the URL. John W. Holmes wrote: Dennis Gearon wrote: With get varaibles, it's possible to always have get variables on a page, even without a form, by simply appending the Get variables to the end of the URL. Is there anyway to do the same with Post variables? For instance, a javascript that onUnload submit, or something? You can't just include POST variables in a link, if that's what you're going for. Perhaps some clunky javascript submitting a hidden form on an onclick method would get you close, but why even bother? Maybe you should just say what you're actually trying to achieve and why, then we could offer better alternatives. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good PHP to PDF libary?
PDF Lib is very COOL , its give you ability to encrypt an existing pdf file its give you a powerful method to import pages from an existing pdf file and do some thing on it , its have only one problem very expensive price for full power . if they only split php version annd change the price for full power and make it less than $ 50 for full power it will be very fair . I will second that. If you can afford it, PDFLib is the way to go. They have an excellent templating system. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Post like Get
Dennis Gearon wrote: What I'm trying to achieve is to have the same cookie IDENTIFY a user on different (or same) applications (on the same server), but require them to log in for each application, and get a different session.. Basically, to keep separate 'user trails and in process variables' for different tabs or windows in a browser. What you need then is PHP session management stuff - it's very unlikely that you will need to tincker with the protocol. PHP session management will take care of everything (except securing the system which you need to do ;-) www.scotttrade.com does it somehow, and I see no GET variables on the URL. John W. Holmes wrote: Dennis Gearon wrote: With get varaibles, it's possible to always have get variables on a page, even without a form, by simply appending the Get variables to the end of the URL. Is there anyway to do the same with Post variables? For instance, a javascript that onUnload submit, or something? You can't just include POST variables in a link, if that's what you're going for. Perhaps some clunky javascript submitting a hidden form on an onclick method would get you close, but why even bother? Maybe you should just say what you're actually trying to achieve and why, then we could offer better alternatives. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Post like Get
Dennis Gearon wrote: What I'm trying to achieve is to have the same cookie IDENTIFY a user on different (or same) applications (on the same server), but require them to log in for each application, and get a different session.. Basically, to keep separate 'user trails and in process variables' for different tabs or windows in a browser. Can't you just set $_SESSION['application_name']['loggedin'] = TRUE for the various applications? If they are accessing application widget, then checking for isset($_SESSION['widget']['loggedin']) will tell you whether they are logged in or not. Or am I missing something? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Post like Get
What I'm trying to achieve is to have the same cookie IDENTIFY a user on different (or same) applications (on the same server), but require them to log in for each application, and get a different session.. Basically, to keep separate 'user trails and in process variables' for different tabs or windows in a browser. www.scotttrade.com does it somehow, and I see no GET variables on the URL. What about $_SESSION variables? You can use the $_SESSION to keep the same identity from page to page and still require a different login when needed. -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using Post like Get
Hi, a cookie is path-specific - can that help you? Frank At 10:54 PM 8/23/2004, you wrote: What I'm trying to achieve is to have the same cookie IDENTIFY a user on different (or same) applications (on the same server), but require them to log in for each application, and get a different session.. Basically, to keep separate 'user trails and in process variables' for different tabs or windows in a browser. www.scotttrade.com does it somehow, and I see no GET variables on the URL. John W. Holmes wrote: Dennis Gearon wrote: With get varaibles, it's possible to always have get variables on a page, even without a form, by simply appending the Get variables to the end of the URL. Is there anyway to do the same with Post variables? For instance, a javascript that onUnload submit, or something? You can't just include POST variables in a link, if that's what you're going for. Perhaps some clunky javascript submitting a hidden form on an onclick method would get you close, but why even bother? Maybe you should just say what you're actually trying to achieve and why, then we could offer better alternatives. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Disk serial number
Rosen wrote: I would like to create it as module for PHP like function - like gethdserial() - and function to retrieve me serial number of HDD. I know how to retrieve serial number in C, Delphi. I assume you want to do it the hard way to learn about programming modules...? As others have said, try the PECL site (http://pecl.php.net). Look on the 'Documentation' page. Click on the 'Developing custom PHP extendsions'. Check out the other links on the page as well; there appear to be quite a few of them. Also, Google will help. So will the mailing list archives, and also, just read through some of the existing modules. Torben Lars Torben Wilson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rosen wrote: I can write it to another language ( like C, Delphi ) but I don't know how to integrate this with PHP - i.e. to create it as module for PHP. I would suggest going the simple route for now, then if you need it (for performance or whatever) later on, write it up as a module then. Write a simple little program in whatever language you like which can fetch the id and print it to standard output. Compile it and test it. Then in your PHP script, just call that program (using exec(), system(), backticks, whatever works best for your situation) and read its output. Later on, decide whether you need to write a whole module for this task. Seems like it would be overkill to me. Cheers, Torben [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error parsing php.ini
Hi folks. I've written a CMS which uses a cron job to execute a script that pushes/pulls content from our website. It's been working very well, and still is, but this morning I found this in the CMS error log: PHP: Error parsing /u0/local/apache2/conf/php/php.ini on line 102 Has anyone encountered this type of error before? I've googled it but have been unable to find any useful information. If anyone has any advice I'd greatly appreciate it. Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Quickbooks
Has anyone had success accessing Quickbooks from PHP? Sorry for asking this a second time. The first time didn't generate any response and my email server hiccuped shortly after I made the post, so I likely missed any responses sent directly to me. -Ed
[PHP] HTML Escaping
I've got a conditional button that needs to appear/hide on my page depending upon the contents of a field in my database. The button is an image and has a long URL and JavaScript for image rotation attached to it. Needless to say, the href is quite long and includes several ' characters. My conditional works great but I want to know if there is an easy way to escape the whole href so that the ' characters will not be seen as PHP quote marks. See below... ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a; ? Thanx in advance, Robb -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best practice to re-write a tutorial website
On Fri, 23 Jul 2004 17:51:52 +0300, EE [EMAIL PROTECTED] wrote: On Fri, 2004-07-23 at 00:06, Justin Patrin wrote: On Thu, 22 Jul 2004 23:48:54 +0300, EE [EMAIL PROTECTED] wrote: Dears, I am planing to rewrite my website. My site is tutorial-type site I wrote it, when I first learned php3, as an undergraduate research class. I think the code is sloppy as it is mixed with the HTML. I would like to rewrite the site utilizing the good things such OOP classes, template, etc. I would also like to separate my styles (CSS) from the HTML. Do you recommend any any tutorial? I would like to have the following functions: 1. Printer Friendly Version Capability You can use CSS and @media print to have *different* CSS for printing, right from the same site. You could also just have a different stylesheet that you include when the user wants to print. Or you could have multiple templates. Whatever floats your boat. 2. Search-ability A CMS could possibly handle this, but may be a bit big for this. If you want search capabilities, I'd look into a local solution that indexes your site manually. I've had good luck with mnogosearch. How about using MySQL fulltext? 3. Search Engine Friendly https://www.reversefold.com/tikiwiki/tiki-index.php?page=PHPFAQs#id926344 I read the aritcle and it is good. Therefore, I have the following questions: 1. What is the best way to store the tutorials. Should they be in a database or each in a separate HTML file. I'd go for database. But if you do that, you may want to look into some existing CMS software. Do you recommend any? I'll appreciate if you point me to the right track. Wellthere's tikiwiki, which I'm using on my personal site right now. It's real quick to get up and use. Then there's TYPO3, which I'm using for work. It's very large and complex, but a very nice system. 2. How to implement the above three points? I know it is a broad question but you can help me on whatever you know? -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Quickbooks
Hello, On 07/23/2004 03:00 PM, Ed Lazor wrote: Has anyone had success accessing Quickbooks from PHP? Class: rds http://www.phpclasses.org/qbrds You may want to try this class that integrates with Quickbooks Remote Data Services API. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML Escaping
Needless to say, the href is quite long and includes several ' characters. My conditional works great but I want to know if there is an easy way to escape the whole href so that the ' characters will not be seen as PHP quote marks. See below... urlencode will escape the quotes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML Escaping
Took me a little while to figure out what you were asking. You can do something like this for easy readability. ?php if ($recordset['field'] != 1) { ? a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a ?php } other php code ? You can close out your php declaration at any time and just put in regular text. It's a lot easier doing it this way than echo'ing many lines and you don't have to worry about escaping quotes. On Jul 23, 2004, at 2:07 PM, Robb Kerr wrote: I've got a conditional button that needs to appear/hide on my page depending upon the contents of a field in my database. The button is an image and has a long URL and JavaScript for image rotation attached to it. Needless to say, the href is quite long and includes several ' characters. My conditional works great but I want to know if there is an easy way to escape the whole href so that the ' characters will not be seen as PHP quote marks. See below... ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a; ? Thanx in advance, Robb -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Error parsing php.ini
Jason Davidson wrote: whats on line 102 of the php.ini file ??? Jason On Fri, 23 Jul 2004 10:27:29 -0700, Pablo Gosse [EMAIL PROTECTED] wrote: Hi folks. I've written a CMS which uses a cron job to execute a script that pushes/pulls content from our website. It's been working very well, and still is, but this morning I found this in the CMS error log: PHP: Error parsing /u0/local/apache2/conf/php/php.ini on line 102 Has anyone encountered this type of error before? I've googled it but have been unable to find any useful information. If anyone has any advice I'd greatly appreciate it. Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Sorry, that might've helped ;o) That's the strange part. Lines 102 is the following: ; So only set this entry, if you really want to implement such a So it's a comment and should not be parsed. Any ideas? Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML Escaping
Robb Kerr wrote: I've got a conditional button that needs to appear/hide on my page depending upon the contents of a field in my database. The button is an image and has a long URL and JavaScript for image rotation attached to it. Needless to say, the href is quite long and includes several ' characters. My conditional works great but I want to know if there is an easy way to escape the whole href so that the ' characters will not be seen as PHP quote marks. See below... ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a; ? It looks like you're trying to echo a string that's delimited by single quote marks, but I don't see a single quote at the end of the string. Assuming this is what you want, though, to escape single quotes within the string you're trying to echo, put a backslash \ character before them. ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'PreviousPage\',\'\',\'/URL/ButtonName.gif\',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a'; ? Alternatively, you can just use double quotes in your JavaScript MM_swapImage() function... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML Escaping
On Fri, 23 Jul 2004 14:43:29 -0400, John W. Holmes wrote: Robb Kerr wrote: I've got a conditional button that needs to appear/hide on my page depending upon the contents of a field in my database. The button is an image and has a long URL and JavaScript for image rotation attached to it. Needless to say, the href is quite long and includes several ' characters. My conditional works great but I want to know if there is an easy way to escape the whole href so that the ' characters will not be seen as PHP quote marks. See below... ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a; ? It looks like you're trying to echo a string that's delimited by single quote marks, but I don't see a single quote at the end of the string. Assuming this is what you want, though, to escape single quotes within the string you're trying to echo, put a backslash \ character before them. ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage(\'PreviousPage\',\'\',\'/URL/ButtonName.gif\',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a'; ? Alternatively, you can just use double quotes in your JavaScript MM_swapImage() function... Thanx. That's the escape character I needed. But, I've choosen to use the style Brent suggested above. It'll be easier than remembering to escape every single quote character. -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML Escaping
On Fri, 23 Jul 2004 14:23:27 -0400, Brent Baisley wrote: Took me a little while to figure out what you were asking. You can do something like this for easy readability. ?php if ($recordset['field'] != 1) { ? a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a ?php } other php code ? You can close out your php declaration at any time and just put in regular text. It's a lot easier doing it this way than echo'ing many lines and you don't have to worry about escaping quotes. On Jul 23, 2004, at 2:07 PM, Robb Kerr wrote: I've got a conditional button that needs to appear/hide on my page depending upon the contents of a field in my database. The button is an image and has a long URL and JavaScript for image rotation attached to it. Needless to say, the href is quite long and includes several ' characters. My conditional works great but I want to know if there is an easy way to escape the whole href so that the ' characters will not be seen as PHP quote marks. See below... ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a; ? Thanx in advance, Robb -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Thanx. That works great. And, it's easy to read and update without having to remember to escape everything. -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Include path
Hello, I am a bit confused :-(, this is my server path: /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ After searching on google I tried using: $_SERVER[PATH_TRANSLATED]; but I think I am using it wrong coz its not working.. Please help. Thanks, Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
[snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ [/snip] in /home/sites/site80/web/articles/myfile.php place the following line include /home/sites/site80/web/templates/header.php; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path
PHP Gen wrote: Hello, I am a bit confused :-(, this is my server path: /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ include('/home/sites/site80/web/templates/header.php'); Are you looking for a relative path or wondering why include('header.php') doesn't work, or what? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
--- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ [/snip] in /home/sites/site80/web/articles/myfile.php place the following line include /home/sites/site80/web/templates/header.php; :-) Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path
Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. if you dont know what directory it will be in, how can you include it? Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
Have you tried; Include ../templates/header.php; Warren Vail -Original Message- From: PHP Gen [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 12:28 PM To: Jay Blanchard; php php Subject: RE: [PHP] Include path --- Jay Blanchard [EMAIL PROTECTED] wrote: [snip] /home/sites/site80/web/articles/myfile.php from myfile.php I want to include header.php which is located in: /home/sites/site80/web/templates/ /* eg: /home/sites/site80/web/articles/myfile.php /home/sites/site80/web/templates/header.php */ [/snip] in /home/sites/site80/web/articles/myfile.php place the following line include /home/sites/site80/web/templates/header.php; :-) Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Include path
$baseDir = $_SERVER[DOCUMENT_ROOT]; $templatesDir = $baseDir . /templates/; include($templatesDir . header.php); include($templatesDir . body.php); include($templatesDir . footer.php); :-) Good solution, but the problem is once the program is completed it goes out of my hands and most prolly the client wont know the exact paths, the templates folder would *always* be one below...but the path before the /templates will change. Anyway, heres what I have come up with, comments are welcome: $pieces = explode(/, $_SERVER[PATH_TRANSLATED]); $a=count($pieces); $f=; for($i=1; $i $a-2; $i++) {$f=$f.$pieces[$i]./;} $include_path= /.$f; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path
Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; sorry, I meant include($_SERVER['DOCUMENT_ROOT'].'/templates/header.php'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quickbooks
I haven't tried, but supposedly if you get the QDBC driver, it will work just as an ODBC database. --- Ed Lazor [EMAIL PROTECTED] wrote: Has anyone had success accessing Quickbooks from PHP? Sorry for asking this a second time. The first time didn't generate any response and my email server hiccuped shortly after I made the post, so I likely missed any responses sent directly to me. -Ed = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include path (SOLVED)
Hey everyone, ** Have you tried $_SERVER['DOCUMENT_ROOT'].'/'; ** Matt, DAMN! THATS what I was looking for. No, didnt try that, took the long route home instead, but atleast brushed up on php's explode function. ** $baseDir = $_SERVER[DOCUMENT_ROOT]; $templatesDir = $baseDir . /templates/; include($templatesDir . header.php); include($templatesDir . body.php); include($templatesDir . footer.php); ** Ed, perfect. ** Have you tried; Include ../templates/header.php; ** Warren, yep, tried that and also ../../templates/header.php; and more, it was going to the root (/home/sites/ etc) Thanks, everyone. Cheers, -Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Error parsing php.ini
snip Jason Davidson wrote: Can you show whats on either side of that too please /snip The following are lines 91 - 112 ; You can redirect all of the output of your scripts to a function. For ; example, if you set output_handler to ob_gzhandler, output will be ; transparently compressed for browsers that support gzip or deflate encoding. ; Setting an output handler automatically turns on output buffering. output_handler = ; The unserialize callback function will called (with the undefind class' ; name as parameter), if the unserializer finds an undefined class ; which should be instanciated. ; A warning appears if the specified function is not defined, or if the ; function doesn't include/implement the missing class. ; So only set this entry, if you really want to implement such a ; callback-function. unserialize_callback_func= ; Transparent output compression using the zlib library ; Valid values for this option are 'off', 'on', or a specific buffer size ; to be used for compression (default is 4KB) ; ; Note: output_handler must be empty if this is set 'On' ; zlib.output_compression = Off Line 102 is the line which begins with ; So only set this entry,... The CMS has been working fine all morning. The error occurred at 9:18 last night, so I'm guessing it might not be that serious since it ran fine every minute after the error occurred, but it's very strange that this happened just this once. Any ideas? Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] INSERT INTO using foreach
Hi All, I have a form with several values to insert. I thought that I remember a thread that discussed using a loop to insert $_POSTed values. I am trying; foreach($_POST as $key = $value){ if($key == 'Submit'){ exit; } else{ $sql = INSERT INTO registration ('$key') VALUES ('$value'); $result = mssql_query($sql); } } I keep getting an invalid object 'registration' error. However registration is the name of the table. I'm guessing it's someplace else in the statement that I'm messing up on. alex hogan * The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. *
[PHP] Array help
I've got a field in my database that contains a single numerical character (1 or 2 or 3, etc.). I need to load a different background image in one cell of a table depending upon what the number the field contains. What's the easy syntax for associating entries in the field (1 or 2 or 3, etc.) with image filenames (bkgrnd-default.gif or bkgrnd-positive.gif or bkgrnd-negative.gif, etc.) Thanx, Robb -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] INSERT INTO using foreach
foreach($_POST as $key = $value){ if($key == 'Submit'){ exit; } else{ $sql = INSERT INTO registration ('$key') VALUES ('$value'); $result = mssql_query($sql); } } not sure if wrapping columns names in single quotes is valid mssql, try: $sql = INSERT INTO registration ($key) VALUES ('$value'); you should also look read up on sql injection attacks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Error parsing php.ini
snip Jason Davidson wrote: Oh, it was a one time error, strange, youve never had this error before, and this definately is the php.ini file your using, ie, there isnt another somewhere thats getting used? /snip Quothe the terminal: [EMAIL PROTECTED] html]$ find / -type f -name php.ini 2/dev/null /u0/local/apache2/conf/php/php.ini Yup. That's the only php.ini. This is the only time it happened, and it was the only error in the log. Any other ideas? Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] INSERT INTO using foreach
It may be a matter of opinion, but i beleive this is a poor method of doing what your doing. I would get my values thru $_REQUEST and use addslashes to escape what needs to be escaped, and i would write my SQL query with full column listing and string values in quotes. eg.. INSERT INTO table (column, column, column) VALUES ('$string', '$string') etc the loop method sort of obfusicates the code, making it hard to read, especially if you didnt write the form. My 2 cents, for whatever its worth. Good luck however :) Jason On Fri, 23 Jul 2004 15:46:27 -0500, Alex Hogan [EMAIL PROTECTED] wrote: Hi All, I have a form with several values to insert. I thought that I remember a thread that discussed using a loop to insert $_POSTed values. I am trying; foreach($_POST as $key = $value){ if($key == 'Submit'){ exit; } else{ $sql = INSERT INTO registration ('$key') VALUES ('$value'); $result = mssql_query($sql); } } I keep getting an invalid object 'registration' error. However registration is the name of the table. I'm guessing it's someplace else in the statement that I'm messing up on. alex hogan * The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array help
I've got a field in my database that contains a single numerical character (1 or 2 or 3, etc.). I need to load a different background image in one cell of a table depending upon what the number the field contains. What's the easy syntax for associating entries in the field (1 or 2 or 3, etc.) with image filenames (bkgrnd-default.gif or bkgrnd-positive.gif or bkgrnd-negative.gif, etc.) $images[1] = 'bkgrnd-default.gif'; $images[2] = 'bkgrnd-positive.gif'; $images[3] = 'bkgrnd-negative.gif'; do you query, get the result in a variable, I'll use $field img src=?php echo $images[$field];? / you could do some error checking to make sure the value in $field exists in the $images array -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array help
You can either hard code the associations, with something like a swtich statement, or i suppose loop thru one array, adding a key value pair of the numbers = background images. Or, you could create a table called Backgrounds, give them an id which you store in the existing field of your db, and use a table join to query the background name out . Does this help any? Jason On Fri, 23 Jul 2004 16:02:06 -0500, Robb Kerr [EMAIL PROTECTED] wrote: I've got a field in my database that contains a single numerical character (1 or 2 or 3, etc.). I need to load a different background image in one cell of a table depending upon what the number the field contains. What's the easy syntax for associating entries in the field (1 or 2 or 3, etc.) with image filenames (bkgrnd-default.gif or bkgrnd-positive.gif or bkgrnd-negative.gif, etc.) Thanx, Robb -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array help
I've got a field in my database that contains a single numerical character (1 or 2 or 3, etc.). I need to load a different background image in one cell of a table depending upon what the number the field contains. What's the easy syntax for associating entries in the field (1 or 2 or 3, etc.) with image filenames (bkgrnd-default.gif or bkgrnd-positive.gif or bkgrnd-negative.gif, etc.) Thanx, Robb You mean like: imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); http://us2.php.net/manual/en/function.array.php -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error parsing php.ini
Im beat, unless there is any more information that could possibly clue me in, im lost. A one time error on a section of file that is commented out i dont understand. im sorry :( .. some hardware glich or something maybe??? ... i dunno. haha Jason On Fri, 23 Jul 2004 14:10:09 -0700, Pablo Gosse [EMAIL PROTECTED] wrote: snip Jason Davidson wrote: Oh, it was a one time error, strange, youve never had this error before, and this definately is the php.ini file your using, ie, there isnt another somewhere thats getting used? /snip Quothe the terminal: [EMAIL PROTECTED] html]$ find / -type f -name php.ini 2/dev/null /u0/local/apache2/conf/php/php.ini Yup. That's the only php.ini. This is the only time it happened, and it was the only error in the log. Any other ideas? Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] classes being extended
Can someone ask the internals list this question, since I can't seem to subscribe right now, (or answer the question) If a class is a base class, does each child make it's own copy of: the whole base class the class variables only something else? So if I have a bunch of objects in a page inheriting from a common class, am I really saving any: memory loading time dereferencing time execution time? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] JavaScript in PHP or PHP in JavaScript
Let me preface this by saying that I don't know JavaScript. I've got a page that is built by a long complicated JavaScript that I was able to hack just enough to function the way I wanted. There are some lines of code -- those that define div positioning -- that need to be different depending upon what it obtained from my database. I could build a simple PHP if/then statement and embed the entire JavaScript with the lines changed. Or, I could build a simple PHP if/then statement with only the lines of JavaScript that need to be changed and embed it within the JavaScript. which would be better? JavaScript in PHP ?php if (conditional) { ? several lines of JavaScript ?php } ? PHP in JavaScript script language=JavaScript several lines of JavaScript ?php if (conditional) { echo 'lines of JavaScript'; } else { echo 'other lines of JavaScript'; } ? several lines of JavaScript /script Thanx, Robb -- Robb Kerr Digital IGUANA Helping Digital Artists Achieve their Dreams http://www.digitaliguana.com http://www.cancerreallysucks.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array help
On Fri, 23 Jul 2004 14:21:42 -0700 (PDT), Matthew Sims wrote: imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); You got it... imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); imgNeeded = table['field']; imgName = ??? Now, how do I get the image name associated with the key number obtained from my table out of the array and into the variable so that I can use it later in the HTML? Thanx, Robb -- Robb Kerr Digital IGUANA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array help
Robb Kerr wrote: On Fri, 23 Jul 2004 14:21:42 -0700 (PDT), Matthew Sims wrote: imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); You got it... imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); imgNeeded = table['field']; imgName = ??? Now, how do I get the image name associated with the key number obtained from my table out of the array and into the variable so that I can use it later in the HTML? Thanx, Robb -- Robb Kerr Digital IGUANA $imgBkgrnd[i] where 'i' is the number returned from your DB. HTH. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array help
imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); You got it... imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); imgNeeded = table['field']; imgName = ??? http://us3.php.net/array $imgBkgrnd = array(1= bkgrnd-default.gif, 2 = bkgrnd-positive.gif, 3 = bkgrnd-negative.gif); $imgNeeded = table['field']; $imgName = $imgBkgrnd[$imgNeeded]; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Trouble with Apache, PHP, pear
At 03:25 AM 7/23/2004, you wrote: Sounds like you've done everything correctly, just PHP wasn't installed as a CLI. Just to be sure, do a $ find / -name php Is it ok to have PHP installed as both CLI and as a module? Then, if it is found, $ lynx -source http://go-pear.org/ | /path/to/php If it's not found, just grap a PHP rpm (make sure it's a CLI version, or --with-cli) and install that. Hope that's helpful, Aidan Thanks for the help, -- Ron Ron King [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL ... ...snip... things started to be not OK after all. phpinfo() told me that the 'Configure Command' had both the following in it: --with-pear=/usr/share/pear --without-pear So I tried to install pear manually, and when I tried the command: ...snip... Here's my question: Should I just uninstall Apache and reinstall it, then install php and pear? Should I compile Apache myself? If I do that, I'm not sure of all the configuration options I should choose. Or should I just install the new rpms that I think I want, and rpmdrake will make everything work nicely together? Sorry if this is too Mandrake-centric, but I'd like to use RPMs if possible, I'm hoping that makes it easier to upgrade in the future. Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trouble with Apache, PHP, pear
At 06:28 AM 7/23/2004, you wrote: You need php-cli rpm, it's not an extension, it's command line binary. And it won't hurt anything to have both cli and extension installed? -- Ron Ron King wrote: When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL worked, and when I tried the phpinfo() function, I got a page that looked OK. I could create simple php pages and serve them up. Then I tried to install pear, and things started to be not OK after all. phpinfo() told me that the 'Configure Command' had both the following in it: --with-pear=/usr/share/pear --without-pear So I tried to install pear manually, and when I tried the command: $ lynx -source http://go-pear.org/ | php I got the following response: bash: php: command not found I went looking for the executable so I could run it from that directory, and I couldn't find it anywhere. I apparently have the following rpms installed: apache2-2.0.48-6.3.100mdk apache2-common-2.0.48-6.3.100mdk apache2-manual-2.0.48-6.3.100mdk apache2-mod_cache-2.0.48-6.3.100mdk apache2-mod_disk_cache-2.0.48-6.3.100mdk apache2-mod_perl-2.0.48_1.99_11-3mdk apache2-mod_php-2.0.48_4.3.4-1mdk apache2-mod_proxy-2.0.48-6.3.100mdk apache2-mod_ssl-2.0.48-6.3.100mdk apache2-mod_suexec-2.0.48-1mdk apache2-modules-2.0.48-6.3.100mdk apache-conf-2.0.48-2mdk Also the following php-related rpms: libphp_common432-4.3.4-4.1.100mdk php-imap-4.3.4-1mdk php-ini-4.3.4-1mdk php-mysql-4.3.4-1mdk php-xml-4.3.4-1mdk php-xmlrpc-4.3.4-1mdk When I use rpmdrake to search for other packages to install, I see the following choices: mod_php-4.3.4-1mdk php432-devel-4.3.4-4.1.100mdk php432-devel-4.3.4-4mdk php-calendar-4.3.4-1mdk php-cgi-4.3.4-4.1.100mdk php-cgi-4.3.4-4mdk php-dbg-4.3.4_2.11.5-1mdk php-manual-en-4.3.4-1mdk phpMyAdmin-2.5.4-1mdk php-pear-4.3.4-3mdk php-pear-Date-1.4-4mdk php-pear-HTML_Common-1.2.1-3mdk php-pear-HTML_Select-1.2-3mdk There are a bunch of other php modules available, but I don't think I need them right away. Here's my question: Should I just uninstall Apache and reinstall it, then install php and pear? Should I compile Apache myself? If I do that, I'm not sure of all the configuration options I should choose. Or should I just install the new rpms that I think I want, and rpmdrake will make everything work nicely together? Sorry if this is too Mandrake-centric, but I'd like to use RPMs if possible, I'm hoping that makes it easier to upgrade in the future. Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [newbie] Trouble with Apache, PHP, pear
At 01:35 AM 7/23/2004, you wrote: I don't know about mdk10, but I have pear and php running fine on mdk9.2. I don't recall having to add anything to the *.conf files to do it either. If you are going to try piping output to php from the command line, perhaps you should install php-cgi first. I didn't know if it was OK to have both the cli and the module/extension installed at the same time. The references I have seen make it seem like you need to choose one or the other. regards Franki Thanks, -- Ron Ron King wrote: Hi all, When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL installed correctly. I could serve web pages, MySQL worked, and when I tried the phpinfo() function, I got a page that looked OK. I could create simple php pages and serve them up. Then I tried to install pear, and things started to be not OK after all. phpinfo() told me that the 'Configure Command' had both the following in it: --with-pear=/usr/share/pear --without-pear So I tried to install pear manually, and when I tried the command: $ lynx -source http://go-pear.org/ | php I got the following response: bash: php: command not found I went looking for the executable so I could run it from that directory, and I couldn't find it anywhere. I apparently have the following rpms installed: apache2-2.0.48-6.3.100mdk apache2-common-2.0.48-6.3.100mdk apache2-manual-2.0.48-6.3.100mdk apache2-mod_cache-2.0.48-6.3.100mdk apache2-mod_disk_cache-2.0.48-6.3.100mdk apache2-mod_perl-2.0.48_1.99_11-3mdk apache2-mod_php-2.0.48_4.3.4-1mdk apache2-mod_proxy-2.0.48-6.3.100mdk apache2-mod_ssl-2.0.48-6.3.100mdk apache2-mod_suexec-2.0.48-1mdk apache2-modules-2.0.48-6.3.100mdk apache-conf-2.0.48-2mdk Also the following php-related rpms: libphp_common432-4.3.4-4.1.100mdk php-imap-4.3.4-1mdk php-ini-4.3.4-1mdk php-mysql-4.3.4-1mdk php-xml-4.3.4-1mdk php-xmlrpc-4.3.4-1mdk When I use rpmdrake to search for other packages to install, I see the following choices: mod_php-4.3.4-1mdk php432-devel-4.3.4-4.1.100mdk php432-devel-4.3.4-4mdk php-calendar-4.3.4-1mdk php-cgi-4.3.4-4.1.100mdk php-cgi-4.3.4-4mdk php-dbg-4.3.4_2.11.5-1mdk php-manual-en-4.3.4-1mdk phpMyAdmin-2.5.4-1mdk php-pear-4.3.4-3mdk php-pear-Date-1.4-4mdk php-pear-HTML_Common-1.2.1-3mdk php-pear-HTML_Select-1.2-3mdk There are a bunch of other php modules available, but I don't think I need them right away. Here's my question: Should I just uninstall Apache and reinstall it, then install php and pear? Should I compile Apache myself? If I do that, I'm not sure of all the configuration options I should choose. Or should I just install the new rpms that I think I want, and rpmdrake will make everything work nicely together? Sorry if this is too Mandrake-centric, but I'd like to use RPMs if possible, I'm hoping that makes it easier to upgrade in the future. Thanks, Ron -- rgds Frank Hauptle (aka Franki) For free scripts, online webmaster tools, HTML, XHTML, Perl PHP tutorials and stuff, visit: http://htmlfixit.com Free web developer resources. Please sign our petition to encourage notebook manufacturers to offer video card upgrades just like desktops. http://www.petitiononline.com/inspiron/petition.html Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com Join the Club : http://www.mandrakeclub.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] good PHP to PDF libary?
So far, i have seen pdflib and ros pdf class. But i really would like to hear from you guys what is best? I use the ros pdf class. It works great. Cheers Paul my only main goal for this is to create a low - res pdf and a hi - res business card pdf template. [/snip] http://www.fpdf.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTML Escaping
Look up heredoc in te php manual Robb Kerr wrote: I've got a conditional button that needs to appear/hide on my page depending upon the contents of a field in my database. The button is an image and has a long URL and JavaScript for image rotation attached to it. Needless to say, the href is quite long and includes several ' characters. My conditional works great but I want to know if there is an easy way to escape the whole href so that the ' characters will not be seen as PHP quote marks. See below... ?php if ($recordset['field'] != 1) { echo 'a href=# onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('PreviousPage','','/URL/ButtonName.gif',1)img src=/URL/ButtonName.gif alt=Previous Page name=Previous Page width=150 height=20 border=0/a; ? Thanx in advance, Robb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php