php-windows Digest 26 Jul 2002 17:20:35 -0000 Issue 1259

Topics (messages 14959 through 14978):

Re: mssql functions not working properly
        14959 by: Salve Tinkerworth

php+window98+apache+sybase client
        14960 by: cckinkin

Re: Next GD headache
        14961 by: Ross Fleming
        14967 by: Aron Pilhofer

PHP Integration...
        14962 by: Brian McGarvie

[CROSS POST] PHP Meetup & Texas PHP Users
        14963 by: Jay Blanchard
        14965 by: Manuel Lemos

Probally A newbie Question: Why does it try to download my php file?
        14964 by: BorgKiller
        14968 by: Brian McGarvie
        14971 by: BorgKiller

Re: [PHP-DB] Re: [CROSS POST] PHP Meetup & Texas PHP Users
        14966 by: Pierre-Alain Joye

Converting to a sting
        14969 by: R.S. Herhuth
        14973 by: Brian McGarvie
        14974 by: Scott Carr

Strange Errors when using Interdev as editor
        14970 by: Salve Tinkerworth

Re: pretty simple-but i can't figure it out
        14972 by: Tim Blackwell
        14975 by: Scott Carr
        14976 by: Scott Carr

Nearest Office by Zipcode
        14977 by: R.S. Herhuth

PostgreSQL
        14978 by: Hadi

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 the same type of setup and am having the same problems you are
having. I can't get the following to work:

$result=mssql_query($sql) or die('message');

It dies even when the query is successful and I've parsed it in QA. Instead
this is working for me (somewhat):

$result=mssql_query($sql1);
$result=mssql_query("SELECT @@ERROR As 'ErrorCode'");
$error=mssql_result($result,0,0);
if($error['ErrorCode'] != 0) {
 echo $error['ErrorCode'];
 echo $sql1;
 die('Inserting Campaign failed');
}

This will plug along fine until all of the sudden tons of warnings pop up
and I have to bounce IIS to get it going correctly again. I haven't figured
out whats going on yet but I just re-applied SP2 to the Win2k server running
IIS and am crossing my fingers.

Salve

"David Elliott" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Greetings All,
>
> I posted this on Friday but now I have cut it down to make it readable and
> stand alone
>
> W2K server
> MS SQL 2000
> PHP 4.2.1 (in CGI mode)
>
> I have a valid bit of SQL, but PHP does not correctly run it
>
> below is bit of code
>
> ==========8<=============================================================
> <?
>   define("Server","xxxxxxxxx");
>   define("User","xxxxxx");
>   define("PWord","xxxxxx");
>
> mssql_connect(Server,User,PWord);
>
>     $ExcQry = "
> begin transaction
> set nocount on
> declare
>   @PerID int
>
> insert into
> Item (ItemTypeid,Name,LastUpdated,LegacyId)
> Values(42,'CCompanyName',Current_timestamp,'".date ("mdGis")."')
>
> set @PerId = @@identity
>
> insert into
> person
> (ItemId,CompanyName,FirstName,LastName)
> Values
> (@PerId,'PCompanyName','PFirstName','PLastName')
>
> set nocount off
>
> commit
>
> select @PerId itemid
>
> ";
>     $Result = mssql_query($ExcQry);
>
>     list($ItemId)=mssql_fetch_row($Result);
>
> echo $ItenId;
>
> ==========8<=============================================================
>
> The code does get passes and run as there are results in the database, but
I
> get no result set back. I have also run it in the query analyser, it runs.
I
> have also watched it in the profiler and seen it work.
>
> --
>  BBFN,                     _______________________________________________
>   David                   |    David  Elliott    |   Software Engineer
|
>  _________________________|  [EMAIL PROTECTED] | PGP Key ID 0x650F4534
|
> | Don't be a baby. I know what I'm doing. --Wednesday.
|
>


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

Dear all,

I don't know how to set php configure to let php to communicate the sybase server.

My computer has php4, window98, apache and sybase client.
I can use the brower to see simple php program.

However, i cannot connect to sybase.

Thanks and Regards
CK Chan
==================================================================
至尊偶像鈴聲選舉:http://sms.sina.com.hk/ringtone/


--- End Message ---
--- Begin Message ---
1: The same way you registered the first variable!

2: in the url itself:
<IMG "SRC=graph_gen_page.php?paramater1=12&parameter2=14&paramater3=7">

