[PHP] CMS identification
Hi, i have a customer who need to update his website but he was not able to tell me more about it. he just told me it's a CMS and sent me a screenshot. To understand what is it i need first to test it on my local server but i don't know what is it as CMS. could you help me ? i attached to my post this screenshot -- Alain --- Windows 7 x64 / Fedora 14 x64 PostgreSQL 8.3.5 / MySQL 5 Apache 2.2.16 PHP 5.3.1 C# 2005-2008 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CMS identification
ok so here it is: http://i220.photobucket.com/albums/dd277/alainroger/cms-login.png On Sun, Mar 18, 2012 at 11:25 PM, Stuart Dallas stu...@3ft9.com wrote: On 18 Mar 2012, at 22:20, Alain Roger wrote: i have a customer who need to update his website but he was not able to tell me more about it. he just told me it's a CMS and sent me a screenshot. To understand what is it i need first to test it on my local server but i don't know what is it as CMS. could you help me ? i attached to my post this screenshot Attachments get stripped by the list server. Stick it on an image hosting service and send us the url instead. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- Alain --- Windows 7 x64 / Fedora 14 x64 PostgreSQL 8.3.5 / MySQL 5 Apache 2.2.16 PHP 5.3.1 C# 2005-2008
[PHP] improve speed of PHP answers
Hi, i have apache/PHP server installed on Windows 7. my computer is a quad-core CPU with 6 GB RAM and i would like to speed up PHP answer to requests. how can i do that ? which parameter should i tune ? thx. -- Alain --- Windows 7 x64 / Fedora 14 x64 PostgreSQL 8.3.5 / MySQL 5 Apache 2.2.16 PHP 5.3.1 C# 2005-2008
Fwd: [PHP] improve speed of PHP answers
-- Forwarded message -- From: Alain Roger raf.n...@gmail.com Date: Wed, Feb 9, 2011 at 6:45 PM Subject: Re: [PHP] improve speed of PHP answers To: ad...@antonakis.co.uk yes i understand however even Linux has bugs and issues... i'm currently installing Fedora 14 as web server and joomla has big issues on fedora 14 with right permissions and writable configuration.php file... everybody raises issue about that and till now none of their solution worked... :-( basically web page needs between 1 to 2 s to load, but as it is a testing computer it is not a huge problem... main problem is that component for joomla as akeeba backup fails to backup web site while under Windows XP it worked perfectly... A. On Wed, Feb 9, 2011 at 6:41 PM, Alexis Antonakis ad...@antonakis.co.ukwrote: The Operating System :) It could be a million and one things...how long does it currently take to load a page and what is that page trying to do? Alexis On 09/02/11 10:36, Alain Roger wrote: Hi, i have apache/PHP server installed on Windows 7. my computer is a quad-core CPU with 6 GB RAM and i would like to speed up PHP answer to requests. how can i do that ? which parameter should i tune ? thx. -- Alain --- Windows 7 x64 / Fedora 14 x64 PostgreSQL 8.3.5 / MySQL 5 Apache 2.2.16 PHP 5.3.1 C# 2005-2008 -- Alain --- Windows 7 x64 / Fedora 14 x64 PostgreSQL 8.3.5 / MySQL 5 Apache 2.2.16 PHP 5.3.1 C# 2005-2008
Re: [PHP] improve speed of PHP answers
it's a php component for joomla so it is written in PHP. it access to DB as also the whole site root structure to backup database structure , data as also web site folders and files. due to slow freeing ressources (php pointers, memory, andso on...) the backup process fails each time... A. On Wed, Feb 9, 2011 at 6:47 PM, Alexis Antonakis ad...@antonakis.co.ukwrote: But what is the webpage trying to do? Is it straight html? Are you accessing data from a database? What exactly? On 09/02/11 10:45, Alain Roger wrote: yes i understand however even Linux has bugs and issues... i'm currently installing Fedora 14 as web server and joomla has big issues on fedora 14 with right permissions and writable configuration.php file... everybody raises issue about that and till now none of their solution worked... :-( basically web page needs between 1 to 2 s to load, but as it is a testing computer it is not a huge problem... main problem is that component for joomla as akeeba backup fails to backup web site while under Windows XP it worked perfectly... A. On Wed, Feb 9, 2011 at 6:41 PM, Alexis Antonakisad...@antonakis.co.uk wrote: The Operating System :) It could be a million and one things...how long does it currently take to load a page and what is that page trying to do? Alexis On 09/02/11 10:36, Alain Roger wrote: Hi, i have apache/PHP server installed on Windows 7. my computer is a quad-core CPU with 6 GB RAM and i would like to speed up PHP answer to requests. how can i do that ? which parameter should i tune ? thx. -- Alain --- Windows 7 x64 / Fedora 14 x64 PostgreSQL 8.3.5 / MySQL 5 Apache 2.2.16 PHP 5.3.1 C# 2005-2008
[PHP] CSV file
Hi, i would like to import the content of a CSV file into my database. but in order to show a progress bar to user (to let him know that process is still working on) i would like to determine before to start, how many records / lines are in the CSV file. is there a way to do that ? thanks a lot. -- Alain --- Windows XP x64 SP2 / Fedora 10 KDE 4.2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
[PHP] best solution to ecommerce web pages
Hi, i'm currently investigating what would be the best solution to develop an e-commerce web site. should i use some PHP template engine like smarty or CMS like Joomla, Drupal ? thanks a lot, -- Alain --- Windows XP x64 SP2 / Fedora 10 KDE 4.2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
[PHP] table mixing PHP, javascript, ajax and CSS
Hi, i'm currently working on some project which needs in several pages, a table to display query results...till now nothing special. however, in order to not create several time the table and features i've decided to create my own templates including PHP classes, CSS and javascript. this table class should have filter, colors schemes, multi selection and header/paging header. I would like to know what are your suggestions, recommendations or tips to have something easy to deploy and upgrade ? i was thinking to have a common (framework) base : a simple html file having 3 divs, each div receiving a particular php file (header, pagin, or the table itself) header, paging or table PHP files could be located in some folder being different for each template... main changes in templates are usually for the table it self (in terms of columns amount, of presented data record,...) basically my structure is the following one: /folder_to_include_by_user_in_his_development_environment /templates /template1 pager.php table.php /template2 pager.php table.php header.php frame.php /class table_class.php helping_classes.php ... /js_and_ajax function.js the user will have only to run a js function which will include the frame.php file into his own webpage with the template given as parameter. thx for any suggestion. -- Alain --- Windows XP x64 SP2 / Fedora 10 KDE 4.2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
[PHP] retrieve result of a query
Hi, basically i have a php file with several parameter received in GET or POST. this PHP page execute a db query and should return a specific amount of records and columns. however i do not want to display those records like that... i have a web page with javascript and the javascript should read those records/quesry result and display them. how can javascript read those result ? i do not want php file to create a temporary file on server, i would like to read those data on fly. so how can i do that ? i mean how or what should i do from php side ? thx. -- Alain --- Windows XP x64 SP2 / Fedora 10 KDE 4.2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
[PHP] filter function vs regular expression
Hi, i'm reading a book about PHP and i was wondering why regular expressions are so often used to check format of variables or emails while the function filter exists since version 5.2. What are the plus of regular expression while checking variable format ? thx. -- Alain --- Windows XP x64 SP2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
[PHP] PHP attaching css and JS files to current page
Hi, is there a way how a PHP class can attach JS (javascript) and CSS documents to current web page in which the class is instanced ? till now i used an echo which write a script/script code into current document. in this javascript, i used to have a createElement function to attache C\other CSS or JS file. it's not so clean and maybe a better possibility exists. Thanks to let me know. -- Alain --- Windows XP x64 SP2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
Re: [PHP] PHP attaching css and JS files to current page
In fact my class has for purpose to be used in several projects and therefore, to write the css/js files from the web page using the class would be a mistake in the way that could not be redistributed without missing those files. On Sun, Nov 30, 2008 at 2:55 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sun, 2008-11-30 at 14:23 +0100, Alain Roger wrote: Hi, is there a way how a PHP class can attach JS (javascript) and CSS documents to current web page in which the class is instanced ? till now i used an echo which write a script/script code into current document. in this javascript, i used to have a createElement function to attache C\other CSS or JS file. it's not so clean and maybe a better possibility exists. Thanks to let me know. Can you not just write all of the CSS/Javascript that you need right from the get-go in the same place you're writing out your Javascript now? Ash www.ashleysheridan.co.uk -- Alain --- Windows XP x64 SP2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
Re: [PHP] PHP attaching css and JS files to current page
Can you not just write all of the CSS/Javascript that you need right from the get-go in the same place you're writing out your Javascript now? I'm not sure I follow you then. You say you want your class to be able to include those files, then you say that you don't want to. Have you considered having PHP check for the existence of the files you're trying to include before outputting the HTML that includes them? Also, if you are outputting Javascript code that then uses a createElement to include more code, how does the Javascript know it can include the files if they don't exist for every installation? so we for sure misunderstood eachother :-) let's say i have an index.php page in which i create an instance of my class CTable. to do that i need to include the CTable.php file into my index.php (till now no problem) for that : include_once 'Class/CTable.php'; in the CTable.php file i have my class definition and implementation as following: class CTable { blah blah... } my CTable class has a Render function which will write html code into the current index.php page. within this code should be written some javascript command as also some css classnames. till now no problem. the problem is that in this code (that write my class) into index.php there are some javascrip command and css classnames, which are linked to external (in the Class directory) files CTable.js and CTable.css. those 2 files should be loaded by the class CTable itself...and this is what i do using echo and createElement. it works well but it is not clean from my point of view...that's why i was looking for another solution...more... let say professional. A.
Re: [PHP] PHP attaching css and JS files to current page
you're right if you want to write them directly in the index.php. but in my case i want the class to do it by itself. On Sun, Nov 30, 2008 at 3:49 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sun, 2008-11-30 at 15:08 +0100, Alain Roger wrote: Can you not just write all of the CSS/Javascript that you need right from the get-go in the same place you're writing out your Javascript now? I'm not sure I follow you then. You say you want your class to be able to include those files, then you say that you don't want to. Have you considered having PHP check for the existence of the files you're trying to include before outputting the HTML that includes them? Also, if you are outputting Javascript code that then uses a createElement to include more code, how does the Javascript know it can include the files if they don't exist for every installation? so we for sure misunderstood eachother :-) let's say i have an index.php page in which i create an instance of my class CTable. to do that i need to include the CTable.php file into my index.php (till now no problem) for that : include_once 'Class/CTable.php'; in the CTable.php file i have my class definition and implementation as following: class CTable { blah blah... } my CTable class has a Render function which will write html code into the current index.php page. within this code should be written some javascript command as also some css classnames. till now no problem. the problem is that in this code (that write my class) into index.php there are some javascrip command and css classnames, which are linked to external (in the Class directory) files CTable.js and CTable.css. those 2 files should be loaded by the class CTable itself...and this is what i do using echo and createElement. it works well but it is not clean from my point of view...that's why i was looking for another solution...more... let say professional. A. I still don't see the problem then with having some output that looks like this: print EOS script language=javascript type=text/javascript href=CTable.js/script link rel=stylesheet type=text/css href=CTable.css/ EOS; (there should be 4 lines of code there, but line-breaks crept in!) Ash www.ashleysheridan.co.uk -- Alain --- Windows XP x64 SP2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
[PHP] issue with php.ini
Hi, i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i uncomment the following lines: extension=php_mysql.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_sqlite.dll extension=php_dbg.dll-5.2.x after restaring the whole server apache+postgresql + php, i run a simple phpinfo() and i see nowhere anything about postgresql module or PDO. phpinfo show that it runs based on the php.ini from D:\webserver\php folder and not from c:\windows. which is correct as my php.ini is the the D:\webserver\php folder. so where could be the problem ? thx. -- Alain Windows XP x64 SP2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
Re: [PHP] issue with php.ini
Yes, i do it in that way but nothing changed On Sun, Nov 23, 2008 at 6:34 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sun, 2008-11-23 at 17:33 +0100, Alain Roger wrote: Hi, i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i uncomment the following lines: extension=php_mysql.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_sqlite.dll extension=php_dbg.dll-5.2.x after restaring the whole server apache+postgresql + php, i run a simple phpinfo() and i see nowhere anything about postgresql module or PDO. phpinfo show that it runs based on the php.ini from D:\webserver\php folder and not from c:\windows. which is correct as my php.ini is the the D:\webserver\php folder. so where could be the problem ? thx. You didn't mention if you were editing the php.ini file that phpinfo() tells you it is using. Make your changes to that one, and it should be OK. I have this problem a lot with Windows installations for some reason. Ash www.ashleysheridan.co.uk -- Alain --- Windows XP x64 SP2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
Re: [PHP] issue with php.ini
On Sun, Nov 23, 2008 at 6:41 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sun, 2008-11-23 at 18:32 +0100, Alain Roger wrote: Yes, i do it in that way but nothing changed On Sun, Nov 23, 2008 at 6:34 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sun, 2008-11-23 at 17:33 +0100, Alain Roger wrote: Hi, i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i uncomment the following lines: extension=php_mysql.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_sqlite.dll extension=php_dbg.dll-5.2.x after restaring the whole server apache+postgresql + php, i run a simple phpinfo() and i see nowhere anything about postgresql module or PDO. phpinfo show that it runs based on the php.ini from D:\webserver\php folder and not from c:\windows. which is correct as my php.ini is the the D:\webserver\php folder. so where could be the problem ? thx. You didn't mention if you were editing the php.ini file that phpinfo() tells you it is using. Make your changes to that one, and it should be OK. I have this problem a lot with Windows installations for some reason. Ash www.ashleysheridan.co.uk So you've edited the right file, restarted the web server (Apache or IIS) and it's still showing the old configuration. Just a quick question, you're not trying to run PHP on Vista are you, as this has some godawful behaviour on files it deems as system files, and it's an absolute pain to actually try and edit them, even from an admin account! If you are still having troubles and it's not Vista, have you made sure that the libraries (dll files) you are trying to use actually exist? They will usually be in the php directory, or in a sub-folder called extensions. You might need to add the path to the system path to make sure Windows can find them. Ash www.ashleysheridan.co.uk basically as you can see in my signature i run a windows x64 Sp2 system. in fact i've checked and realized that som dll are not installed likeL libpq.dll qnd some others. to solve my problem i had to download and install : NuSphere-phped-5.2-php5.2.6-Win32.exe several dll (5 or 6) are not installed from official msi package :-(
Re: [PHP] issue with php.ini
Well if you check my 2nd email you will see my signature :-) but it does not matter... i did several little changes but i'm scared that only modules link to php.exe at the make command status have been loaded. :-( my changes where about modules loading, extension folder, and so on... -- Alain --- Windows XP x64 SP2 PostgreSQL 8.3.5 / MS SQL server 2005 Apache 2.2.10 PHP 5.2.6 C# 2005-2008
Re: [PHP] issue with php.ini
On Sun, Nov 23, 2008 at 6:57 PM, Nathan Rixham [EMAIL PROTECTED] wrote: i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i extension=php_mysql.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_sqlite.dll extension=php_dbg.dll-5.2.x phpinfo() and i see nowhere anything about postgresql module or PDO. [/snip] I've had the same problems with the msi for 5.2.6 on windows boxes; appears to be the php_pdo_pgsql dll that's causing the error. 2 things to do: - check the apache error log to see exactly what php is saying the problem is (bet it's that php_pdo_dll) - make sure you'd don't have the threads extension enabled. in fact i'm very surprised because the following modules can not be found even if they are on the right folder. PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\webserver\\PHP\\ext\\php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\webserver\\PHP\\ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 any idea ?
Re: [PHP] issue with php.ini
On Sun, Nov 23, 2008 at 7:27 PM, Alain Roger [EMAIL PROTECTED] wrote: On Sun, Nov 23, 2008 at 6:57 PM, Nathan Rixham [EMAIL PROTECTED] wrote: i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i extension=php_mysql.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_sqlite.dll extension=php_dbg.dll-5.2.x phpinfo() and i see nowhere anything about postgresql module or PDO. [/snip] I've had the same problems with the msi for 5.2.6 on windows boxes; appears to be the php_pdo_pgsql dll that's causing the error. 2 things to do: - check the apache error log to see exactly what php is saying the problem is (bet it's that php_pdo_dll) - make sure you'd don't have the threads extension enabled. in fact i'm very surprised because the following modules can not be found even if they are on the right folder. PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\webserver\\PHP\\ext\\php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\webserver\\PHP\\ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 any idea ? it seems that it's a known problem. can someone comment it ? http://www.wampserver.com/phorum/read.php?2,40270,40311
Fwd: [PHP] issue with php.ini
On Sun, Nov 23, 2008 at 6:57 PM, Nathan Rixham [EMAIL PROTECTED] wrote: i've reinstalled PHP 5.2.6 on my windows XP x64 and as usual i extension=php_mysql.dll extension=php_pdo.dll extension=php_pdo_mysql.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_sqlite.dll extension=php_dbg.dll-5.2.x phpinfo() and i see nowhere anything about postgresql module or PDO. [/snip] I've had the same problems with the msi for 5.2.6 on windows boxes; appears to be the php_pdo_pgsql dll that's causing the error. 2 things to do: - check the apache error log to see exactly what php is saying the problem is (bet it's that php_pdo_dll) - make sure you'd don't have the threads extension enabled. in fact i'm very surprised because the following modules can not be found even if they are on the right folder. PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\webserver\\PHP\\ext\\php_pdo_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\webserver\\PHP\\ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 any idea ? it seems that it's a known problem. can someone comment it ? http://www.wampserver.com/phorum/read.php?2,40270,40311 so i've downloaded PHP 5.2.5 winzip package and replace 5.2.6 files by 5.2.5 for the following files: php_pdo_pgsql.dll php_pgsql.dll and it works perfectly. so this is clear that something is wronf with those 2 files in the 5.2.6 version. Alain
Re: [PHP] issue with php.ini
Alain Roger wrote: it seems that it's a known problem. can someone comment it ? http://www.wampserver.com/phorum/read.php?2,40270,40311 you have to install PostgreSQL since enable extension only is not enough makes sence! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Yes it's clear but i already had installed postgresql :-( so problem is really located into files of v5.2.6 of PHP.
Re: [PHP] store class zithin session
Hi Stut, On Thu, Nov 20, 2008 at 12:25 PM, Stut [EMAIL PROTECTED] wrote: On 20 Nov 2008, at 11:01, Alain Roger wrote: i have a class and i would like to store it zithin session. i was thinking to use serialize/unserialize but it does not work. any idea how to do it ? Alain, you've been on this list long enough to know that it does not work is not enough information for people to be able to help you. You're right and i feel sorry. i thought i paste my code just after the sentence. ok, anyway i solved my problem somehow :-) Firstly there is no need to serialise anything going into the session. Secondly I assume you want to store objects not classes. yes. Thirdly there is no reason why it should not work, but there are some caveats you need to be aware of... * The class definition must have been loaded before session_start() is called, otherwise you'll end up with an object of type stdClass rather than your class. this was my mistake...i mean to not call the class file before starting the session :-( A.
[PHP] store class zithin session
Hi, i have a class and i would like to store it zithin session. i was thinking to use serialize/unserialize but it does not work. any idea how to do it ? thx. F.
[PHP] mysql_fetch_object and modulo %
Hi, how can i do to test if the row number (record number) sent by mysql_fetch_object is odd or even ? i mean that: while ($row = mysql_fetch_object($result)) { if($row%2 == 1) { ... } } the $row doesn't return a value... like 1, 2 or 6 for example... thx. F
[PHP] $_POST in header
Hi, i have a PHP page with a form. when user click on submit button, it sends form data to itself (so it sends data $_POST to itself). i would like to access to header itself to reset those $_POST data to avoid (in case of F5 under windows system) to resend the same data serveral time. therefore how can i get the header data and change them ? thx F.
[PHP] while question
Hi, i'm on PHP training and our lector is telling us that to avoid counting an array item amout thanks count($my_array), he tells we can do: while($my_array) { ... do something } but from experience this is an infinity loop... it should be always something like $count = count($my_array); while($i = $count) { ... do something ... $i++; } has someone already use such syntax ? i mean as the first one. thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] DLL
thx a lot for the links. i'm gonna check them but it seems promising. On Wed, Oct 22, 2008 at 8:26 PM, Stut [EMAIL PROTECTED] wrote: On 22 Oct 2008, at 19:21, Alain Roger wrote: i would like to know if it exists a way to create component (maybe using python, perl, or something else) to save it as DLL and to use this component on PHP pages ? i mean by component something like a graphical representation of a table. this dll should be able to be dynamically loaded by PHP script, not by server. Sure. Write an extension [1] and use the dl function [2]. [1] http://jmp.li/ca [2] http://jmp.li/cb -Stut -- http://stut.net/ -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] class constructor overloading
Hi, is it possible to overload the class construct(or) ? if yes, how ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] class constructor overloading
thanks a lot, this is exactly what i needed. if the construct of based class A accept arguments, i guess that construct of class B must have the sames. moreover, i guess that something like that must be written: class A { function __construct($nameA) { ... } } class B extends A { function __construct($nameB) { parent::__construct($nameB); } } am i right ? thanks. A.
[PHP] Inheritance of class methods
Hi, i have the following classes: class A { public function EchoMe($txt) { echo $txt; } } class B extends A { ... } in theory i can write something like that: $b = new B(); $b-EchoMe(test); and i should get echo test on screen. am i correct ? -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] DLL
Hi, i would like to know if it exists a way to create component (maybe using python, perl, or something else) to save it as DLL and to use this component on PHP pages ? i mean by component something like a graphical representation of a table. this dll should be able to be dynamically loaded by PHP script, not by server. thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] table and class
Hi, in my web application (as quite all web applications) i have a lot of tables. I mean by table the table tag with for sure some data displayed in it from SQL requests. To not have to write the whole code every time i was thinking to make a class that : - will manage the whole design (color, images, width, height of cells,...) - will manage the paging (to limit the data transfer from DB server to client browser) - will manage the sorting and search (classic and advanced) of data based on some online built query (user should be able to do something like field1 = value 1 OR field 1 = value2 AND field4 = a) therefore i would like to know if to encapsulate everything in PHP classes (integrating javascript and css) will be the best approach or not ? because i would like to keep it as simple as possible in order to redistribute later this package. or should i mix javascript classes and PHP classes ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] class and inheritance
Hi, I'm trying to create a class that has as public members some other class object. for that i use almost the same syntax as under C# or C++. header class: ?php class CARMainHeader { // title of the main table header private $mTitle = null; // holds the height of the table header private $mHeight = null; // constructor public function __construct() { $this-mHeight = 15; $this-mTitle = Title; } // set the title of the main table public function SetTitle($name) { $this-mTitle = $name; } // return the title of the main table public function GetTitle() { return $this-mTitle; } // set the height of the header public function SetHeight($height) { $this-mHeight = $height; } // return the height of the header public function GetHeight() { return $this-mHeight; } } ? main class code : ?php include_once 'CARMainHeader.php'; class CARTable { // holds the main table header object public $mTableHeader = null; // store the amount of columns in table private $mColumnsCount = null; // constructor public function __construct() { $this-mTableHeader = new CARMainHeader(); } // rendering of table public function Render() { echo table; echo tr /; echo td class=''.$this-mTableHeader-; echo /td; echo td class=''; echo /td; echo /table; } } ? in the CARTable, i'm not able in the Render function to write $this-mTableHeader-GetTitle(); why ? -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] Re: class and inheritance
basically i did this but Zend studio for eclipse does not show me the data or methods members after one - :-( On Tue, Oct 21, 2008 at 9:11 PM, Maciek Sokolewicz [EMAIL PROTECTED]wrote: Alain Roger wrote: Hi, I'm trying to create a class that has as public members some other class object. for that i use almost the same syntax as under C# or C++. header class: ?php class CARMainHeader { // title of the main table header private $mTitle = null; // holds the height of the table header private $mHeight = null; // constructor public function __construct() { $this-mHeight = 15; $this-mTitle = Title; } // set the title of the main table public function SetTitle($name) { $this-mTitle = $name; } // return the title of the main table public function GetTitle() { return $this-mTitle; } // set the height of the header public function SetHeight($height) { $this-mHeight = $height; } // return the height of the header public function GetHeight() { return $this-mHeight; } } ? main class code : ?php include_once 'CARMainHeader.php'; class CARTable { // holds the main table header object public $mTableHeader = null; // store the amount of columns in table private $mColumnsCount = null; // constructor public function __construct() { $this-mTableHeader = new CARMainHeader(); } // rendering of table public function Render() { echo table; echo tr /; echo td class=''.$this-mTableHeader-; you're missing something here, don't you think? :) echo /td; echo td class=''; echo /td; echo /table; } } ? in the CARTable, i'm not able in the Render function to write $this-mTableHeader-GetTitle(); why ? you can, and it works. Once you actually call that method. - Tul -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] paging at which level
Hi, i would like to know what is the best approach for paging ? usually i use PEAR and page thanks their table library, but to avoid high transfer of data from DB to PHP page it is better to do the paging at database level. I would like to know what is your point of view on this topic and what do you use to do ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] PDO
Hi, i'm currently using PDO as it seems better than any other pg_connect and so on... however, i experience issue testing it. for example the following code returns me the correct records (count and records themselve) $sql =SELECT * FROM sewe.languages;; $result = DatabaseHandler::Prepare($sql); //$res=DatabaseHandler::Execute($result); $rec = DatabaseHandler::GetAll($result); echo Amount of records : .count($rec).br/; for ($i = 0; $i count($rec); $i++) { print Record ID : .$rec[$i]['id']. / Abbreviation : .$rec[$i]['abbreviation']. / Description :.$rec[$i]['description'].br/; } however if i replace this simple SQL request by my function./stored procedure like that : $sql = 'select * from get_languages_list(*);'; it does not work...in fact it returns me 0 as count of record, whereas under postgreSQL pgAdmin interface the same syntax of SQL request returns me the same result as the previous SQL selct * from... so where could be the issue when PDO uses stored procedures/functions ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] pdo and dabase schema
Hi, is there a way with PDO class to not have: - to execute a simple SET search_path TO myschema; - and after to fletch another SQL request, like select to be sure that the SQL statement will be perform on this schema ? (basically i want to do it in 1 step) because i tried to specify the schema into my sql statement but in this case PDO returns me 0 record. thanks a lot, -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] template usage
I'm just reading a book on PHP and they promote quite heavily smarty as template designer tool for presenting information and data to users. they absolutly do not talk about pear and i'm a little surprised. That's why i'm wondering who use what and for which reason. Basically let's say for data/information presentation to end user...what is the best lib (pear, smarty) ? On Sun, Oct 12, 2008 at 11:32 AM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sun, 2008-10-12 at 11:09 +0200, Alain Roger wrote: Hi, i would like to know if you are a lot to use PHP templates for your web application or web sites ? if yes, which one do you use (smarty, pear, yapter, phplib,...) ? and for which reason ? what is/are the advantages over the others ? thanks a lot, I wouldn't really call them templates, they're more libraries, and they all have their individual uses. Generally, your use of them will depend on what you actually want. Can you explain a few details of what you are actually looking to do? Ash www.ashleysheridan.co.uk -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] template usage
Hi, i would like to know if you are a lot to use PHP templates for your web application or web sites ? if yes, which one do you use (smarty, pear, yapter, phplib,...) ? and for which reason ? what is/are the advantages over the others ? thanks a lot, -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] security and database
Hi, to have access to my web application, user needs to log in. Before to send login/password over the net, user is directly redirected to HTTPS version of my web application in case he did not write HTTPS:// at the address bar. once he types login/password, everything is checked with DB data and if it is correct, so he's granted right to continue and he redirected to another HTTPS web page. i would like improve security but i'm not sure it make sense as HTTPS is used. therefore i was thinking to request for each stored procedures (all my SQL requests are in stored procedures) login and password (stored into session)... but does it make really sense ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] AJAX and PHP
Alain: The only difference the user experiences between having AJAX, or not, is refreshing the page. If page refresh is not a problem, then don't complicate your life. On the other hand, if page refresh is annoying, or not wanted, then AJAX is you're only solution. But as it has been said before, not all users have javascript turned on and as such AJAX will not work -- after all, it javascript. However, there are way to degrade gracefully from a AJAX site to a normal site. Google javascript graceful degradation for references. Please note, going the AJAX route does not make your coding simpler -- it's a different critter. But it does (with help from jQuery et al) offer exciting new ways to present data. Cheers, tedd this is a standard response for me recently; but have you looked in to using flex 3 to build the clientside? additionally ajax's main benefit (in my mind) is that it allows you to pull down/update only the data you need, and not the whole page - often this means you can skip out a large part of the templating and make the php server side scripts so much lighter; very beneficial when polling. Other than that, as everyone has mentioned - it's mainly a cosmetic thing. -- nathan ( [EMAIL PROTECTED] ) Without mixing themes (flex in PHP forum) flex is similar to AS3, no ?
Re: [PHP] AJAX and PHP
And AFAIK it does not work on linux platform On Mon, Oct 6, 2008 at 3:36 PM, Wolf [EMAIL PROTECTED] wrote: !-- SNIP -- yes, flex is flash for developers; the main language is AS3 and it outputs swf's; flex is basically a program which allows you to use mix of pre-made ui elements classes, css and AS3 to quickly make great RIA's. Yup, but you have to have flash enabled. But some of us don't except for specific sites due to ads being swfs as well. Wolf -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] AJAX and PHP
HI, i'm currently working on some web application and i would like to know what is the best way to do what i want. basically like all application i have a menu and based on selected item menu i want to display a page (basically 50 % of this new page is DB result/grid. As usual i have 2 divs, one for the menu one for the content of DB to display. i would like to know if it's not better to use AJAX to load the content of the second div (DB result and other stuff) instead to every time load a new page which load menu and content of DB ? what are your experiences on such thing ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] AJAX and PHP
On Sat, Oct 4, 2008 at 2:38 PM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sat, 2008-10-04 at 13:48 +0200, Nitsan Bin-Nun wrote: It depends how much stuff you have in the first div, it there are a lot of images and the user will have to load them again (in case there is no cache) and you care for the traffic those images cost - it would be better to use AJAX. But generally - they both okay, I personally would use reload of the whole page just because of the time it would take me to develop it with ajax ;) HTH, Nitsan On Sat, Oct 4, 2008 at 12:10 PM, Alain Roger [EMAIL PROTECTED] wrote: HI, i'm currently working on some web application and i would like to know what is the best way to do what i want. basically like all application i have a menu and based on selected item menu i want to display a page (basically 50 % of this new page is DB result/grid. As usual i have 2 divs, one for the menu one for the content of DB to display. i would like to know if it's not better to use AJAX to load the content of the second div (DB result and other stuff) instead to every time load a new page which load menu and content of DB ? what are your experiences on such thing ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 Also, it depends on who you think will be visiting the site, as an increasing number of people browse the web with devices that have no JavaScript capabilities, so they wouldn't be able to use an Ajax site. AFAIK only PDA do no have javascript support at 100%. MacOS, MS OS and LINUX support it.
Re: [PHP] AJAX and PHP
Thanks tedd. basically page refreshin is not a problem for me as it in intranet application. however, AJAX offers some really nice thing and 1 from my point of view it's to reduce the network traffic by limiting what should be refresh/downloaded. in that way i think it is interesting. On Sat, Oct 4, 2008 at 3:52 PM, tedd [EMAIL PROTECTED] wrote: At 12:10 PM +0200 10/4/08, Alain Roger wrote: HI, i'm currently working on some web application and i would like to know what is the best way to do what i want. basically like all application i have a menu and based on selected item menu i want to display a page (basically 50 % of this new page is DB result/grid. As usual i have 2 divs, one for the menu one for the content of DB to display. i would like to know if it's not better to use AJAX to load the content of the second div (DB result and other stuff) instead to every time load a new page which load menu and content of DB ? what are your experiences on such thing ? thx. -- Alain Alain: The only difference the user experiences between having AJAX, or not, is refreshing the page. If page refresh is not a problem, then don't complicate your life. On the other hand, if page refresh is annoying, or not wanted, then AJAX is you're only solution. But as it has been said before, not all users have javascript turned on and as such AJAX will not work -- after all, it javascript. However, there are way to degrade gracefully from a AJAX site to a normal site. Google javascript graceful degradation for references. Please note, going the AJAX route does not make your coding simpler -- it's a different critter. But it does (with help from jQuery et al) offer exciting new ways to present data. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] AJAX and PHP
So in this case what is the plus for companies like MS, Google (with Gmail), flicker and so on to use AJAX ? it is on internet, so i guess they have a purpose to do that. mine is to have a responsive and intuitive interface application whatever it is on internet or intranet. On Sat, Oct 4, 2008 at 7:12 PM, Per Jessen [EMAIL PROTECTED] wrote: Alain Roger wrote: Thanks tedd. basically page refreshin is not a problem for me as it in intranet application. however, AJAX offers some really nice thing and 1 from my point of view it's to reduce the network traffic by limiting what should be refresh/downloaded. in that way i think it is interesting. On an intranet you've almost certainly got 100Mbit/s with a suitably capable backbone - limiting network traffic is not a concern, IMHO. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] store array into session variable and get it back later
Hi, i have a 2 dim array defined as following: class CBreadcrumb { // array holding the complete Breadcrumb var $crumb = array(); /* * Constructor */ function CBreadcrumb() { } /* * Add new stage */ function Add($name, $link, $id) { array_push($this-crumb,array('name' = $name, 'link' = $link, 'id' = $id)); } } and its instance : $bc = new CBreadcrumb(); // filling the instance $bc-Add('Home',https://www.myweb.com/framework/,0); $bc-Add('Language',https://www.myweb.com/language/,1); // session must be started to store this breadcrumb $_SESSION['bc']=$bc; later on i try to use the content of this array, bt without success. Here is what i do: $bci = array($_SESSION['bc']); array_push($bci,$_SESSION['bc']); foreach($bci as $key=$value) { echo bci : .$bci[$key]['name']; echo br/; } how can i get the 'name' value for each row in this session stored array ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] store array into session variable and get it back later
On Wed, Oct 1, 2008 at 2:43 PM, Frank Arensmeier [EMAIL PROTECTED] wrote: 1 okt 2008 kl. 12.31 skrev Alain Roger: ... later on i try to use the content of this array, bt without success. Here is what i do: $bci = array($_SESSION['bc']); array_push($bci,$_SESSION['bc']); foreach($bci as $key=$value) { echo bci : .$bci[$key]['name']; echo br/; } how can i get the 'name' value for each row in this session stored array ? thx. ... The function you need to look into is called serialize. http://www.php.net/manual/en/function.serialize.php //frank This is what i did afterall, but when i unserialize it like this way: $bci = unserialize($_SESSION['bc']); foreach($bci as $key=$value) { echo bci : .$key; echo br/; } i get absolutely the same result as the code below. in fact $key returns me the 2 variables member of the Class. but not the value stored inside them. any idea ? -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] store array into session variable and get it back later
later on i try to use the content of this array, bt without success. Here is what i do: $bci = array($_SESSION['bc']); array_push($bci,$_SESSION['bc']); foreach($bci as $key=$value) { echo bci : .$bci[$key]['name']; echo br/; } how can i get the 'name' value for each row in this session stored array ? thx. ... The function you need to look into is called serialize. http://www.php.net/manual/en/function.serialize.php //frank This is what i did afterall, but when i unserialize it like this way: $bci = unserialize($_SESSION['bc']); foreach($bci as $key=$value) { echo bci : .$key; echo br/; } i get absolutely the same result as the code below. in fact $key returns me the 2 variables member of the Class. but not the value stored inside them. any idea ? so here is what i've decided to use: for ($row=0;$row=count($bci-crumb);$row++) { echo br/value[$row]['name'] : .$bci-crumb[$row]['name'].br/; echo br/value[$row]['link'] : .$bci-crumb[$row]['link'].br/; echo br/value[$row]['id'] : .$bci-crumb[$row]['id'].br/; } and it works like a charm. but how can i optimize it ? i mean foreach could do the work better ?
[PHP] table with paging and sorting
Hi, i used in the past a former version of Pear package to create table with pagination and sorting. i would like to know if there are some other solution (free) to do something like this one : a href= http://s220.photobucket.com/albums/dd277/alainroger/development/?action=viewcurrent=example-table.gif; target=_blankimg src= http://i220.photobucket.com/albums/dd277/alainroger/development/example-table.gif; border=0 alt=web table with pagination and sorting/a ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] table with paging and sorting
sorry here is the link http://i220.photobucket.com/albums/dd277/alainroger/development/example-table.gif -- Forwarded message -- From: Alain Roger [EMAIL PROTECTED] Date: Wed, Oct 1, 2008 at 7:34 PM Subject: table with paging and sorting To: PHP General List php-general@lists.php.net Hi, i used in the past a former version of Pear package to create table with pagination and sorting. i would like to know if there are some other solution (free) to do something like this one : a href= http://s220.photobucket.com/albums/dd277/alainroger/development/?action=viewcurrent=example-table.gif; target=_blankimg src= http://i220.photobucket.com/albums/dd277/alainroger/development/example-table.gif; border=0 alt=web table with pagination and sorting/a ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] navigation / location bar
Hi, a lot of web sites propose a locationbar (something like dynamic map site) to end user when they are browsing the website. usually i looks like that: Home Products Software Operating System Windows XP User can come back to a previous parent node by just clicking on the name, for example : Software. so: 1. what is the best method to use to create such location bar ? (array stored in session variable ?) 2. how to populate this bar ? (each time that user visit a page, the array is updated. if yes, how ?) -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] navigation / location bar
Interesting but how to make this hierarchy ? this i do not know in PHP :-( where can i find code examples ? On Tue, Sep 30, 2008 at 5:27 PM, Stut [EMAIL PROTECTED] wrote: On 30 Sep 2008, at 16:04, Alain Roger wrote: a lot of web sites propose a locationbar (something like dynamic map site) to end user when they are browsing the website. usually i looks like that: Home Products Software Operating System Windows XP User can come back to a previous parent node by just clicking on the name, for example : Software. so: 1. what is the best method to use to create such location bar ? (array stored in session variable ?) 2. how to populate this bar ? (each time that user visit a page, the array is updated. if yes, how ?) These are usually called breadcrumbs and come in two forms. One is true to the name and the other is actually the page location on the site rather than crumbs. True breadcrumbs store the URL and name of the last n pages the user visited and displays them as links to allow the user to go back through their browser history. Since this duplicates functionality that exists in 99.9% of browsers out there this type is pretty rare these days. These are pretty simple to implement but you need some way to store an RRD array between requests. The more common type of breadcrumb is simply the location within the site. Your example above is of this type. Occasionally you'll find these are customised slightly based on user activity but for the most part they're simply an indication of where in the site structure the page is. Given that they're linked more to the page than the user there's no need to track anything between pages unless you want to customise them for the user. All your site need to be able to do is create the heirarchy up to the homepage from any page. As examples check out the following pages (under the orange bar)... http://uk.freeads.net/ http://pets.uk.freeads.net/ http://pets.uk.freeads.net/cats/ http://pets.uk.freeads.net/cats/search?for=kitten And regional versions... http://aberdeen.uk.freeads.net/ http://aberdeen.uk.freeads.net/pets/ http://aberdeen.uk.freeads.net/pets/cats/ http://aberdeen.uk.freeads.net/pets/cats/search?for=kitten If your site can't figure out where it is in the heirarchy then you've got other problems more important than not being able to give the user breadcrumbs. -Stut -- http://stut.net/ -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] error warning while connecting to posgreSQL
Hi, i try to understand the error_reporting statement and to avoid all warning or error messages. for example i stop the postgresql service and i try to connect to it. when error_reporting is set to E_ALL, i get the following warning : *Warning*: pg_connect() [function.pg-connecthttps://192.168.1.2/se_admin/en/logon/function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server: Connection refused (0x274D/10061) Is the server running on host localhost and accepting TCP/IP connections on port 5432? in * L:\Webserver\se\log\checklogin.php* on line *48* Couldn't Connect: but if i have the error_reporting set to 0, i only get my die message Couldn't connect. i would like to know if i let the setting E_ALL do i have a way how to not display the warning message to end users but to display only Couldn't connect ? in fact to have the same behavior as error_reporting set to 0. thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] error warning while connecting to posgreSQL
i only set it via php code like error_reporting(0); On Sun, Sep 28, 2008 at 11:11 AM, Ashley Sheridan [EMAIL PROTECTED]wrote: On Sun, 2008-09-28 at 11:00 +0200, Alain Roger wrote: Hi, i try to understand the error_reporting statement and to avoid all warning or error messages. for example i stop the postgresql service and i try to connect to it. when error_reporting is set to E_ALL, i get the following warning : *Warning*: pg_connect() [function.pg-connect https://192.168.1.2/se_admin/en/logon/function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server: Connection refused (0x274D/10061) Is the server running on host localhost and accepting TCP/IP connections on port 5432? in * L:\Webserver\se\log\checklogin.php* on line *48* Couldn't Connect: but if i have the error_reporting set to 0, i only get my die message Couldn't connect. i would like to know if i let the setting E_ALL do i have a way how to not display the warning message to end users but to display only Couldn't connect ? in fact to have the same behavior as error_reporting set to 0. thx. I don't think you set error reporting to an actual number in the php.ini. It should read something like error_reporting = E_ALL ~E_WARNING if you want all errors but not the warnings. Ash www.ashleysheridan.co.uk -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] event feeder
Hi, i would like to display on my web application, the latest 3 events added to my web DB. something like latest 3 event which happen to company. what is the best way knowing that each event is translated in several languages and stored into DB ? should i directly read latest 3 events from DB using PHP ? should i firstly query DB for each language, store the result into a txt file (for example) and after using AJAX or PHP read this file ? what do you use usally ? thx. -- Alain Windows XP SP3 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] News reader
Hi, i tried to configure Thunderbird to read and post news on PHP.net forums. I'm able to read messages but not to post some. Does anyone already succeed in it ? Do to security reasons at work, personal email usage is strictly forbidden now so i'm not able to use gmail, yahoo or hotmail anymore. thanks a lot -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] Re: News reader
this is what i've done even at home but sending message fails everytime. even if my SMTP server is well configured :-( On Sun, Aug 10, 2008 at 8:33 PM, Al [EMAIL PROTECTED] wrote: Alain Roger wrote: Hi, i tried to configure Thunderbird to read and post news on PHP.net forums. I'm able to read messages but not to post some. Does anyone already succeed in it ? Do to security reasons at work, personal email usage is strictly forbidden now so i'm not able to use gmail, yahoo or hotmail anymore. thanks a lot Create a new account Select newsgroup enter news.php.net I used Thunderbird for this message. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] Re: News reader
yes on port 119. i do not want to use my professional email address (or SMTP settings) to send message on newsgroups. for MS, Borland, eclipse and other newsgroups servers, it works perfectly without setting a SMTP server. i do not use gmail to send message via thunderbird... i use gmail only for mailing list as thunderbird does not work :-( On Sun, Aug 10, 2008 at 9:01 PM, Al [EMAIL PROTECTED] wrote: Port 119? Try your ISP mail account directly. Maybe gmail is blocking you. Can you access and other newsgroups? You'd be better off working with the Thunderbird forum for this problem. It's not a php problem. Alain Roger wrote: this is what i've done even at home but sending message fails everytime. even if my SMTP server is well configured :-( On Sun, Aug 10, 2008 at 8:33 PM, Al [EMAIL PROTECTED] wrote: Alain Roger wrote: Hi, i tried to configure Thunderbird to read and post news on PHP.net forums. I'm able to read messages but not to post some. Does anyone already succeed in it ? Do to security reasons at work, personal email usage is strictly forbidden now so i'm not able to use gmail, yahoo or hotmail anymore. thanks a lot Create a new account Select newsgroup enter news.php.net I used Thunderbird for this message. -- 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 -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] PHP page completly blank
Hi, i reinstalled on my computer (Win XP) PHP 5.2.4 (but the same happens with 5.2.6). when i run an index.php page or any other php page which works well before, now i get a blank page result on my browser without any error message. even if only HTML code is inside the PHP page nothing is displayed. it's enough that page as *.php extension to reproduce such issue. when under command line i run php -v i get a lot of error messages, like those 2 as attached files. what can it be ? i've checked those files and they exist. :-( thanks a lot for your help. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamic extension
Hi, i do not see anymore the dynamic extension part in php.ini file, under PHP 5.2.6. is it normal ? thx -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] PHP page completly blank
Ok i found where was the problem. basically when i install php 5.2.6 with installer.msi, i must after copy over those files, the content of the php-5.2.6-Win32.zip file, because several files and links are not installed / done by the installer.msi :-( just try to install it with default settings and you will see that in php.ini there is not section for windows extensions like in previous version so we can not dynamically add a module. Or for example, even if you select some module a the installation time, the files are installed but when you type php -v at command line, you get an error that the file libpq.dll is not available (whereas it is)... plus some other librairies (dll) files. On 8/3/08, Daniel Brown [EMAIL PROTECTED] wrote: On Sun, Aug 3, 2008 at 3:54 AM, Alain Roger [EMAIL PROTECTED] wrote: when under command line i run php -v i get a lot of error messages, like those 2 as attached files. what can it be ? i've checked those files and they exist. :-( Attached files are stripped automatically by mailman before redistributing messages to the list. Please copy and paste the errors into the body of the message instead. -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated servers, VPS, and hosting from $2.50/mo. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] php.ini and pgsql extension issue
Hi, i found and solved an interesting issue under PHP 5.2.6. when i use the standard installation file under windows XP (php-5.2.6-win32-installer.msi), i get several error message in apache error.log file, something like : PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\webserver\\PHP\\ext\\php_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0 and this for several extensions even if the files are correctly installed in the right folder. I took a previous version of PHP 5.2.3 extension (dll) and i compare the size: in PHP 5.2.6, php_pgsql.dll is 96 kb whereas it is 164 kb under PHP 5.2.3. so i just replace the 96 kb file by the 164 kb and restart apache 2.2.8. now it works perfectly. i reproduced the same thing for all dynamic extensions which were generating the same issue and all works. it could be interesting that developers of PHP take an eye on it. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] E-Shop system
Hi, i'm currently analyzing an e-shop system. i understand how to display products and so on, however i still have some question marks on the following topics: 1. what is the best way for showing product image ? - to store them in DB or onto filesystem as simple image files ? - each product should have 2 images (1 small when user browser the catalogue, 1 huge (standard) when user wants to see how product looks like). Should be 1 or 2 images ? I mean should i store in DB/filesystem the standard file and reduce size for user browsing ? 2. billing interaction basically i was thinking to allow users to pay via PayPal, Bank2Bank and by credit card. - What i do not understand is how can i interact with such third party company ? - for paypal: how can i redirect user to PayPal and pay to my account and how to get back information that he paid (and that i can send the good) ? - Bank transfer: how can i control it ? - Credit card payment: how can i be sure that when user give me his credit card number, my application will secure it enough ? how can i get back information that it's true...user paid the good and i can send him the product ? thanks a lot for all your feedback. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] first e-shop
Hi, I need to create an e-shop in PHP. this is for me the first time that i need to do that and i think the way how to approach such topic is different that creating a simple corporate web site. Here are the standard features that i need to implement: - home page including latest article/news, offers, discounts, material tests e-shop should: - allow users to search good by selecting a category (and/or sub category) or by specifying parameters in search tool - allow users to browse goods - catalog of good should be browsable offering a short description of the good, name of good, picture, price and link to more detailed information - allow basket usage for ordering goods. - allow payment by several using different methods (credit cards, paypal, and so on...) Administrative part of the web site should also: - allow archivings of old article/news, and material/good tests - allow composing of articles, tests, and so on... including pictures page setup. - allow management of goods and catalog. as you can see something really standard... however, i would like to do it well from the beginning, so i would like to know if some example or tutorial (even if partial) exist on internet.. and for sure,, you are experienced in such topics, so to what should i pay attention ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] AJAX and PHP
Hi, i'm playing around with AJAX and PHP to create something like a small desktop application. basically the first step is to log in the system. for that i have a log-in form where users can choose the interface language. here is my problem : when the log-in form runs, it is in English. user can click on some arrow to open another DIV and display all other languages available. a click on a particular flag, will call the PHP page where the log-in form (login field + password field) are stored with dynamic language interface. however, i make no sense for the title of this form to call a PHP page where will be just 1 dynamic text (changing on flag choice). so if you understand well, i have 2 divs (1 for form title, 1 for log-in form itself). and i load thanks AJAX php code into divs. my problem is that i do not want to write a PHP page just for 1 label... it makes sense for a complete form but not for a simple text line or label. So how can i do that without refreshing page. using AJAX and PHP only ? i guess you already faced such situation so i would really appreciate your help. thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] AJAX and PHP
you understood right. basically my problem is that the layout avoid it. here is something like my layout : div#0 div#1Lanague (label) : img flag img arrow to show all languages from div#2/div#1 div#2 all flags/div#2 div#3 login field + pwd field + submit button/div#3 /div#0 till now i only use AJAX to refresh the content of div#3 but it does not change the label from div#1 when user selects another language from div#2. if i place the whole form into a PHP i face several questions : - how the ajax will reload this PHP page (reloading itself) in the parent control div#0 ? - when user will click on submit button, where will be loaded the content return of checking if log+pwd are correct ? - how to redirect to another PHP page, when user click on submit button ? the redirection will happen only in the content div, so only in div#0 and not into the browser :-( Al. On Mon, Apr 21, 2008 at 9:55 AM, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Alain Roger [EMAIL PROTECTED]: Hi, i'm playing around with AJAX and PHP to create something like a small desktop application. basically the first step is to log in the system. for that i have a log-in form where users can choose the interface language. here is my problem : when the log-in form runs, it is in English. user can click on some arrow to open another DIV and display all other languages available. a click on a particular flag, will call the PHP page where the log-in form (login field + password field) are stored with dynamic language interface. however, i make no sense for the title of this form to call a PHP page where will be just 1 dynamic text (changing on flag choice). so if you understand well, i have 2 divs (1 for form title, 1 for log-in form itself). and i load thanks AJAX php code into divs. my problem is that i do not want to write a PHP page just for 1 label... it makes sense for a complete form but not for a simple text line or label. So how can i do that without refreshing page. using AJAX and PHP only ? i guess you already faced such situation so i would really appreciate your help. thanks a lot, -- Alain Making an Ajax request for one little label maybe a bit overkill. As i understand you request the whole form through an Ajax request. And display this to the user? And every language generates a new form? Why not just create the form dynamically with javascript and load the data from PHP. So the form can stay the same for all calls. You just fill it with data depending on the language selected. You can fill the form for instance by sending a JSON encoded object from PHP to javascript. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] AJAX and PHP
in fact i meant by redirecting the following thing : - if user wrote a correct pwd and login, the system should redirect [using header(Location ] syntax to launch the application. but if i use such syntax it will be redirected only into the div#0, and not in the browser itslef. is it clearer now ? On Mon, Apr 21, 2008 at 11:40 AM, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Alain Roger [EMAIL PROTECTED]: you understood right. basically my problem is that the layout avoid it. here is something like my layout : div#0 div#1Lanague (label) : img flag img arrow to show all languages from div#2/div#1 div#2 all flags/div#2 div#3 login field + pwd field + submit button/div#3 /div#0 till now i only use AJAX to refresh the content of div#3 but it does not change the label from div#1 when user selects another language from div#2. Well it looks like you need a extra Ajax call to the server. Click a language flag sends a request to the server. The server responds with an JSON object. Containing the content for div#2. With javascript you can update the contents of div#2 if i place the whole form into a PHP i face several questions : - how the ajax will reload this PHP page (reloading itself) in the parent control div#0 ? If you would like to reload the whole of div#0 You could send and JSON object from PHP to javascript. And let javascript generate the div structure and update the DOM. - when user will click on submit button, where will be loaded the content return of checking if log+pwd are correct ? When a user logs in a Ajax request is send to the server. the server responds with an JSON object containing the error message. With javascript you could update the contents of div#3 to display a message. - how to redirect to another PHP page, when user click on submit button ? the redirection will happen only in the content div, so only in div#0 and not into the browser :-( I have a hard time understanding this last issue. What exactly do you mean by redirecting to another PHP page? Al. On Mon, Apr 21, 2008 at 9:55 AM, Thijs Lensselink [EMAIL PROTECTED] wrote: Quoting Alain Roger [EMAIL PROTECTED]: Hi, i'm playing around with AJAX and PHP to create something like a small desktop application. basically the first step is to log in the system. for that i have a log-in form where users can choose the interface language. here is my problem : when the log-in form runs, it is in English. user can click on some arrow to open another DIV and display all other languages available. a click on a particular flag, will call the PHP page where the log-in form (login field + password field) are stored with dynamic language interface. however, i make no sense for the title of this form to call a PHP page where will be just 1 dynamic text (changing on flag choice). so if you understand well, i have 2 divs (1 for form title, 1 for log-in form itself). and i load thanks AJAX php code into divs. my problem is that i do not want to write a PHP page just for 1 label... it makes sense for a complete form but not for a simple text line or label. So how can i do that without refreshing page. using AJAX and PHP only ? i guess you already faced such situation so i would really appreciate your help. thanks a lot, -- Alain Making an Ajax request for one little label maybe a bit overkill. As i understand you request the whole form through an Ajax request. And display this to the user? And every language generates a new form? Why not just create the form dynamically with javascript and load the data from PHP. So the form can stay the same for all calls. You just fill it with data depending on the language selected. You can fill the form for instance by sending a JSON encoded object from PHP to javascript. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] php, ajax and international application
Hi, Till now, i'm used to have a php file (for each language) to store all text labels for my international application. i tried with Ajax to improve it but it seems not so flexible at it promised. my purpose was to limit the transfer data and especially to not load too much the server with not important calculation as localization of application. therefore, i would like to know what do you do to have an international application ? 1. do you use JSON : 1 javascript file for each language and for each module. Code is not secured and everybody can read it. 2. do you use PHP like i wrote above. 3. you use another method I would be glad to here from you the pros and cons of your experiences. thx. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] module access rights
Hi, i'm very surprised... i did not get any answer to my previous post. is it because it is good way to do it or because nobody knows ? thx. Al. --- Hi, i face now a little issue regarding how end user can access to some modules of my web portal. Let imagine we have several modules (let say: mod1, mod 2, mod3) and 2 users (usr1, usr2). i would like to use a simple way how to established access rights for each user to grant/forbidden access to modules. i was thinking that a simple code like on linux could fit this need where i could have execute/change/read access and this for each module. for example, usr1 could have stored into DB the access rights 710 (knowing that rights are based on mod3 | mod2 | mod1) so usr1 : - could execute some particular actions, change data and read data from module 3 - could just read data for module 2 - does not have access to module 1 something similar for usr2 could be setup. on each php pages/module, the user rights are checked and based on result, the correct decision is taken by the web portal system. i would like to know if such technique is a correct one, or if there is something much more better ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] module access rights
Hi, i face now a little issue regarding how end user can access to some modules of my web portal. Let imagine we have several modules (let say: mod1, mod 2, mod3) and 2 users (usr1, usr2). i would like to use a simple way how to established access rights for each user to grant/forbidden access to modules. i was thinking that a simple code like on linux could fit this need where i could have execute/change/read access and this for each module. for example, usr1 could have stored into DB the access rights 710 (knowing that rights are based on mod3 | mod2 | mod1) so usr1 : - could execute some particular actions, change data and read data from module 3 - could just read data for module 2 - does not have access to module 1 something similar for usr2 could be setup. on each php pages/module, the user rights are checked and based on result, the correct decision is taken by the web portal system. i would like to know if such technique is a correct one, or if there is something much more better ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] standard format for Web portal administration side
Hi, I've seen several web portal and their dedicated administration side. some of those administration (portal) are according to w3c standard (1024 px large), but most of them use the full screen width. therefore i would like to know if there is a standard size (width / height) for web portal administration side ? what do you do usually ? thx. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] newsletter administration
Hi, I need to do a little CMS for managing Newsletter for 1 of my customers. as i never worked on such thing in the past, i would be glad to have your feedback. basically, web site users are registered into DB. my customer would like to send them a newsletter to promote new products and services. this newsletter should be in HTML format and send 1 by 1 to each customer. where can i find information or template how to develop such managing tool for newsletter ? i mean online, customer will create his newsletter layout and add images, links, text, and so on... to what should i pay attention ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] auto generated PDF
Hi, i want to implement on my web portal electronic invoicing system. basically data will be stored into PostgreSQL DB. I would like to know if someone already have experiences with such feature or where could i find some tutorials or help about this topic. Concretly, user will buy some products/services online and i would like to send him a PDF invoice via email. is there a PDF module under PEAR or directly under PHP ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] page content duration
Hi, i have a strange behavior on my web page. i have a form where users can enter their email address to subscribe to newsletter. if user already exists the page inform him and allow him to go back thanks a button. clicking on this button, load another page (initial page with the form for newsletter registration). if user enter another email address and click on the submit button... even if the email is not registered into DB (as user who want newsletter registration), the page display the message user already registered. it's like it keeps in mind the previous email address... here is my code : div id='newsletter_form' form id='form_email' name='form_newsletter' method=POST action=../newsletter/ input id='field_email' type='text' name='email' value='?php print module_msg($welcome,$Lang, 'type_email'); ?' onfocus=if(this.value=='?php print module_msg($welcome,$Lang, 'type_email'); ?'){this.value=''}; onblur=if (this.value==''){ this.value='?php print module_msg($welcome,$Lang, 'type_email'); ?' }; / input id='btn_signin' type='submit' name='signin' value='?php print module_msg($welcome,$Lang, 'Sign_in'); ?' / /form /div i just added a feature to auto-complete the text field (email) in case of user already wrote email and clicked on back button of the registration checking page just to avoid him to rewrite email address... but anyway it should not keep it in mind... there is not $_SESSION variable. this code works perfectly under FF, but not under Opera, safari and IE 6. what could it be ? -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] convert a string to integer
Hi, i know this topic is obvious but i have a strange behavior and i'm getting crazy. my stored procedure returns me a string. string can be an email or a message error = '-1', '-2', '-3' when i check if the string contains only digit, i use ctype_digit(mystring) but any way it returns me false... i suppose that for -1, -2, -3 the - is taken as character and not a digit. i tried also to cast it before into integer thanks ctype_digit((int)mystring), but it does not work. so how can i solve this issue ? thx -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] convert a string to integer
thx a lot... i completly skipped this one...i don't know why :-( now it works On Fri, Mar 28, 2008 at 8:55 AM, Simon Welsh [EMAIL PROTECTED] wrote: On 28/03/2008, at 8:48, Alain Roger wrote: Hi, i know this topic is obvious but i have a strange behavior and i'm getting crazy. my stored procedure returns me a string. string can be an email or a message error = '-1', '-2', '-3' when i check if the string contains only digit, i use ctype_digit(mystring) but any way it returns me false... i suppose that for -1, -2, -3 the - is taken as character and not a digit. i tried also to cast it before into integer thanks ctype_digit((int)mystring), but it does not work. so how can i solve this issue ? thx -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 is_numeric() - Finds whether the given variable is numeric. Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part. --- Simon Welsh Admin of http://simon.geek.nz/ Windows is a joke operating system. Hell, it's not even an operating system. NT is Not Tough enough for me either. 95 is how may times it will crash an hour. http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] optimilize web page loading
Hi, i would like to know if there is a way to know how long does a web page need to be loaded into browser ? this is interesting fact for me, as i will optimilize my PHP code in order to reduce this time to minimum. i was thinking to use some timestamp but as it will be in PHP, it mean that it should take time from server and therefore it is not fully representative from client browser time needed to load page :-( purpose : mywebpage.php - 23 s before optimalization mywebpage.php - 12 s after optimalization do you have any idea ? -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
Hi Chris, interesting thing, but i get the following error message : *Warning*: mail() [function.mailhttp://test4.rogtek.com/common/function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in */test4/common/sendmail.php* on line *119* how can i solve this by only PHP ? i do not have access to web hosting server or php.ini. thx, Alain. On Thu, Mar 13, 2008 at 12:57 AM, Chris [EMAIL PROTECTED] wrote: as you can see my Return-Path is still pointing on the wrong direction :-( any other idea ? return-path is set with the 5th mail() param: mail($to, $subject, $body, $headers, '[EMAIL PROTECTED]'); -- Postgresql php tutorials http://www.designmagick.com/ -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
hiChris, i've read several forums where this mail() function from PHP initial package is not so great. Therefore a lot of people use PHPMailer which is more convenient for that purpose...especially more flexible. thanks a lot for your help. Alain On Thu, Mar 13, 2008 at 8:35 AM, Chris [EMAIL PROTECTED] wrote: Alain Roger wrote: Hi Chris, interesting thing, but i get the following error message : *Warning*: mail() [function.mail http://test4.rogtek.com/common/function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in */test4/common/sendmail.php* on line *119* how can i solve this by only PHP ? i do not have access to web hosting server or php.ini. 1 of 2 options. 1) Find another host with safe-mode disabled 2) Use something like phpmailer to send your emails through an smtp server -- Postgresql php tutorials http://www.designmagick.com/ -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] mail function and headers
Hi, i'm playing a little bit with the mail function from PHP 5.2.4 and email headers. here is a snippet of my code: $headers = 'From: '.$email. .$fromname. \r\n.'Reply-To:'.$email.\r\n.'X-Mailer: PHP/' . phpversion(); if (mail($to, $subject, $body,$headers)) { ... } where: $fromname = $name.,.$firstname; when i run this code, and click on button reply-to it works well... i mean i reply to end user email address ($email). but i can see in my FROM-TO header space From: correct_email_address [mailto:[EMAIL PROTECTED]@including_partial_domain_name_of_mywebhosting] correct_email_address is referencing to $email without problem. but the problem comes from [EMAIL PROTECTED] _partial_domain_name_of_mywebhosting. in fact, before @ i get a crazy value and why the rest (after @) i get my webhosting domain name ? can i turn this strange email address to the same as $email, in order to have From : [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] ? thanks a lot, Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
ok i will try... what about UTF-8 to ensure unicode ? my website and especially the form which will send this email, will be filled in by several nationalities... spanish, english, french, slovak, german,,... so isn't it easier to set up utf-8 ? A. On Wed, Mar 12, 2008 at 4:11 PM, spacemarc [EMAIL PROTECTED] wrote: 2008/3/12, Daniel Brown [EMAIL PROTECTED]: You have the From: header parameters reversed. Try this: ? $headers = From: .$fromname. .$email.\r\n; $headers .= Reply-To: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; /* */ ? you can add these headers: $header = From: $fromname$email\n; $header .= Reply-To: $email\n; $header .= Return-Path: $email\n; $header .= X-Mailer: PHP/ . phpversion() . \n; $header .= MIME-Version: 1.0\n; $header .= Content-type: text/plain; charset=iso-8859-1\n; $header .= Content-Transfer-encoding: 7bit\n; Try it. -- Scripts: http://www.spacemarc.it -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Fwd: [PHP] mail function and headers
ok i will try... what about UTF-8 to ensure unicode ? my website and especially the form which will send this email, will be filled in by several nationalities... spanish, english, french, slovak, german,,... so isn't it easier to set up utf-8 ? A. On Wed, Mar 12, 2008 at 4:11 PM, spacemarc [EMAIL PROTECTED] wrote: 2008/3/12, Daniel Brown [EMAIL PROTECTED]: You have the From: header parameters reversed. Try this: ? $headers = From: .$fromname. .$email.\r\n; $headers .= Reply-To: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; /* */ ? you can add these headers: $header = From: $fromname$email\n; $header .= Reply-To: $email\n; $header .= Return-Path: $email\n; $header .= X-Mailer: PHP/ . phpversion() . \n; $header .= MIME-Version: 1.0\n; $header .= Content-type: text/plain; charset=iso-8859-1\n; $header .= Content-Transfer-encoding: 7bit\n; Try it. -- Scripts: http://www.spacemarc.it -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] mail function and headers
ok, so this is what i got and it is still remaining... :-( Received: from serdev ([127.0.0.1]) by home.com with MailEnable ESMTP; Wed, 12 Mar 2008 16:40:18 +0100 Date: Wed, 12 Mar 2008 16:40:18 +0100 Subject: subject 3 To: [EMAIL PROTECTED] From: raf, news [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] X-Mailer: PHP/5.2.4 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-encoding: 7bit as you can see my Return-Path is still pointing on the wrong direction :-( any other idea ? A. On Wed, Mar 12, 2008 at 4:11 PM, spacemarc [EMAIL PROTECTED] wrote: 2008/3/12, Daniel Brown [EMAIL PROTECTED]: You have the From: header parameters reversed. Try this: ? $headers = From: .$fromname. .$email.\r\n; $headers .= Reply-To: .$email.\r\n; $headers .= X-Mailer: PHP/.phpversion().\r\n; /* */ ? you can add these headers: $header = From: $fromname$email\n; $header .= Reply-To: $email\n; $header .= Return-Path: $email\n; $header .= X-Mailer: PHP/ . phpversion() . \n; $header .= MIME-Version: 1.0\n; $header .= Content-type: text/plain; charset=iso-8859-1\n; $header .= Content-Transfer-encoding: 7bit\n; Try it. -- Scripts: http://www.spacemarc.it -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] SMTP
Hi Ray, in my php.ini i have : SMTP = localhost smtp_port = 25 sendmail_from = [EMAIL PROTECTED] but my website (testing machine) is on localhost (which has also the IP 195.126.5.1) i think the problem is not in php.ini but more on SMTP server side (in settings, maybe password for authentication). A. On Sun, Mar 9, 2008 at 10:16 PM, Ray Hauge [EMAIL PROTECTED] wrote: Alain Roger wrote: Hi, i know that this is not necessary the best forum for that, but i need to get a real feedback and i guess you already faced the same issue as mine. basically, i develop php web application on windows XP platform. So i have apache 2.24 installed and PHP 5.2.4. now i would like to test if my application send emails, so i've checked my php.ini file and it seems ok. i tried to use IIS from windows to define a default SMTP server, but as my emails are not sent, i guess something is wrong with IIS. so does it exist a free SMTP server (similar that linux daemon) but running on windows XP ? if yes, where can i find it and what steps should i perform to be sure my emails are sent ? i do not want to transfer all my web application each time i want to test email sending... i would like to test it locally. thanks for your feedback. I could be wrong, but I thought that you had to specify the SMTP server in the php.ini file. http://us2.php.net/manual/en/ref.mail.php#ini.smtp now i would like to test if my application send emails, so i've checked my php.ini file and it seems ok. Maybe that means you already did that. The second issue might be that your SMTP server is MS Exchange, and it requires authentication. If that is the case, then search for php SMTP authentication: http://www.google.com/search?q=php+smtp+authenticationie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a -- Ray Hauge www.primateapplications.com -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] SMTP
Hi Ray, we tested it with telnet and it seems that it works... but my mail client does not receive it. :-( php mail function just tells me that email can not be delivered. here is the function: if (mail($to, $subject, $body)) { echo(pMessage successfully sent!/p); } else { echo(pMessage delivery failed.../p); } and it returns false... so message delivery failed. and i use on the same local PC so no ISP. server is used. Al. I'm curious what's the error you get when you use the mail function? Also, if you have SMTP running on port 25 you should be able to telnet localhost 25 and run some SMTP commands (EHLO, etc). Beware as well that some ISPs block port 25 so you may need to use their SMPT server instead of yours, if you can telnet your SMTP server but not send emails, then you either: 1 - Need to authenticate yourself against your SMTP server, or 2 - You have port 25 blocked, and need to use your ISP's server, or an external SMTP server that you can talk to on a port other than 25. Regards, Rob Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | TEL 954-607-4207 | FAX 954-337-2695 | Email: [EMAIL PROTECTED] | MSN Chat: [EMAIL PROTECTED] | SKYPE: bestplace | Web: bestplace.biz | Web: seo-diy.com -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] SMTP
Ok, thanks for info, i've downloaded the MailEnable SW for free and i was able to check that my PHP mail function really send correctly emails :-) thanks a lot, A. On Mon, Mar 10, 2008 at 3:33 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Sun, Mar 9, 2008 at 4:38 PM, Alain Roger [EMAIL PROTECTED] wrote: Hi, i know that this is not necessary the best forum for that, but i need to get a real feedback and i guess you already faced the same issue as mine. basically, i develop php web application on windows XP platform. So i have apache 2.24 installed and PHP 5.2.4. now i would like to test if my application send emails, so i've checked my php.ini file and it seems ok. i tried to use IIS from windows to define a default SMTP server, but as my emails are not sent, i guess something is wrong with IIS. So which HTTP server are you using? You stated earlier that you have Apache 2.24 on there, but here you say that you're using IIS. If you're using Apache, the IIS web server configuration will have nothing to do with anything. so does it exist a free SMTP server (similar that linux daemon) but running on windows XP ? I may be incorrect on this, but I'm pretty sure that Win2K/XP/Vista have Microsoft Exchange bundled in for SMTP. Check in Add/Remove Programs Windows Components Internet Information Services (I think, but I'm guessing I really don't use Windows that often). Even though it has the same name (IIS), in this case, it's the category for all Internet services. There should be something mentioning SMTP there. if yes, where can i find it and what steps should i perform to be sure my emails are sent ? Check the logs for Exchange/SMTP or whatever other MTA you decide to use and see if there's anything mentioned about the problem. It could be an authentication/negotiation issue. Also, check your Windows firewall (or third-party software) to ensure that you can connect to localhost:25. The easiest way to test this is as follows: Start Run Type: cmd Type: telnet localhost 25 If it connects, type: HELO localhost Note the response. You can then try sending a message through the server manually, if you'd like. While still connected via Telnet as shown above, type the following (replacing things as necessary): MAIL FROM: [EMAIL PROTECTED] RCPT TO: [EMAIL PROTECTED] DATA Subject: Testing Email from Telnet This is a test. . Always end with a period on a line of its own. That should show you what, if any, error messages are being kicked out by your SMTP server. -- /Dan Daniel P. Brown Senior Unix Geek ? while(1) { $me = $mind--; sleep(86400); } ? -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] SMTP
Hi, i know that this is not necessary the best forum for that, but i need to get a real feedback and i guess you already faced the same issue as mine. basically, i develop php web application on windows XP platform. So i have apache 2.24 installed and PHP 5.2.4. now i would like to test if my application send emails, so i've checked my php.ini file and it seems ok. i tried to use IIS from windows to define a default SMTP server, but as my emails are not sent, i guess something is wrong with IIS. so does it exist a free SMTP server (similar that linux daemon) but running on windows XP ? if yes, where can i find it and what steps should i perform to be sure my emails are sent ? i do not want to transfer all my web application each time i want to test email sending... i would like to test it locally. thanks for your feedback. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] send form by email with image spam controler
Hi, i would like to allow web site users to fill a form when they request information. the purpose is to have something standardized and later on to archive all those request into database. to avoid spammer, i was thinking to use a code image which change to each page refresh in order to be sure that user is human and not a simple robot :-) after that, all data should be sent by web site (maybe a particular email account or function) to email address [EMAIL PROTECTED] is there a simple way to do that or a better way ? moreover where could i find similar example ? especially about image checking... thx -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] string effect
Hi, since a long time now, i see that some paragraphs of text are cut off and the additional text is replaced by 3 dots. e.g: this is the original long text but without any sense and also stupid effect desired : this is the original long text... this is usually used for title articles or some long paragraphs. What is the basic rule ? Text is cut off based on (numbers of words, number of characters,..) ? what is the algorithm for such thing ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] Flash menu
Sorry to tell you that but i've tested my flash menu on Linux Mandriva and Redhat without any problem... :-) On Sat, Feb 23, 2008 at 10:14 AM, Børge Holen [EMAIL PROTECTED] wrote: On Saturday 23 February 2008 09:46:24 Alain Roger wrote: Hi, i have a problem with my animated web flash menu (+images+sounds). basically my menu in embedded into flash, and each time that i click on menu link, my flash is playing from start as it is integrated into each PHP pages. I know that this is not the topic of this forum, but i would like to know how you cope with such issue from PHP point of view ? i mean, did you play the flash menu on first page (like index.php e.g.) and after you have another menu, or do you use it through your complete website ? basically i found a lot of flash templates but nothing about PHP pages menu integration. I guess several of you have already done it so i need just your feedback on possible solutions. thanks a lot. oh, easy. we just skipped the whole bad flash idea. I'm on linux/ppc and flash doesn't even work here, how many other ppl do you not want to visit your page? -- --- Børge Holen http://www.arivene.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] flash with PHP
Hi, i would like to have a flash menu in my PHP website. this is no problem. My problem is how to exchange data between PHP andFlash (in both direction). i found a lot of posts on this theme, but nothing with really works under ActionScript 3 and PHP. does anyone already solved such topic ? thx. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] flash with PHP
this is right under actionscript 2.0... i'm working under actionscript 3.0 :-) On Feb 3, 2008 7:28 PM, Casey [EMAIL PROTECTED] wrote: On Feb 3, 2008, at 12:23 AM, Alain Roger [EMAIL PROTECTED] wrote: Hi, i would like to have a flash menu in my PHP website. this is no problem. My problem is how to exchange data between PHP andFlash (in both direction). i found a lot of posts on this theme, but nothing with really works under ActionScript 3 and PHP. does anyone already solved such topic ? thx. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008 var loadvars = new LoadVars(); http://www.google.com/search?q=loadvars -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] avoid server folder reading
this is what i already did before asking :-) On Jan 19, 2008 7:53 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Jan 19, 2008 1:46 PM, Alain Roger [EMAIL PROTECTED] wrote: Sorry if my post was not clear... in fact i would like to hide the contant of my webfolders and avoid user to see the index of folders... for sure users should be able to browse the website, but not to see its structure by browsing the index :-) then define an index.php file for each directory that routes the users appropriately. -nathan -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] avoid server folder reading
Hi, I would like to know how to avoid (using PHP code) any user to read the content of my website folder ? as my website is hosted by and external company, i do not have access to apache conf file. thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] avoid server folder reading
I should be able to setup a .htaccess file. On Jan 19, 2008 7:17 PM, Jochem Maas [EMAIL PROTECTED] wrote: Alain Roger schreef: Hi, I would like to know how to avoid (using PHP code) any user to read the content of my website folder ? what exactly are you trying to avoid being read? and in what context? as my website is hosted by and external company, i do not have access to apache conf file. are you able to use .htaccess files? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] avoid server folder reading
Sorry if my post was not clear... in fact i would like to hide the contant of my webfolders and avoid user to see the index of folders... for sure users should be able to browse the website, but not to see its structure by browsing the index :-) On Jan 19, 2008 7:41 PM, Richard Lynch [EMAIL PROTECTED] wrote: On Sat, January 19, 2008 11:57 am, Alain Roger wrote: I would like to know how to avoid (using PHP code) any user to read the content of my website folder ? as my website is hosted by and external company, i do not have access to apache conf file. You're not making a lot of sense, really... I you don't want ANY users to see ANYTHING that's in your folder, don't have a website. :-) The whole point of a website IS to show the world a bunch of stuff in that folder. So what you really must mean is (probably) one of these: hide the contents of some sub-folder hide some of things in that folder, but not others hide the included files hide specific content hide content from non-registered users Pick one and we can answer that, or you can Google for it. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] menu andfolder question
Hi, Serveral web sites have a menu and when you pass your mouse over a link, the browser statusbar only shows the folder where is located the file link, not the complete address including the file link. i mean if you take web site : http://www.zend.com/en/ when you pass your mouse cursor over Company link, it displays only : http://www.zend.com/en/company; in the statusbar of your browser. how is it possible whereas the link points to company/index.htm ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
Re: [PHP] menu andfolder question
ok, maybe i did not write my question well. i already used it because i setup the DirectoryIndex to index.php, index.html my concern for now, how to have the same behavior on my local computer (development computer) ? my computer has IP 200.170.1.2 (for example) so in my brower i type : 200.170.1.2/myWebSite this load my firt index.php webpage to browser... if i pass my mouse cursor over menu link Company, it displays http://200.170.1.2/myWebSite/200.170.1.2/company which is not great :-( here is the code i use : print div class='MenuItem4'a href='.$_SERVER['SERVER_NAME']./company'Company/a/div; thanks for help. A. On Jan 5, 2008 12:29 PM, chris smith [EMAIL PROTECTED] wrote: On Jan 5, 2008 10:23 PM, Alain Roger [EMAIL PROTECTED] wrote: Hi, Serveral web sites have a menu and when you pass your mouse over a link, the browser statusbar only shows the folder where is located the file link, not the complete address including the file link. i mean if you take web site : http://www.zend.com/en/ when you pass your mouse cursor over Company link, it displays only : http://www.zend.com/en/company; in the statusbar of your browser. how is it possible whereas the link points to company/index.htm ? In that example the link takes you to http://www.zend.com/en/company/ - not http://www.zend.com/en/company/index.htm index.htm is the default file it looks for based on apache config. See http://httpd.apache.org/docs/2.2/mod/mod_dir.html for more info. You can set it to whatever you like, but as a rule apache uses index.html or index.htm or index.php and asp/asp.net uses default.asp or default.aspx. -- Postgresql php tutorials http://www.designmagick.com/ -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008