zencart php question

2006-04-21 Thread Aaron
Hi all,

I am trying to set up a shopping cart site for my son using zen cart.

When I try running the install program I get the following:

Warning: main(version.php): failed to open stream: No such file or
directory in
/var/www/aamehl/aamehl.net/yehci.com/zen-cart/zc_install/includes/application_top.php
on line 25

Fatal error: main(): Failed opening required 'version.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/aamehl/aamehl.net/yehci.com/zen-cart/zc_install/includes/application_top.php
on line 25

I gather I need to set some parameter in the configure.php file?

What I did was create a zencart subfolder on the remote server to test
things out until he gets a site name etc.

could this be a problem?

Thanks
Aaron

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: php question

2002-11-19 Thread herouth
Quoting Andre E. Bar'yudin [EMAIL PROTECTED]:


 I assume that the
 problem is related to how PHP handles the response from your browser.
 Mozilla probably doesn't provide the response character set, during form
 submission and Konqueror does, hence the difference between them.  Now,
 when PHP doesn't have a response content type it probably assumes some
 default (say, iso-8859-1) and escapes every out-of-the-range character
 by HTML entities.

OK, a little test - which I told Arye to do, but decided to do myself: I wrote a
small CGI:

#!/bin/bash
echo Content-type: text/plain
echo
cat -

And I created a small form:

HTML
HEAD
TITLETest/TITLE
META HTTP-EQUIV=Content-type VALUE=text/html; Charset=utf8
/HEAD
BODY
FORM ACTION=cgi-bin/foo.cgi METHOD=POST
INPUT TYPE=text NAME=foobar SIZE=50BR
INPUT TYPE=submit VALUE=send
/FORM
/BODY
/HTML

And then I used the form, and submitted the Hebrew name Avraham in Mozilla and
Konqueror.

Result in Mozilla:
foobar=%26%231488%3B%26%231489%3B%26%231512%3B%26%231492%3B%26%231501%3B

Result in Konqueror:
foobar=%D7%90%D7%91%D7%A8%D7%94%D7%9D

So it is definitely *not* PHP which sends out the HTML entities, but Mozilla
itself - as you can see, the cgi itself is pure bash.

Herouth

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: php question - SOLUTION

2002-11-19 Thread herouth
Going a bit further on my research, I found how to make Mozilla behave like
Konqueror, and do it in a standard way.

In the FORM tag, you have to add an ACCEPT-CHARSET=UTF-8 attribute, like this:

FORM ACTION=cgi-bin/foo.cgi METHOD=POST ACCEPT-CHARSET=UTF-8

Now go and convince everybody who has a web site to add that thingy to their site...

(Thanks to Andre for pointing out that it maybe a charset issue in the client).

Herouth

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: php question

2002-11-19 Thread Andre E. Bar'yudin
On Втр, Ноя 19, 2002 at 10:01:36 +0200, [EMAIL PROTECTED] wrote:
 Quoting Andre E. Bar'yudin [EMAIL PROTECTED]:
 
 
  I assume that the
  problem is related to how PHP handles the response from your browser.
  Mozilla probably doesn't provide the response character set, during form
  submission and Konqueror does, hence the difference between them.  Now,
  when PHP doesn't have a response content type it probably assumes some
  default (say, iso-8859-1) and escapes every out-of-the-range character
  by HTML entities.

I've repeated your test, with a little correction to the meta tag.  My
HTML reads:

HTML
HEAD
  TITLETest/TITLE
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
/HEAD
BODY
  FORM ACTION=cgi-bin/test.sh METHOD=POST
INPUT TYPE=text NAME=foobar SIZE=50BR
INPUT TYPE=submit VALUE=send
/FORM
/BODY
/HTML

The test.sh script is the exact copy of yours.  The output for the
Hebrew word ivrit reads:

foobar=%D7%A2%D7%91%D7%A8%D7%99%D7%AA

Browser version:
Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2b) Gecko/20021017

Now, when I put YOUR meta-tag, the result for the same input is:

foobar=%26%231506%3B%26%231489%3B%26%231512%3B%26%231497%3B%26%231514%3B

which corresponds to your results.

The reason is, that in my opinion utf8 is not a legal codepage name
(at least for Mozilla, although Java eats it as an alias to UTF-8, as
far as I remember).  Probably Konqueror does support this name too.

So, maybe the original poster just made the same mistake - used
something else instead of UTF-8 as his charset option.

Regards,