> -----Original Message-----
> From: Aron Pilhofer [mailto:[EMAIL PROTECTED]]
> Sent: 25 July 2002 23:40
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Next GD headache
>
>
> Short question: I can't find this in the docs anywhere. Is it possible to
> register more than one session variable at a time? If so, what is the
> syntax?
>
> Long question: I am trying to generate a bar chart to accompany
> some figures
> I calculate. I have the code to generate the bar chart in a separate page,
> and I call the script as an image. So far so good. The thing I
> can't figure
> out is how best to pass variables to the graphic code. I thought about
> setting them as globals, but I thought that might be problematic in some
> way. The only other idea I had was to set them as session variables -- and
> that works, but it strikes me as (i dunno) inelegant???
>
> Suggestions anyone?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
> 1: The same way you registered the first variable!

So...

session_start();
session_register("var1");
session_register("var2");

??

> 2: in the url itself:
> <IMG "SRC=graph_gen_page.php?paramater1=12&parameter2=14&paramater3=7">


Ugh! Of course. I hadn't even considered that. Duh. It didn't even occur to
me that you can pass variables to an image source... but why not? Thanks.



> > -----Original Message-----
> > From: Aron Pilhofer [mailto:[EMAIL PROTECTED]]
> > Sent: 25 July 2002 23:40
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Next GD headache
> >
> >
> > Short question: I can't find this in the docs anywhere. Is it possible
to
> > register more than one session variable at a time? If so, what is the
> > syntax?
> >
> > Long question: I am trying to generate a bar chart to accompany
> > some figures
> > I calculate. I have the code to generate the bar chart in a separate
page,
> > and I call the script as an image. So far so good. The thing I
> > can't figure
> > out is how best to pass variables to the graphic code. I thought about
> > setting them as globals, but I thought that might be problematic in some
> > way. The only other idea I had was to set them as session variables --
and
> > that works, but it strikes me as (i dunno) inelegant???
> >
> > Suggestions anyone?
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


--- End Message ---
--- Begin Message ---
OK, I have undertaken a project which requires...

1) Integration with Outlook (yes the application will only ever be run on
windows).
2) Integration with Credit Checking agencies (UK).

Has anyone ever done any of the 2 above? If so any insight would be verymuch
appreciated!!!

Cheers,

    Brian...


--- End Message ---
--- Begin Message ---
Howdy all!

Just wanted to remind everyone that sign-up for the PHP Meetup is still in
progress at http://php.meetup.com . At latest count there are 289 folks
signed up world-wide with the top 10 cities being;

Washington DC (9 members)
Toronto (9 members)
Leeds, UK (8 members)
London, England (8 members)
Amsterdam (7 members)
Melbourne (6 members)
Atlanta (5 members)
Oakland-Alameda, CA (5 members)
Manhattan (below 42nd St) (5 members)
Montr嶧l (4 members)

