php-general Digest 1 Dec 2009 00:52:43 -0000 Issue 6466

Topics (messages 300151 through 300166):

PHP+Firebird numeric format problem
        300151 by: helderfelipe
        300153 by: Philip Thompson

Re: string concatenation with fgets
        300152 by: Shawn McKenzie
        300161 by: aurfalien.gmail.com
        300162 by: Ashley Sheridan
        300163 by: aurfalien.gmail.com
        300164 by: Ashley Sheridan

Re: How to create a web application like igoogle?
        300154 by: Bob McConnell

Re: dbase_get_record_with_names; Very slow search!!!
        300155 by: Bob McConnell
        300157 by: Hernán
        300158 by: Rahul S. Johari
        300159 by: Rahul S. Johari

Re: PHP Equivalent to Java Jar or Python Eggs
        300156 by: Bob McConnell
        300160 by: Carlos Medina

Weird compile error
        300165 by: The Doctor

Storing (html and php) Content in MySQL - help
        300166 by: Allen McCabe

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
I have a query who is returning a NUMERIC(18,8) column.

In the IBExpert, te resultset is:

30,91271111
836,58000000

But PHP returns in a strange format:

3.91271111
83.658000000

Somebody help ?
-- 
View this message in context: 
http://old.nabble.com/PHP%2BFirebird-numeric-format-problem-tp26573276p26573276.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
On Nov 30, 2009, at 5:37 AM, helderfelipe wrote:

> I have a query who is returning a NUMERIC(18,8) column.
> 
> In the IBExpert, te resultset is:
> 
> 30,91271111
> 836,58000000
> 
> But PHP returns in a strange format:
> 
> 3.91271111
> 83.658000000
> 
> Somebody help ?

That "strange format" you're referring to looks like US_EN locale (or similar). 
I'm guessing you're not from the U.S.? =D If you need to reformat the output, 
consider....

http://php.net/number_format

Hope that helps.
~Philip

--- End Message ---
--- Begin Message ---
[email protected] wrote:
> So here is my final test code, notice the check for ' ' in the if.
> 
> Since I'm on Linux, this has to do with whats between the last LF and
> EOF which is nothing but this nothing will get printed out.
> 
> $file = fopen("somefile.txt", "r");
> while (! feof($file))
>     {
      $tmp = trim(fgets($file));
      if ($tmp != '')
>         {
          $names = $tmp;
>         }
>     print $names."sometext\n";
>     }
> fclose($file);
> 
> 

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Hi Shawn,

Your code looks cleaner then mine so i tried it and got the last entry in the txt file printed twice.


On Nov 30, 2009, at 7:07 AM, Shawn McKenzie wrote:

[email protected] wrote:
So here is my final test code, notice the check for ' ' in the if.

Since I'm on Linux, this has to do with whats between the last LF and
EOF which is nothing but this nothing will get printed out.

$file = fopen("somefile.txt", "r");
while (! feof($file))
   {
     $tmp = trim(fgets($file));
     if ($tmp != '')
       {
         $names = $tmp;
       }
   print $names."sometext\n";
   }
fclose($file);



--
Thanks!
-Shawn
http://www.spidean.com


--- End Message ---
--- Begin Message ---
On Mon, 2009-11-30 at 09:04 -0800, [email protected] wrote:

> Hi Shawn,
> 
> Your code looks cleaner then mine so i tried it and got the last entry  
> in the txt file printed twice.
> 
> 
> On Nov 30, 2009, at 7:07 AM, Shawn McKenzie wrote:
> 
> > [email protected] wrote:
> >> So here is my final test code, notice the check for ' ' in the if.
> >>
> >> Since I'm on Linux, this has to do with whats between the last LF and
> >> EOF which is nothing but this nothing will get printed out.
> >>
> >> $file = fopen("somefile.txt", "r");
> >> while (! feof($file))
> >>    {
> >      $tmp = trim(fgets($file));
> >      if ($tmp != '')
> >>        {
> >          $names = $tmp;
> >>        }
> >>    print $names."sometext\n";
> >>    }
> >> fclose($file);
> >>
> >>
> >
> > -- 
> > Thanks!
> > -Shawn
> > http://www.spidean.com
> 
> 


Remove the if statement and just print out $tmp. The while loop is going
over one extra time than you need, and on that final iteration, $tmp is
an empty string. The if statement only changes $name if $tmp is empty,
so it leaves it as it was, hence you getting the last line printed
twice. Printing out an empty string in this example won't do anything,
and the if statement is also pretty useless as it just copies the value
to another variable on a condition that will only result in the
side-effect you've noticed.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Hi Ash,