Andre.

 OK, a little test - which I told Arye to do, but decided to do myself: I wrote a
 small CGI:
 
 #!/bin/bash
 echo Content-type: text/plain
 echo
 cat -
 
 And I created a small form:
 
 HTML
 HEAD
 TITLETest/TITLE
 META HTTP-EQUIV=Content-type VALUE=text/html; Charset=utf8
 /HEAD
 BODY
 FORM ACTION=cgi-bin/foo.cgi METHOD=POST
 INPUT TYPE=text NAME=foobar SIZE=50BR
 INPUT TYPE=submit VALUE=send
 /FORM
 /BODY
 /HTML
 
 And then I used the form, and submitted the Hebrew name Avraham in Mozilla and
 Konqueror.
 
 Result in Mozilla:
 foobar=%26%231488%3B%26%231489%3B%26%231512%3B%26%231492%3B%26%231501%3B
 
 Result in Konqueror:
 foobar=%D7%90%D7%91%D7%A8%D7%94%D7%9D
 
 So it is definitely *not* PHP which sends out the HTML entities, but Mozilla
 itself - as you can see, the cgi itself is pure bash.
 
 Herouth

-- 
==
# Andre E. Bar'yudin #
#   Phone: (972)-54-882-026   ICQ: 48036924  #
# Home page: http://www.cs.huji.ac.il/~baryudin/ #
==



msg23412/pgp0.pgp
Description: PGP signature


Re: php question

2002-11-19 Thread Arie Folger
On Tuesday 19 November 2002 03:01, [EMAIL PROTECTED] wrote:
 OK, a little test - which I told Arye to do, but decided to do myself: I
 wrote a small CGI:
snip
 So it is definitely *not* PHP which sends out the HTML entities, but
 Mozilla itself - as you can see, the cgi itself is pure bash.

Now, let's thank you also for the coup de grace:
Going a bit further on my research, I found how to make Mozilla behave like
Konqueror, and do it in a standard way. In the FORM tag, you have to add an 
ACCEPT-CHARSET=UTF-8 attribute, like this:
FORM ACTION=cgi-bin/foo.cgi METHOD=POST ACCEPT-CHARSET=UTF-8
Now go and convince everybody who has a web site to add that thingy to their 
site...

Remember I am patching phpnuke for this purpose. I will afterwards happily 
submit my changes to phpnuke (although in their maze of websites and subwebs 
I still have to figure out where this goes), hoping that eventually this will 
be part of the main sourcetree.

BTW, which behaviour is more html standards compliant?

Arie



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: php question

2002-11-19 Thread Arie Folger
On Tuesday 19 November 2002 14:33, Andre E. Bar'yudin wrote:
 The reason is, that in my opinion utf8 is not a legal codepage name
 (at least for Mozilla, although Java eats it as an alias to UTF-8, as
 far as I remember).  Probably Konqueror does support this name too.

 So, maybe the original poster just made the same mistake - used
 something else instead of UTF-8 as his charset option.

No, the original poster did not do such a mistake (if it ain't clear enough, I 
am the original poster). However, Herouth's suggestion to add 
accept-charset=utf-8 seems promising. I just executed my perl script to 
recursively fix the problem, and once the mail is read I hope to confirm 
everything is in order.

Arie

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: php question

