[PHP-DB] Warning: ocilogon(): _oci_open_server: � in d:\program files\apache group\apache\htdocs\codebase\oci8test2.php on line 3

2005-02-01 Thread Bijilal Poikayil
Hi

I am getting the error below while trying to execute
the code below:

Warning: ocilogon(): _oci_open_server: â in
d:\program files\apache
group\apache\htdocs\codebase\oci8test2.php on line 3



I have - Apache/1.3.33 (Win32) configured to run with 
PHP/4.3.10 and Oracle 10g Database. Everything running
on the same box.

I followed the note below to set it up.
http://www.oracle.com/technology/tech/opensource/php/apache/inst_php_apache_windows.html

Any help on this will be greatly appreciated.

Thanks in advance.

- Biji




__ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] timestamp

2005-02-01 Thread Balwant Singh
on echoing $timestamp i m getting "Fri Jan 28 19:53:09 2005" but on
echoing $date i m getting 1970-01-01.  
also i m getting full info. by phpinfo()

i m using php 4.2.2 , apache 2.0 and rad hat 9.

with best wishes
balwant



On Tue, 2005-02-01 at 12:40, graeme wrote:
> what output do you get from the following?
> 
>  $timestamp = "Fri Jan 28 19:53:09 2005";
> echo $timestamp ."";
> $date = date("Y-m-d",strtotime($timestamp));
> echo $date ."";
> phpinfo();
> ?>
> 
> graeme wrote:
> 
> > The code works fine on my system, so what version of php are you using 
> > and what is your operating system?
> >
> > graeme.
> >
> > Balwant Singh wrote:
> >
> >> i just copy your code and paste into a test file. 
> >>  >> $timestamp = "Fri Jan 28 19:53:09 2005";
> >> $date = date("Y-m-d",strtotime($timestamp));
> >> echo $date;
> >>
> >> ?>
> >>
> >> with best wishes
> >> balwant
> >>
> >>
> >>
> >> On Tue, 2005-02-01 at 10:33, Bastien Koert wrote:
> >>  
> >>
> >>> pls post relevant code
> >>>
> >>> bastien
> >>>
> >>>   
> >>>
>  From: Balwant Singh <[EMAIL PROTECTED]>
>  Reply-To: [EMAIL PROTECTED]
>  To: Bastien Koert <[EMAIL PROTECTED]>
>  CC: php-db@lists.php.net
>  Subject: RE: [PHP-DB] timestamp
>  Date: 01 Feb 2005 10:13:40 +0530
> 
>  dear bastien
> 
>  thanks for the reply... but i checked it again but it is giving only
>  1970-01-01.  is something else needs to be done.
> 
>  with best wishes
>  balwant
> 
> 
> 
>  On Mon, 2005-01-31 at 19:46, Bastien Koert wrote:
>  
> 
> > This code :
> >
> >  > $timestamp = "Fri Jan 28 19:53:09 2005";
> >
> > $date = date("Y-m-d",strtotime($timestamp));
> >
> > echo $date;
> >
> > ?>
> >
> > gave me this result
> >
> > 2005-01-28
> >
> > Exactly as it should.
> >
> > Bastien
> >
> >   
> >
> >> From: Balwant Singh <[EMAIL PROTECTED]>
> >> Reply-To: [EMAIL PROTECTED]
> >> To: Bastien Koert <[EMAIL PROTECTED]>
> >> CC: php-db@lists.php.net
> >> Subject: RE: [PHP-DB] timestamp
> >> Date: 31 Jan 2005 10:02:04 +0530
> >>
> >> thanks
> >> I tried strtotime also but getting 1970-01-01 not 2005-01-28.  my
> >> problem is that the date is given to me in string format i.e.Fri 
> >> Jan 28
> >> 19:53:09 2005.  Any other help will be appreciated.
> >>
> >> with best wishes
> >> balwant
> >>
> >>
> >> On Sat, 2005-01-29 at 22:45, Bastien Koert wrote:
> >> 
> >>
> >>> try
> >>>
> >>> $date = date("Y-m-d",strtotime($timestamp));
> >>>
> >>> Best thing to use if you want to do calcs on date/time data is 
> >>> to   
> >>
>  use
>  
> 
> >> the
> >> 
> >>
> >>> unix time stamp...translates the timestamp into seconds since
> >>> 01-01-1970...Much simpler to use in sql queries
> >>>
> >>> Bastien
> >>>
> >>>   
> >>>
>  From: Balwant Singh <[EMAIL PROTECTED]>
>  Reply-To: [EMAIL PROTECTED]
>  To: php-db@lists.php.net
>  Subject: [PHP-DB] timestamp
>  Date: 29 Jan 2005 19:47:35 +0530
> 
>  i am facing a problem
> 
>  i have timestamp in string format --> Fri Jan 28 19:53:09 2005 
>  now 
> >>>
>  i
>  
> 
>  want to get the date from it.  is it possible? pls. help. on using
>  strftime("%D",$timestamp) it is giving 01/01/70.  May pls. help 
>  me.
> 
>  Also pls. let me know whether calculation can be done in mysql 
>  on 
> >>>
>  this
>  
> 
>  string timestamp. pls. inform.
> 
> 
> 
>  with best wishes
>  balwant
> 
>  -- 
>  PHP Database Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
> 
>  
> >>>
> >> -- 
> >> PHP Database Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >> 
> >
>  -- 
>  PHP Database Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
> 
>  
> >>>
> >>
> >>  
> >>
> >
> 
> -- 
> Experience is a good teacher, but she sends in terrific bills.
> 
> Minna Antrim

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] timestamp