Actually I need the if because the code will print out an empty line and add "sometext" to it.

So without the if check for an empty line, at the end of the loop I'll get sometext. For example, if the file I am processing called somename.txt has

a
b
c

in it.  I'll have;

asometext
bsometext
csometext

but w/o the if check, I'll also have

sometext

as well.



On Nov 30, 2009, at 9:24 AM, Ashley Sheridan wrote:

On Mon, 2009-11-30 at 09:04 -0800, [email protected] wrote:

Hi Shawn,

Your code looks cleaner then mine so i tried it and got the last entry
in the txt file printed twice.


On Nov 30, 2009, at 7:07 AM, Shawn McKenzie wrote:

> [email protected] wrote:
>> So here is my final test code, notice the check for ' ' in the if.
>>
>> Since I'm on Linux, this has to do with whats between the last LF and
>> EOF which is nothing but this nothing will get printed out.
>>
>> $file = fopen("somefile.txt", "r");
>> while (! feof($file))
>>    {
>      $tmp = trim(fgets($file));
>      if ($tmp != '')
>>        {
>          $names = $tmp;
>>        }
>>    print $names."sometext\n";
>>    }
>> fclose($file);
>>
>>
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com



Remove the if statement and just print out $tmp. The while loop is going over one extra time than you need, and on that final iteration, $tmp is an empty string. The if statement only changes $name if $tmp is empty, so it leaves it as it was, hence you getting the last line printed twice. Printing out an empty string in this example won't do anything, and the if statement is also pretty useless as it just copies the value to another variable on a condition that will only result in the side-effect you've noticed.

Thanks,
Ash
http://www.ashleysheridan.co.uk




--- End Message ---
--- Begin Message ---
On Mon, 2009-11-30 at 09:40 -0800, [email protected] wrote:

> Hi Ash,
> 
> Actually I need the if because the code will print out an empty line  
> and add "sometext" to it.
> 
> So without the if check for an empty line, at the end of the loop I'll  
> get sometext.  For example, if the file I am processing called  
> somename.txt has
> 
> a
> b
> c
> 
> in it.  I'll have;
> 
> asometext
> bsometext
> csometext
> 
> but w/o the if check, I'll also have
> 
> sometext
> 
> as well.
> 
> 
> 
> On Nov 30, 2009, at 9:24 AM, Ashley Sheridan wrote:
> 
> > On Mon, 2009-11-30 at 09:04 -0800, [email protected] wrote:
> >>
> >> Hi Shawn,
> >>
> >> Your code looks cleaner then mine so i tried it and got the last  
> >> entry
> >> in the txt file printed twice.
> >>
> >>
> >> On Nov 30, 2009, at 7:07 AM, Shawn McKenzie wrote:
> >>
> >> > [email protected] wrote:
> >> >> So here is my final test code, notice the check for ' ' in the if.
> >> >>
> >> >> Since I'm on Linux, this has to do with whats between the last  
> >> LF and
> >> >> EOF which is nothing but this nothing will get printed out.
> >> >>
> >> >> $file = fopen("somefile.txt", "r");
> >> >> while (! feof($file))
> >> >>    {
> >> >      $tmp = trim(fgets($file));
> >> >      if ($tmp != '')
> >> >>        {
> >> >          $names = $tmp;
> >> >>        }
> >> >>    print $names."sometext\n";
> >> >>    }
> >> >> fclose($file);
> >> >>
> >> >>
> >> >
> >> > --
> >> > Thanks!
> >> > -Shawn
> >> > http://www.spidean.com
> >>
> >>
> >
> > Remove the if statement and just print out $tmp. The while loop is  
> > going over one extra time than you need, and on that final  
> > iteration, $tmp is an empty string. The if statement only changes  
> > $name if $tmp is empty, so it leaves it as it was, hence you getting  
> > the last line printed twice. Printing out an empty string in this  
> > example won't do anything, and the if statement is also pretty  
> > useless as it just copies the value to another variable on a  
> > condition that will only result in the side-effect you've noticed.
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> 


Then put the print statement inside the if, not the assignation,
otherwise you will always get that last line!

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
From: Ali Asghar Toraby Parizy

> How can i create a web page that include some gadgets? what kind of
> technology do i have to use to creating web pages like igoogle and
gmail?
> How can i create them by php?