2002-11-18 Thread Andre E. Bar'yudin
On Вск, Ноя 17, 2002 at 03:17:13 -0500, Arie Folger wrote:
 On Sunday 17 November 2002 13:46, Ilya Konstantinov wrote:
  On Sun, Nov 17, 2002 at 10:12:39AM +0200, [EMAIL PROTECTED] wrote:
   Has your input come from Mozilla? It does that. To make sure, write a cgi
   script (if you don't trust PHP) that displays its input as text/plain,
   and create a form in UTF8 that sends to that script.
 
  Actually, both IE5 and Mozilla will encode characters which aren't
  present in the charset of the page which contains the HTML form, as
  Unicode entities (e.g. #blah;).
 snip
  To avoid this behavior, simply make this page, which contains the
  HTML form, in any Unicode encoding -- UTF-8, UTF-7 or UCS-2 (yuck!).
 
 But I stated in my first email that I patched phpnuke to do utf-8. The first 
 thing I did was to change the charset= attribute.I even patched the xml 
 container (standard feature of xhtml) because it also specifies 
 a charset, but there is no difference.
 
 I must say that I now tested the site with konqueror (see below why I am using 
 galeon for this site) and indeed it is a mozilla unexpected (to me) behaviour 
 which caused the translation of utf8 to numbered entities. I think I will 
 write a maintenance script that will access the database directly and chage 
 numbered entitiesback to utf8, easier than changing parts of the php code 
 which I didn't research sufficiently. Is there a way to disable this 
 translation feature of mozilla and ie?

[NOTE: I ASSUME THAT THE DISCUSSION IS TOTALLY OFF-TOPIC]

I do not think that mozilla translates UTF-8 to HTML entities.  I work
constantly with UTF-8-based applications (which I've written myself),
that submit data via HTTP and store it in database.  Working with
Mozilla (starting from 1.0+) and MS SQL, PostgreSQL, Oracle the
real/correct UTF-8 is stored in the database.  I assume that the
problem is related to how PHP handles the response from your browser.
Mozilla probably doesn't provide the response character set, during form
submission and Konqueror does, hence the difference between them.  Now,
when PHP doesn't have a response content type it probably assumes some
default (say, iso-8859-1) and escapes every out-of-the-range character
by HTML entities.

The conclusion is that you need to persuade PHP that the submitted
response is encoded in UTF-8.  I don't know how exactly to do it.  Maybe
disabling magic quotes or related stuff will help...

 The whole matter is complicated by the fact that konqueror will crash on large 
 texts pasted into textarea boxes of forms, and I am posting long papers 
 (20-30 pages), so I have been using galeon.
 
 Arie
 -- 
 It is absurd to seek to give an account of the matter to a man 
 who cannot himself give an account of anything; for insofar as
 he is already like this, such a man is no better than a vegetable.
-- Book IV of Aristotle's Metaphysics
 
 
 
 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word unsubscribe in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]

-- 
==
# Andre E. Bar'yudin #
#   Phone: (972)-54-882-026   ICQ: 48036924  #
# Home page: http://www.cs.huji.ac.il/~baryudin/ #
==



msg23393/pgp0.pgp
Description: PGP signature


Re: php question

2002-11-17 Thread frodo
AF which turns ampersands, quotes and angle brackets into entities,
AF as well as htmlentities(), which turns every non latin1
AF character into a numbered entity. You'd think I found my
AF function, but the problem is that the latter function does not
AF show up in any of the php files, so I am at loss as to what
AF function does the translation.

Would http://www.php.net/manual/en/function.htmlentities.php help you?
Look also into get_html_translation_table().

-- 
[EMAIL PROTECTED]  \/  There shall be counsels taken
Stanislav Malyshev  /\  Stronger than Morgul-spells
phone +972-50-624945/\  JRRT LotR.
whois:!SM8333


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: php question

2002-11-17 Thread Arie Folger
On Sunday 17 November 2002 03:12, [EMAIL PROTECTED] wrote:
 Quoting Arie Folger [EMAIL PROTECTED]:
  Hi,
 
  I modified phpnuke to allo utf8, and started filling the site with
  content (although for now the search function has been disabled because I
  expect it not to do Hebrew yet). Then, after viewing a Hebrew article as
  html source, I noticed that instead of unicode chararacters I got
  numbered entities. A quick look at teh MySql table revealed that
  everything was stored in numbered entities (what a waste of space).

 Has your input come from Mozilla? It does that. To make sure, write a cgi
 script (if you don't trust PHP) that displays its input as text/plain, and
 create a form in UTF8 that sends to that script.

Yes, and, having investigated  [EMAIL PROTECTED]'s suggestion:
 Would http://www.php.net/manual/en/function.htmlentities.php help you?
 Look also into get_html_translation_table().

.. I know now that not even that funtion (which, BTW, was not juxtaposed with 
htmlspecialchar() in the php book that comes with quanta 3.0) features in 
phpnuke, so Herouth must be right (but I'll check it today).

Anyway, as far as the main problem:
  Problem is that paragraphs in numbered entities are not entirely
  displayed as rtl, in that the paragraphs are left justified and the
  bulleted lists are backwards, even though the entire section is between
  span
  dir=rtl.../span tags.

 Spans are not the answer, because bulleted lists are considered blocked
 entities. Each of them should have a DIR=RTL or an appropriate CSS entry.
 To the best of my knowledge, there is no difference between numbered
 entities and proper characters, because at least theoretically, all
 numbered entities are converted to the proper characters before the
 rendering is done.

I tried that, and it is a solution. Note that adding a dir=rtl attribute in 
the body tag will help, too, but will mess up all those left to right blocks. 
Is there something other than span that will have the same effect, including 
on li and p elements?

Thanks guys, (the php tip and the mozilla tip where both very much 
appreciated,)

Arie

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: php question

2002-11-17 Thread Ilya Konstantinov
On Sun, Nov 17, 2002 at 10:12:39AM +0200, [EMAIL PROTECTED] wrote:
 Has your input come from Mozilla? It does that. To make sure, write a cgi script
 (if you don't trust PHP) that displays its input as text/plain, and create a
 form in UTF8 that sends to that script.

Actually, both IE5 and Mozilla will encode characters which aren't
present in the charset of the page which contains the HTML form, as
Unicode entities (e.g. #blah;).

!-- Side node:
In some ways, it's nice, since it fixes many broken web applications,
which have ISO-8859-1 hardcoded into them. On the other hand, it's sad
to know those web applications are suspectible for cross-site
scripting attacks, since apparently they don't safely encode the
user-given strings they output later to the HTML stream.
--

To avoid this behavior, simply make this page, which contains the
HTML form, in any Unicode encoding -- UTF-8, UTF-7 or UCS-2 (yuck!).

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: php question

2002-11-17 Thread Arie Folger
On Sunday 17 November 2002 13:46, Ilya Konstantinov wrote:
 On Sun, Nov 17, 2002 at 10:12:39AM +0200, [EMAIL PROTECTED] wrote:
  Has your input come from Mozilla? It does that. To make sure, write a cgi
  script (if you don't trust PHP) that displays its input as text/plain,
  and create a form in UTF8 that sends to that script.

 Actually, both IE5 and Mozilla will encode characters which aren't
 present in the charset of the page which contains the HTML form, as
 Unicode entities (e.g. #blah;).
snip
 To avoid this behavior, simply make this page, which contains the
 HTML form, in any Unicode encoding -- UTF-8, UTF-7 or UCS-2 (yuck!).

But I stated in my first email that I patched phpnuke to do utf-8. The first 
thing I did was to change the charset= attribute.I even patched the xml 
container (standard feature of xhtml) because it also specifies 
a charset, but there is no difference.

I must say that I now tested the site with konqueror (see below why I am using 
galeon for this site) and indeed it is a mozilla unexpected (to me) behaviour 
which caused the translation of utf8 to numbered entities. I think I will 
write a maintenance script that will access the database directly and chage 
numbered entitiesback to utf8, easier than changing parts of the php code 
which I didn't research sufficiently. Is there a way to disable this 
translation feature of mozilla and ie?

The whole matter is complicated by the fact that konqueror will crash on large 
texts pasted into textarea boxes of forms, and I am posting long papers 
(20-30 pages), so I have been using galeon.

Arie
-- 
It is absurd to seek to give an account of the matter to a man 
who cannot himself give an account of anything; for insofar as
he is already like this, such a man is no better than a vegetable.
   -- Book IV of Aristotle's Metaphysics



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




php question

2002-11-16 Thread Arie Folger
Hi,

I modified phpnuke to allo utf8, and started filling the site with content 
(although for now the search function has been disabled because I expect it 
not to do Hebrew yet). Then, after viewing a Hebrew article as html source, I 
noticed that instead of unicode chararacters I got numbered entities. A quick 
look at teh MySql table revealed that everything was stored in numbered 
entities (what a waste of space).

Problem is that paragraphs in numbered entities are not entirely displayed as 
rtl, in that the paragraphs are left justified and the bulleted lists are 
backwards, even though the entire section is between span 
dir=rtl.../span tags.

So I figured somewhere in that software must be a function to turn everything 
that is not latin1 into entities. I couldn't find such a user defined 
function (yet) but did find one standard function called htmlspecialchar(), 
which turns ampersands, quotes and angle brackets into entities, as well as 
htmlentities(), which turns every non latin1 character into a numbered 
entity. You'd think I found my function, but the problem is that the latter 
function does not show up in any of the php files, so I am at loss as to what 
function does the translation.

My question: what other php function may be doing translation of unicode to 
numbered entities? What should I look for? Anybody familiar with phpnuke out 
here?

Arie
-- 
It is absurd to seek to give an account of the matter to a man 
who cannot himself give an account of anything; for insofar as
he is already like this, such a man is no better than a vegetable.
   -- Book IV of Aristotle's Metaphysics

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]