Why do something like this? Meet other developers, networking (you can never
tell when you're going to need another pair of hands for a project),
networking (you can never tell when someone is going to need to hire extra
hands for a project), and networking (you get the idea). Sign up soon! There
are thousands of PHP folks out there, spread the word.

On another note ....

TEXAS PHP Users!
php.meetup stats ...

Dallas, TX (2 members)
Austin, TX (2 members)
San Antonio, TX (2 members)
Bryan-College Station, TX (2 members)
Longview-Marshall, TX (1 members)

I would like to determine interest in having a PHP Mini-Conference in Texas,
perhaps in the January - April time frame. Due to some contacts that I have
I can get us discount rates at the T Bar M Tennis & Conference Center in New
Braunfels, with a meal package, and other non-PHP activities. There are many
golf courses in the area, T Bar M offers high and low rope course
instruction, there's tennis, water sports, close proximity to San Antonio,
The Hill Country, Gruene (where the oldest dance hall in Texas features tons
of stars as well as up-and-comers!), and much more.

You do not have to live in Texas to want to attend. Heck, you don't even
have to be a PHP developer, IT Managers who want to find out why PHP is good
for them, folks who have an interest in PHP but haven't taken the firt step,
or other computer types who just want to hang out with other computer types.

We could have a program of paper presentations, or it could be more of a
social/networking event. Heck, maybe someone such as an author or part of
the Zend group would be a guest speaker. There are many possibilities. Send
your thoughts on this to me directly at [EMAIL PROTECTED]
If you know of other PHP developers who are not on any of the lists here,
please forward this information to them if you think that they would be
interested.

I look forward to your responses...

Jay


--- End Message ---
--- Begin Message ---
Hello,

On 07/26/2002 09:25 AM, Jay Blanchard wrote:
> I look forward to your responses...

I am afraid this is going to be a major fiasco. The idea is good but the 
  meetup site is very badly implemented. It is very confusing. It is 
very hard to find how to choose a different city from those that are 
suggested.

When you finally realize that the closest city is too far away from 
where you live, you have an hard time to discover how to suggest a 
different city. When you think you have found to how to suggest a new 
city and do it, it seems that you're suggestion is being ignored.

Is there really anybody behind this site? It seems that it was something 
that somebody did but is not really maintaining it.

Another point is the choice of the day of the week is not very fortunate 
either because most people that work can't attend during weekdays. Even 
Friday night would have been a better idea.

Anyway, it shows that for the small numbers of users that subscribed to 
the various sites are just a reflex of how badly organized the 
initiative is. It is a pity. Maybe it should be better to organize 
something independent of the Meetup site which is only forcing 
inconvenient constraints of place and day of the week.

-- 

Regards,
Manuel Lemos

--- End Message ---
--- Begin Message ---
I was using Linux for my intranet. It worked fine, but my cousin told me
about how I could also use windows as a intranet server. I got rid of Linux
(It was giving me a headache) When I installed Apache and php. When I go to
access install.php (Or any php file), it downloads it off localhost (My
computer) but never executes it, but it just returns me to a index screen of
my files. I have checked the config files, they look ok. I have loaded the
module into the httpd.conf and it looks like it's running, but it still
doesn't work. Anyone have any ideas?

Thanks
BorgKiller


--- End Message ---
--- Begin Message ---
you need both:

 LoadModule -----------

&

AddType application/x-httpd-php .php

"Borgkiller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I was using Linux for my intranet. It worked fine, but my cousin told me
> about how I could also use windows as a intranet server. I got rid of
Linux
> (It was giving me a headache) When I installed Apache and php. When I go
to
> access install.php (Or any php file), it downloads it off localhost (My
> computer) but never executes it, but it just returns me to a index screen
of
> my files. I have checked the config files, they look ok. I have loaded the
> module into the httpd.conf and it looks like it's running, but it still
> doesn't work. Anyone have any ideas?
>
> Thanks
> BorgKiller
>
>


--- End Message ---
--- Begin Message ---
I tryed that too. Didnt work. Any other ideas?

"Brian McGarvie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> you need both:
>
>  LoadModule -----------
>
> &
>
> AddType application/x-httpd-php .php
>
> "Borgkiller" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> > I was using Linux for my intranet. It worked fine, but my cousin told me
> > about how I could also use windows as a intranet server. I got rid of
> Linux
> > (It was giving me a headache) When I installed Apache and php. When I go
> to
> > access install.php (Or any php file), it downloads it off localhost (My
> > computer) but never executes it, but it just returns me to a index
screen
> of
> > my files. I have checked the config files, they look ok. I have loaded
the
> > module into the httpd.conf and it looks like it's running, but it still
> > doesn't work. Anyone have any ideas?
> >
> > Thanks
> > BorgKiller
> >
> >
>
>


--- End Message ---
--- Begin Message ---
Something better for this need currently works good in France: 
http://www.communautephp.com/

For all of us who read french. 

The way of decide where and when are given to the users via a forum. This system works 
pretty well here.

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

In order to please MSSQL I have a situation where I must turn a result
into string before SQL will accept it.  Is there a command I can use to
convert a numeric into a string that SQL will accept?

RON
--- End Message ---
--- Begin Message ---
you can use the following:

$myVar = (string) $myVar;

Also look up...

http://www.php.net/manual/en/function.settype.php

"R.S. Herhuth" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> In order to please MSSQL I have a situation where I must turn a result
> into string before SQL will accept it.  Is there a command I can use to
> convert a numeric into a string that SQL will accept?
>
> RON


--- End Message ---
--- Begin Message ---
You shouldn't have to change it to a string.  The problem is more than likely
your SQL statement itself.

To insert a string in a database you need to do the following:

$strSQL = "INSERT INTO {TABLE} VALUES('$myVar', '$myothervar')";

Notice the ' marks surrounding the variables, this tells MySQL that you want to
use these as strings.  You can also use " if you would like.

-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting Brian McGarvie <[EMAIL PROTECTED]>:

> you can use the following:
> 
> $myVar = (string) $myVar;
> 
> Also look up...
> 
> http://www.php.net/manual/en/function.settype.php
> 
> "R.S. Herhuth" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> >
> > In order to please MSSQL I have a situation where I must turn a result
> > into string before SQL will accept it.  Is there a command I can use to
> > convert a numeric into a string that SQL will accept?
> >
> > RON
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
I am getting some real peculiar behaviour. The following works great:

$result=mssql_query($sql1);
$result=mssql_query("SELECT @@ERROR As 'ErrorCode'");
$error=mssql_result($result,0,0);
if($error['ErrorCode'] != 0) {
 echo $error['ErrorCode'];
 echo $sql1;
 die('Inserting Campaign failed');
}

  This will work fine for a while unless I open the file in interdev to make
a change somewhere. It will then produce errors for SQL that parses with no
problems. If I make any kind of change again with interdev to these lines
without changing the actual code and save the file it starts working again!

Salve

ps. Still cannot get the simple $result=mssql_query($sql1) or
die('message'); to work either. Could this also be an interdev thing? Is it
a file format issue with unrecognized row delimiters in the script file?
Truly pulling my hair out over here. :-P


--- End Message ---
--- Begin Message ---
thanks a lot, that helped.  now, why doesn't the link below work


echo "<a href ='/myweb2/more$i.php'onClick="window.open('/myweb2/more$i.php'
,'popup','width=645,height=450,resizable=1,scrollbars=no');return false;">
more...</a>";




"Peter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You could also make a function to simplify things if you have lots of
links
>
> function dolink($href, $text) {
> $text = "<A HREF=\"$href\">$text</A>";
> return $text;
> }
>
> then calling
> echo dolink("page1.php","Link to page 1");
> would output a link to page1.php with the text Link to page 1
>
>
>
> "Tim Blackwell" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > how do you make a link using PHP it's very simple in html and
javascript,
> > but i can't seem to figure out how to make a simple link?
> >
> > i'm making a news site and would like to have enormous articles have a
> nice
> > little more...... link at the bottom of the first portion of the
article.
> >
> > any help would be much appreciated,
> >
> > thanks,
> >
> > tim
> >
> >
>
>


--- End Message ---
--- Begin Message ---
There is no space between the $i.php' onClick="
-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting Tim Blackwell <[EMAIL PROTECTED]>:

> thanks a lot, that helped.  now, why doesn't the link below work
> 
> 
> echo "<a href ='/myweb2/more$i.php'onClick="window.open('/myweb2/more$i.php'
> ,'popup','width=645,height=450,resizable=1,scrollbars=no');return false;">
> more...</a>";
> 
> 
> 
> 
> "Peter" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > You could also make a function to simplify things if you have lots of
> links
> >
> > function dolink($href, $text) {
> > $text = "<A HREF=\"$href\">$text</A>";
> > return $text;
> > }
> >
> > then calling
> > echo dolink("page1.php","Link to page 1");
> > would output a link to page1.php with the text Link to page 1
> >
> >
> >
> > "Tim Blackwell" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > how do you make a link using PHP it's very simple in html and
> javascript,
> > > but i can't seem to figure out how to make a simple link?
> > >
> > > i'm making a news site and would like to have enormous articles have a
> > nice
> > > little more...... link at the bottom of the first portion of the
> article.
> > >
> > > any help would be much appreciated,
> > >
> > > thanks,
> > >
> > > tim
> > >
> > >
> >
> >
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
There is no space between the $i.php' onClick="
-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting Tim Blackwell <[EMAIL PROTECTED]>:

> thanks a lot, that helped.  now, why doesn't the link below work
> 
> 
> echo "<a href ='/myweb2/more$i.php'onClick="window.open('/myweb2/more$i.php'
> ,'popup','width=645,height=450,resizable=1,scrollbars=no');return false;">
> more...</a>";
> 
> 
> 
> 
> "Peter" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > You could also make a function to simplify things if you have lots of
> links
> >
> > function dolink($href, $text) {
> > $text = "<A HREF=\"$href\">$text</A>";
> > return $text;
> > }
> >
> > then calling
> > echo dolink("page1.php","Link to page 1");
> > would output a link to page1.php with the text Link to page 1
> >
> >
> >
> > "Tim Blackwell" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > how do you make a link using PHP it's very simple in html and
> javascript,
> > > but i can't seem to figure out how to make a simple link?
> > >
> > > i'm making a news site and would like to have enormous articles have a
> > nice
> > > little more...... link at the bottom of the first portion of the
> article.
> > >
> > > any help would be much appreciated,
> > >
> > > thanks,
> > >
> > > tim
> > >
> > >
> >
> >
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---

I finally finished my "Nearest Office by Zipcode" finder PHP app.  Many
people had expressed interest in this script so I would like to know
where I can post it to share with the group.  

The script uses a point to point calculation based on longitude and
latitude from a zipcode database that can either be bought, or
downloaded freely on the internet(it is older so many new zips may not
be in the db).  There is a neccessary conversion script that converts
the latitude and longitude into radians and writes those values to the
database, and then the main script which uses the user supplied zipcode
to compare to a table of known office location (zipcode, latitude and
longitude expressed in radians) and cacluates the distance between each
office and the users zipcode.  It is quite accurate, although if you
compare the mileage to a mapping program like Mapquest it may be
different because they are using street calculations whereas this script
is a point to point calculation.

The script is very simple but would not be possible without the help of
many people on the list.

Thanks,
Ron
--- End Message ---
--- Begin Message ---
How can i enable PostgreSQL module?
I have installed PHP 4 on IIS5, Windows 2000



--- End Message ---

Reply via email to