You probably want to look at a portal, something like LifeRay. If that
is too far out, then maybe Drupal is more to your liking.

Bob McConnell

--- End Message ---
--- Begin Message ---
From: news

> even though the dbf has 10K records
> Fox can't spend "minutes" to found a match
> by the way, its very strange
> to have 35 columns in a table/dbf or whatever....
> 
> pay attention to the comment of Ashley
> in Fox, you should:
> 
> SELECT directory
> INDEX on phone_number to idx_directory_phone
> - or -
> INDEX on phone_number tag phone of cdx_directory
> 
> i worked with Fox
> with dbfs of 2 millions of records
> and the speed is amazing -- using indexes of course!

It has been a long time since I worked with either FoxPro or dBase, but
IIRC, both required you to explicitly create any indexes they might
need. They don't have query analyzers like Postgres, MySQL and other
modern DBMS engines.

Bob McConnell

--- End Message ---
--- Begin Message ---
of course, i agree
xbase needed indexes to work properly


Bob McConnell escribió:
From: news

even though the dbf has 10K records
Fox can't spend "minutes" to found a match
by the way, its very strange
to have 35 columns in a table/dbf or whatever....

pay attention to the comment of Ashley
in Fox, you should:

SELECT directory
INDEX on phone_number to idx_directory_phone
- or -
INDEX on phone_number tag phone of cdx_directory

i worked with Fox
with dbfs of 2 millions of records
and the speed is amazing -- using indexes of course!

It has been a long time since I worked with either FoxPro or dBase, but
IIRC, both required you to explicitly create any indexes they might
need. They don't have query analyzers like Postgres, MySQL and other
modern DBMS engines.

Bob McConnell




---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 091130-0, 30/11/2009
Tested on: 30/11/2009 01:17:03 p.m.
avast! - copyright (c) 1988-2009 ALWIL Software.
http://www.avast.com



--- End Message ---
--- Begin Message ---

On Nov 30, 2009, at 11:07 AM, Bob McConnell wrote:

From: news

even though the dbf has 10K records
Fox can't spend "minutes" to found a match
by the way, its very strange
to have 35 columns in a table/dbf or whatever....

pay attention to the comment of Ashley
in Fox, you should:

SELECT directory
INDEX on phone_number to idx_directory_phone
- or -
INDEX on phone_number tag phone of cdx_directory

i worked with Fox
with dbfs of 2 millions of records
and the speed is amazing -- using indexes of course!

It has been a long time since I worked with either FoxPro or dBase, but
IIRC, both required you to explicitly create any indexes they might
need. They don't have query analyzers like Postgres, MySQL and other
modern DBMS engines.

Bob McConnell

That is correct! But in my case - I DO indeed have Indexes created manually. FoxPro created .CDX files for Indexes. The problem is - does PHP use those indexes?

---
Rahul Sitaram Johari
Founder, Internet Architects Group, Inc.

[Email] [email protected]
[Web]   http://www.rahulsjohari.com





--- End Message ---
--- Begin Message ---

On Nov 30, 2009, at 11:41 AM, Bob McConnell wrote:

From: Rahul S. Johari

On Nov 30, 2009, at 11:07 AM, Bob McConnell wrote:

From: news

even though the dbf has 10K records
Fox can't spend "minutes" to found a match
by the way, its very strange
to have 35 columns in a table/dbf or whatever....

pay attention to the comment of Ashley
in Fox, you should:

SELECT directory
INDEX on phone_number to idx_directory_phone
- or -
INDEX on phone_number tag phone of cdx_directory

i worked with Fox
with dbfs of 2 millions of records
and the speed is amazing -- using indexes of course!

It has been a long time since I worked with either FoxPro or dBase,
but
IIRC, both required you to explicitly create any indexes they might
need. They don't have query analyzers like Postgres, MySQL and other
modern DBMS engines.

Bob McConnell

That is correct! But in my case - I DO indeed have Indexes created
manually. FoxPro created .CDX files for Indexes. The problem is - does

PHP use those indexes?

And the secondary question is whether you have enough memory to
'permanently' cache those indexes? They don't improve performance very
much unless they are kept in local memory all the time. The only way to
fix this is to move to a real DBMS engine.

Bob McConnell



Well that might be a problem. The indexes, along with the files, are stored on the network and they are accessed over the network, not locally. Although to be fair; I have tried using a copy of the DBF & it's Index File (CDX) locally and it didn't make any difference to the search.