2005-02-01 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



> -Original Message-
> From: Balwant Singh [mailto:[EMAIL PROTECTED] 
> Sent: 01 February 2005 08:08
> 
> on echoing $timestamp i m getting "Fri Jan 28 19:53:09 2005" 
> but on echoing $date i m getting 1970-01-01.  
> also i m getting full info. by phpinfo()
> 
> i m using php 4.2.2 , apache 2.0 and rad hat 9.

The Change Log includes this line for version 4.3.3:

"Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format). (Ilia)"

So I guess you need at least PHP 4.3.3 for this to work correctly for you.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS,
LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] php database connectivity issues

2005-02-01 Thread Adams, Jonathan K. [C]

Here is the error: "Warning: sybase_connect() [function.sybase-connect]:
Sybase: Unable to allocate connection record

My configuration - The database is Sybase ASE 12.0 running on Solaris 8
The webserver is Apache 1.3.33 with PHP 5 running Solaris 9

The sybase libraries are shared via NFS, which is how I built the apache

Inside the httpd.conf file I have set several SetEnv tabs to set

OCS, ASE, FTS, SYBASE to their proper paths... php_info() confirms this is
working


I can run isql from this box and connect to the desired database manually...
if I set the environment

I have seen this errror posted in alot of places, but I do not see anything
approaching a solution

Could it be because I am sharing the sybase libraries via NFS?  I have seen
this problem posted from people who have the sybase client installed on
their webserver too though...


any help would be appreciated because I have pretty much hit a wall here...
and I am sure that there must be a way to make this work short of installing
apache/php on the same box as the database, which is absolutely not an
option...

Thanks

--J




___
Jon Adams

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] database connectivity problem

2005-02-01 Thread Adams, Jonathan K. [C]

Here is the error: "Warning: sybase_connect() [function.sybase-connect]:
Sybase: Unable to allocate connection record

My configuration - The database is Sybase ASE 12.0 running on Solaris 8
The webserver is Apache 1.3.33 with PHP 5 running Solaris 9

The sybase libraries are shared via NFS, which is how I built the apache

Inside the httpd.conf file I have set several SetEnv tabs to set

OCS, ASE, FTS, SYBASE to their proper paths... php_info() confirms this is
working


I can run isql from this box and connect to the desired database manually...
if I set the environment

I have seen this errror posted in alot of places, but I do not see anything
approaching a solution

Could it be because I am sharing the sybase libraries via NFS?  I have seen
this problem posted from people who have the sybase client installed on
their webserver too though...


any help would be appreciated because I have pretty much hit a wall here...
and I am sure that there must be a way to make this work short of installing
apache/php on the same box as the database, which is absolutely not an
option...

Thanks

--J

___
Jon Adams
Unix Web Engr.
NGA Gateway Services
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 202-284-4543

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] database connectivity problem

2005-02-01 Thread Martin Norland
Adams, Jonathan K. [C] wrote:
Here is the error: "Warning: sybase_connect() [function.sybase-connect]:
Sybase: Unable to allocate connection record
My configuration - The database is Sybase ASE 12.0 running on Solaris 8
The webserver is Apache 1.3.33 with PHP 5 running Solaris 9
The sybase libraries are shared via NFS, which is how I built the apache
Well, that error certainly doesn't look like it can't see the libraries 
- it looks more like it can't write somewhere.  Are you sure there is 
sufficient memory for the script [perhaps increase memory_limit in 
php.ini], and that wherever php might need to store the connection 
record externally (if applicable) is writable?