Either way, it all points in the same direction ... using a modern DBMS. It's just a problem on our end because all our customer data is in FoxPro databases and all the other applications are written for those FoxPro databases.

---
Rahul Sitaram Johari
Founder, Internet Architects Group, Inc.

[Email] [email protected]
[Web]   http://www.rahulsjohari.com





--- End Message ---
--- Begin Message ---
From: [email protected]

> Has anyone done any work towards packaging of PHP in
> a manner similar to jar or eggs? I was working on a
> project the other day with a lot of class files and
> thought this would be a cool, simple way to deploy
> the app. 

Nope, too much like work. We just wrap it up in an RPM which is
installed in a local repository. Then we use yum to install it on each
server in the cluster.

Bob McConnell


--- End Message ---
--- Begin Message ---
[email protected] schrieb:
Has anyone done any work towards packaging of PHP in a manner similar to jar or eggs? I was working on a project the other day with a lot of class files and thought this would be a cool, simple way to deploy the app.


Hi,
you can check the Phar solution from PHP

Regards

Carlos

--- End Message ---
--- Begin Message ---
Has anyone seen this?



Script started on Mon Nov 30 11:30:16 2009
doctor.nl2k.ab.ca//usr/source/php-5.3.1$ make libs/libphp5.bundle
gcc  -I/usr/include -g -g -O0 -Wall   -avoid-version -module -L/usr/contrib/lib 
-L/usr/contrib//lib -L/usr/X11R6/lib -L/usr/contrib/lib/mysql 
-L/usr/contrib/pgsql/lib ext/date/php_date.o ext/date/lib/astro.o 
ext/date/lib/dow.o ext/date/lib/parse_date.o ext/date/lib/parse_tz.o 
ext/date/lib/timelib.o ext/date/lib/tm2unixtime.o ext/date/lib/unixtime2tm.o 
ext/date/lib/parse_iso_intervals.o ext/date/lib/interval.o ext/ereg/ereg.o 
ext/ereg/regex/regcomp.o ext/ereg/regex/regexec.o ext/ereg/regex/regerror.o 
ext/ereg/regex/regfree.o ext/libxml/libxml.o ext/openssl/openssl.o 
ext/openssl/xp_ssl.o ext/pcre/pcrelib/pcre_chartables.o 
ext/pcre/pcrelib/pcre_ucd.o ext/pcre/pcrelib/pcre_compile.o 
ext/pcre/pcrelib/pcre_config.o ext/pcre/pcrelib/pcre_exec.o 
ext/pcre/pcrelib/pcre_fullinfo.o ext/pcre/pcrelib/pcre_get.o 
ext/pcre/pcrelib/pcre_globals.o ext/pcre/pcrelib/pcre_info.o 
ext/pcre/pcrelib/pcre_maketables.o ext/pcre/pcrelib/pcre_newline.o 
ext/pcre/pcrelib/pcre_ord2utf8.o ext/pcre/pcrelib/pcre_refcount.o 
ext/pcre/pcrelib/pcre_study.o ext/pcre/pcrelib/pcre_tables.o 
ext/pcre/pcrelib/pcre_try_flipped.o ext/pcre/pcrelib/pcre_valid_utf8.o 
ext/pcre/pcrelib/pcre_version.o ext/pcre/pcrelib/pcre_xclass.o 
ext/pcre/php_pcre.o ext/sqlite3/sqlite3.o ext/sqlite3/libsqlite/sqlite3.o 
ext/zlib/zlib.o ext/zlib/zlib_fopen_wrapper.o ext/zlib/zlib_filter.o 
ext/bz2/bz2.o ext/bz2/bz2_filter.o ext/calendar/calendar.o ext/calendar/dow.o 
ext/calendar/french.o ext/calendar/gregor.o ext/calendar/jewish.o 
ext/calendar/julian.o ext/calendar/easter.o ext/calendar/cal_unix.o 
ext/ctype/ctype.o ext/curl/interface.o ext/curl/multi.o ext/curl/streams.o 
ext/dba/dba.o ext/dba/dba_cdb.o ext/dba/dba_dbm.o ext/dba/dba_gdbm.o 
ext/dba/dba_ndbm.o ext/dba/dba_db1.o ext/dba/dba_db2.o ext/dba/dba_db3.o 
ext/dba/dba_db4.o ext/dba/dba_flatfile.o ext/dba/dba_inifile.o 
ext/dba/dba_qdbm.o ext/dba/libcdb/cdb.o ext/dba/libcdb/cdb_make.o 
ext/dba/libcdb/uint32.o ext/dba/libflatfile/flatfile.o 
ext/dba/libinifile/inifile.o ext/dom/php_dom.o ext/dom/attr.o 
ext/dom/document.o ext/dom/domerrorhandler.o ext/dom/domstringlist.o 
ext/dom/domexception.o ext/dom/namelist.o ext/dom/processinginstruction.o 
ext/dom/cdatasection.o ext/dom/documentfragment.o ext/dom/domimplementation.o 
ext/dom/element.o ext/dom/node.o ext/dom/string_extend.o 
ext/dom/characterdata.o ext/dom/documenttype.o ext/dom/domimplementationlist.o 
ext/dom/entity.o ext/dom/nodelist.o ext/dom/text.o ext/dom/comment.o 
ext/dom/domconfiguration.o ext/dom/domimplementationsource.o 
ext/dom/entityreference.o ext/dom/notation.o ext/dom/xpath.o 
ext/dom/dom_iterators.o ext/dom/typeinfo.o ext/dom/domerror.o 
ext/dom/domlocator.o ext/dom/namednodemap.o ext/dom/userdatahandler.o 
ext/fileinfo/fileinfo.o ext/fileinfo/libmagic/apprentice.o 
ext/fileinfo/libmagic/apptype.o ext/fileinfo/libmagic/ascmagic.o 
ext/fileinfo/libmagic/cdf.o ext/fileinfo/libmagic/cdf_time.o 
ext/fileinfo/libmagic/compress.o ext/fileinfo/libmagic/encoding.o 
ext/fileinfo/libmagic/fsmagic.o ext/fileinfo/libmagic/funcs.o 
ext/fileinfo/libmagic/is_tar.o ext/fileinfo/libmagic/magic.o 
ext/fileinfo/libmagic/print.o ext/fileinfo/libmagic/readcdf.o 
ext/fileinfo/libmagic/readelf.o ext/fileinfo/libmagic/softmagic.o 
ext/filter/filter.o ext/filter/sanitizing_filters.o 
ext/filter/logical_filters.o ext/filter/callback_filter.o ext/ftp/php_ftp.o 
ext/ftp/ftp.o ext/gd/gd.o ext/gd/gdcache.o ext/gd/libgd/gd_compat.o 
ext/gd/libgd/gd_filter.o ext/gd/libgd/gd_pixelate.o ext/gd/libgd/gd_arc.o 
ext/gd/libgd/gd_rotate.o ext/gd/libgd/gd_color.o ext/gmp/gmp.o ext/hash/hash.o 
ext/hash/hash_md.o ext/hash/hash_sha.o ext/hash/hash_ripemd.o 
ext/hash/hash_haval.o ext/hash/hash_tiger.o ext/hash/hash_gost.o 
ext/hash/hash_snefru.o ext/hash/hash_whirlpool.o ext/hash/hash_adler32.o 
ext/hash/hash_crc32.o ext/hash/hash_salsa.o ext/iconv/iconv.o ext/json/json.o 
ext/json/utf8_to_utf16.o ext/json/utf8_decode.o ext/json/JSON_parser.o 
ext/mcrypt/mcrypt.o ext/mysql/php_mysql.o ext/pdo/pdo.o ext/pdo/pdo_dbh.o 
ext/pdo/pdo_stmt.o ext/pdo/pdo_sql_parser.o ext/pdo/pdo_sqlstate.o 
ext/pdo_sqlite/pdo_sqlite.o ext/pdo_sqlite/sqlite_driver.o 
ext/pdo_sqlite/sqlite_statement.o ext/pgsql/pgsql.o ext/phar/util.o 
ext/phar/tar.o ext/phar/zip.o ext/phar/stream.o ext/phar/func_interceptors.o 
ext/phar/dirstream.o ext/phar/phar.o ext/phar/phar_object.o 
ext/phar/phar_path_check.o ext/posix/posix.o ext/reflection/php_reflection.o 
ext/session/session.o ext/session/mod_files.o ext/session/mod_mm.o 
ext/session/mod_user.o ext/simplexml/simplexml.o ext/simplexml/sxe.o 
ext/spl/php_spl.o ext/spl/spl_functions.o ext/spl/spl_engine.o 
ext/spl/spl_iterators.o ext/spl/spl_array.o ext/spl/spl_directory.o 
ext/spl/spl_exceptions.o ext/spl/spl_observer.o ext/spl/spl_dllist.o 
ext/spl/spl_heap.o ext/spl/spl_fixedarray.o ext/sqlite/sqlite.o 
ext/sqlite/sess_sqlite.o ext/sqlite/pdo_sqlite2.o 
ext/sqlite/libsqlite/src/opcodes.o ext/sqlite/libsqlite/src/parse.o 
ext/sqlite/libsqlite/src/encode.o ext/sqlite/libsqlite/src/auth.o 
ext/sqlite/libsqlite/src/btree.o ext/sqlite/libsqlite/src/build.o 
ext/sqlite/libsqlite/src/delete.o ext/sqlite/libsqlite/src/expr.o 
ext/sqlite/libsqlite/src/func.o ext/sqlite/libsqlite/src/hash.o 
ext/sqlite/libsqlite/src/insert.o ext/sqlite/libsqlite/src/main.o 
ext/sqlite/libsqlite/src/os.o ext/sqlite/libsqlite/src/pager.o 
ext/sqlite/libsqlite/src/printf.o ext/sqlite/libsqlite/src/random.o 
ext/sqlite/libsqlite/src/select.o ext/sqlite/libsqlite/src/table.o 
ext/sqlite/libsqlite/src/tokenize.o ext/sqlite/libsqlite/src/update.o 
ext/sqlite/libsqlite/src/util.o ext/sqlite/libsqlite/src/vdbe.o 
ext/sqlite/libsqlite/src/attach.o ext/sqlite/libsqlite/src/btree_rb.o 
ext/sqlite/libsqlite/src/pragma.o ext/sqlite/libsqlite/src/vacuum.o 
ext/sqlite/libsqlite/src/copy.o ext/sqlite/libsqlite/src/vdbeaux.o 
ext/sqlite/libsqlite/src/date.o ext/sqlite/libsqlite/src/where.o 
ext/sqlite/libsqlite/src/trigger.o ext/standard/crypt_freesec.o 
ext/standard/crypt_blowfish.o ext/standard/php_crypt_r.o ext/standard/array.o 
ext/standard/base64.o ext/standard/basic_functions.o ext/standard/browscap.o 
ext/standard/crc32.o ext/standard/crypt.o ext/standard/cyr_convert.o 
ext/standard/datetime.o ext/standard/dir.o ext/standard/dl.o ext/standard/dns.o 
ext/standard/exec.o ext/standard/file.o ext/standard/filestat.o 
ext/standard/flock_compat.o ext/standard/formatted_print.o ext/standard/fsock.o 
ext/standard/head.o ext/standard/html.o ext/standard/image.o 
ext/standard/info.o ext/standard/iptc.o ext/standard/lcg.o ext/standard/link.o 
ext/standard/mail.o ext/standard/math.o ext/standard/md5.o 
ext/standard/metaphone.o ext/standard/microtime.o ext/standard/pack.o 
ext/standard/pageinfo.o ext/standard/quot_print.o ext/standard/rand.o 
ext/standard/soundex.o ext/standard/string.o ext/standard/scanf.o 
ext/standard/syslog.o ext/standard/type.o ext/standard/uniqid.o 
ext/standard/url.o ext/standard/var.o ext/standard/versioning.o 
ext/standard/assert.o ext/standard/strnatcmp.o ext/standard/levenshtein.o 
ext/standard/incomplete_class.o ext/standard/url_scanner_ex.o 
ext/standard/ftp_fopen_wrapper.o ext/standard/http_fopen_wrapper.o 
ext/standard/php_fopen_wrapper.o ext/standard/credits.o ext/standard/css.o 
ext/standard/var_unserializer.o ext/standard/ftok.o ext/standard/sha1.o 
ext/standard/user_filters.o ext/standard/uuencode.o ext/standard/filters.o 
ext/standard/proc_open.o ext/standard/streamsfuncs.o ext/standard/http.o 
ext/tokenizer/tokenizer.o ext/tokenizer/tokenizer_data.o ext/xml/xml.o 
ext/xml/compat.o ext/xmlreader/php_xmlreader.o ext/xmlwriter/php_xmlwriter.o 
TSRM/TSRM.o TSRM/tsrm_strtok_r.o TSRM/tsrm_virtual_cwd.o main/main.o 
main/snprintf.o main/spprintf.o main/php_sprintf.o main/safe_mode.o 
main/fopen_wrappers.o main/alloca.o main/php_scandir.o main/php_ini.o 
main/SAPI.o main/rfc1867.o main/php_content_types.o main/strlcpy.o 
main/strlcat.o main/mergesort.o main/reentrancy.o main/php_variables.o 
main/php_ticks.o main/network.o main/php_open_temporary_file.o main/php_logos.o 
main/output.o main/getopt.o main/streams/streams.o main/streams/cast.o 
main/streams/memory.o main/streams/filter.o main/streams/plain_wrapper.o 
main/streams/userspace.o main/streams/transports.o main/streams/xp_socket.o 
main/streams/mmap.o main/streams/glob_wrapper.o Zend/zend_language_parser.o 
Zend/zend_language_scanner.o Zend/zend_ini_parser.o Zend/zend_ini_scanner.o 
Zend/zend_alloc.o Zend/zend_compile.o Zend/zend_constants.o 
Zend/zend_dynamic_array.o Zend/zend_execute_API.o Zend/zend_highlight.o 
Zend/zend_llist.o Zend/zend_opcode.o Zend/zend_operators.o 
Zend/zend_ptr_stack.o Zend/zend_stack.o Zend/zend_variables.o Zend/zend.o 
Zend/zend_API.o Zend/zend_extensions.o Zend/zend_hash.o Zend/zend_list.o 
Zend/zend_indent.o Zend/zend_builtin_functions.o Zend/zend_sprintf.o 
Zend/zend_ini.o Zend/zend_qsort.o Zend/zend_multibyte.o Zend/zend_ts_hash.o 
Zend/zend_stream.o Zend/zend_iterators.o Zend/zend_interfaces.o 
Zend/zend_exceptions.o Zend/zend_strtod.o Zend/zend_gc.o Zend/zend_closures.o 
Zend/zend_float.o Zend/zend_objects.o Zend/zend_object_handlers.o 
Zend/zend_objects_API.o Zend/zend_default_classes.o Zend/zend_execute.o 
sapi/apache2handler/mod_php5.o sapi/apache2handler/sapi_apache2.o 
sapi/apache2handler/apache_config.o sapi/apache2handler/php_functions.o 
sapi/embed/php_embed.o main/internal_functions.o  -lpq -lmysqlclient -lmcrypt 
-lltdl -liconv -lgmp -lgd -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lssl 
-lcrypto -ldb-4.5 -lcurl -lbz2 -lz -lssl -lcrypto -lm -ldl -lxml2 -lz -lm 
-lcurl -lssl -lcrypto -ldl -lz -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm 
-lxml2 -lz -lm -lxml2 -lz -lm -lapr-1 -laprutil-1 -lapr -laprutil-0 -lapr-0  -o 
libs/libphp5.bundle && cp libs/libphp5.bundle libs/libphp5.so
ld: warning: libssl.so.0.9.8, needed by /usr/contrib/lib/libldap-2.3.so.0, may 
conflict with libssl.so.1.0.0
ld: warning: libcrypto.so.0.9.8, needed by /usr/contrib/lib/libldap-2.3.so.0, 
may conflict with libcrypto.so.1.0.0
/usr/lib/crt1.o: In function `__start':
/usr/lib/crt1.o(.text+0x8f): undefined reference to `main'
sapi/apache2handler/sapi_apache2.o: In function `php_apache_sapi_ub_write':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:78: undefined 
reference to `ap_rwrite'
sapi/apache2handler/sapi_apache2.o: In function `php_apache_sapi_send_headers':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:160: undefined 
reference to `ap_set_content_type'
sapi/apache2handler/sapi_apache2.o: In function `php_apache_sapi_read_post':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:185: undefined 
reference to `ap_get_brigade'
sapi/apache2handler/sapi_apache2.o: In function `php_apache_sapi_flush':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:291: undefined 
reference to `ap_rflush'
sapi/apache2handler/sapi_apache2.o: In function `php_apache_sapi_log_message':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:304: undefined 
reference to `ap_log_error'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:306: undefined 
reference to `ap_log_rerror'
sapi/apache2handler/sapi_apache2.o: In function 
`php_apache_sapi_log_message_ex':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:313: undefined 
reference to `ap_log_rerror'
sapi/apache2handler/sapi_apache2.o: In function `php_apache_add_version':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:389: undefined 
reference to `ap_add_version_component'
sapi/apache2handler/sapi_apache2.o: In function `php_pre_config':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:398: undefined 
reference to `ap_mpm_query'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:400: undefined 
reference to `ap_log_error'
sapi/apache2handler/sapi_apache2.o: In function `php_apache_request_ctor':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:472: undefined 
reference to `ap_auth_type'
sapi/apache2handler/sapi_apache2.o: In function `php_handler':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:588: undefined 
reference to `ap_add_common_vars'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:589: undefined 
reference to `ap_add_cgi_vars'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:630: undefined 
reference to `ap_update_mtime'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:631: undefined 
reference to `ap_set_last_modified'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:665: undefined 
reference to `ap_pass_brigade'
sapi/apache2handler/sapi_apache2.o: In function `php_ap2_register_hook':
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:686: undefined 
reference to `ap_hook_pre_config'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:687: undefined 
reference to `ap_hook_post_config'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:688: undefined 
reference to `ap_hook_handler'
/usr/source/php-5.3.1/sapi/apache2handler/sapi_apache2.c:689: undefined 
reference to `ap_hook_child_init'
sapi/apache2handler/apache_config.o: In function `php_apache_phpini_set':
/usr/source/php-5.3.1/sapi/apache2handler/apache_config.c:116: undefined 
reference to `ap_server_root_relative'
sapi/apache2handler/php_functions.o: In function `php_apache_lookup_uri':
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:67: undefined 
reference to `ap_sub_req_lookup_uri'
sapi/apache2handler/php_functions.o: In function `zif_virtual':
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:89: undefined 
reference to `ap_destroy_sub_req'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:99: undefined 
reference to `ap_rflush'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:101: undefined 
reference to `ap_run_sub_req'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:103: undefined 
reference to `ap_destroy_sub_req'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:106: undefined 
reference to `ap_destroy_sub_req'
sapi/apache2handler/php_functions.o: In function `zif_apache_lookup_uri':
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:162: undefined 
reference to `ap_destroy_sub_req'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:167: undefined 
reference to `ap_destroy_sub_req'
sapi/apache2handler/php_functions.o: In function `php_apache_get_version':
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:328: undefined 
reference to `ap_get_server_version'
sapi/apache2handler/php_functions.o: In function `zif_apache_get_modules':
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:355: undefined 
reference to `ap_loaded_modules'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:356: undefined 
reference to `ap_loaded_modules'
sapi/apache2handler/php_functions.o: In function `zm_info_apache':
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:382: undefined 
reference to `ap_loaded_modules'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:383: undefined 
reference to `ap_loaded_modules'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:413: undefined 
reference to `unixd_config'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:413: undefined 
reference to `unixd_config'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:413: undefined 
reference to `unixd_config'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:418: undefined 
reference to `ap_mpm_query'
/usr/source/php-5.3.1/sapi/apache2handler/php_functions.c:428: undefined 
reference to `ap_server_root'
*** Error code 1

Stop.
doctor.nl2k.ab.ca//usr/source/php-5.3.1$ exit
exit

Script done on Mon Nov 30 11:33:12 2009
-- 
Member - Liberal International  This is [email protected] Ici [email protected]
God, Queen and country! Never Satan President Republic! Beware AntiChrist 
rising! 
http://twitter.com/rootnl2k http://www.myspace.com/502748630 
Merry Christmas 2009 and Happy New Year 2010

--- End Message ---
--- Begin Message ---
I have been trying to wrap my mind around how to accomplish this for a few
days, and done estensive searching on Google.

I know there are free CMS systems available for download, but I want to
write my own code so I can maintain it and extend it, I need it to be
customizable.

So far what I have worked up is this:

The mysql row contains a page_id field, title field, content field, and
sidebar content field.

in index.php:
include("module.php")
$username = findLoggedinUsername()

eval ($content)


in module.php:
$result = mysqlquery("select * from content where page_id = get['id']")
$row = fetcharray9$result)
$content = $row['content']
$title = $row['title']

etc.

The content mysql field contains:

$ct = <<<END
<p>Welcome $username, to the interweb</p>
END;

echo $ct


In the heredoc, I can use variables like $username, but not like
$row['username'].

So far this method works just fine, however I want to be able to edit the
content through the website itself. Am I on the right track or is this
awkward? I am implementing a new, login system (mine isn't secure enough)
and I want to implement it correctly.

How should I go about storing content (which may or may not include php)
into a page content field?

--- End Message ---

Reply via email to