Unfortunately - you may not be alone:
http://bugs.php.net/bug.php?id=30721
http://bugs.php.net/bug.php?id=17489
Cheers,
--
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent 
those of St. Jude Children's Research Hospital.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Warning: ocilogon(): _oci_open_server: â in d:\program files\apachegroup\apache\htdocs\codebase\oci8test2.php on line 3

2005-02-01 Thread JeRRy

I am getting the error below while trying to execute
the code below:

Warning: ocilogon(): _oci_open_server: â in
d:\program files\apache
group\apache\htdocs\codebase\oci8test2.php on line 3


Aha line 3.  Open oci8test2.php in notepad or
something and browse to line three.  Hit your down
arrow twice. ;)





Okay lets read the error:

Warning: ocilogon(): _oci_open_server: â in
d:\program files\apache
group\apache\htdocs\codebase\oci8test2.php on line 3



so ocilogon is producing some sort of error, it kindly
gives us the line number to make it easier to find. :)
 Sometimes helpful but not always if you have alot of
includes in it. ;)

So I'd say it's this part the error is:

if ($c=OCILogon("scott", "tiger", "orcl")) {

First off have you created a dataabse called Orcl with
username scott and password tiger?

I doubt this is your problem though.
I see an error though in your code.  But let me
continue...


I followed the note below to set it up.
http://www.oracle.com/technology/tech/opensource/php/apache/inst_php_apache_windows.html

Any help on this will be greatly appreciated.


How have you followed it exactly?  You have changed
refrences in it, why?  Are you using another thing
inline with this?

If your learining you should copy the instructions as
they are until you know what your doing, obvious your
knowledge is lacking and you require more learning
time.  I suggest you not fiddle to much with the
code(s) until you get a good foot holding
understanding.

I suggest you start over.  Copy the instructions as
they say and I am sure you will get the thing to work,
than start playing and asking questions.

But instead of pointing out the obvious here and you
not totally understanding start from scratch and i am
sure you will understand what is goin on when you make
the changes and the error reproduces.

That's my suggestion!

Jerry

php-db@lists.php.net

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: Warning: ocilogon(): _oci_open_server: â in d:\program files\apachegroup\apache\htdocs\codebase\oci8test2.php on line 3

2005-02-01 Thread Martin Norland
JeRRy wrote:

I am getting the error below while trying to execute
the code below:
Warning: ocilogon(): _oci_open_server: â in
d:\program files\apache
group\apache\htdocs\codebase\oci8test2.php on line 3

Aha line 3.  Open oci8test2.php in notepad or
something and browse to line three.  Hit your down
arrow twice. ;)


$c=OCILogon("scott","tiger");
/*
if ($c=OCILogon("scott", "tiger", "orcl")) {
  echo "Successfully connected to Oracle.\n";
  OCILogoff($c);
} else {
  $err = OCIError();
  echo "Oracle Connect Error " . $err[text];
}
*/
?>

Okay lets read the error:
Warning: ocilogon(): _oci_open_server: â in
d:\program files\apache
group\apache\htdocs\codebase\oci8test2.php on line 3
so ocilogon is producing some sort of error, it kindly
gives us the line number to make it easier to find. :)
 Sometimes helpful but not always if you have alot of
includes in it. ;)
So I'd say it's this part the error is:
if ($c=OCILogon("scott", "tiger", "orcl")) {
I didn't take this one up initially because it's all carbs - no 
nutritional value.

The entirety of his example is commented except for the single line 
(line 3) calling OCILogon.  Since the error isn't that the function is 
undefined, and it (to my eyes) describes nothing - I stayed quiet.

The line you're suggesting he check (line 6) is in fact commented out. 
It does bring to light, however, the suggestion that he check whether he 
should be passing more arguments to the function.

You make a good point - that is that the example code is there to make 
sure things are working, and then to start changing it - get a good 
baseline, and work from there.  Sound advice - would that more heeded it.

Cheers,
--
- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent 
those of St. Jude Children's Research Hospital.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Best way to remove slashes?

2005-02-01 Thread Chris Payne
Hi there everyone,

 

What’s the best way to remove slashes to stop the following from being
output from a string:

 

City = HYPERLINK "file:///\\'Alliance\\"\\\'Alliance\\\'

 

Say the string is called $city, I tried the following:

 

Stripslashes($city); but it  didn’t seem to work?

 

Chris


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.4 - Release Date: 2/1/2005