RE: [PHP] Re: Chocked

2006-12-29 Thread Peter Lauri
Hi,

I got it working before the post, but I was just curious if there were any
change from php4 to php5 as I have been using that method for a while now.

Best regards,
Peter Lauri

www.dwsasia.com  - company web site
www.lauri.se  - personal web site
www.carbonfree.org.uk  - become Carbon Free



-Original Message-
From: Johannes Lindenbaum [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 29, 2006 4:24 AM
To: php-general@lists.php.net
Subject: [PHP] Re: Chocked

I think this is correct:

Let's just assume for a minute that in your index.php you echo out getcwd();
Output would be / (only an example)

According to that you do the following include:
include("./classes/first.class.php");

If you were to echo getcwd() after the include in the first.class.php it 
would output /

You would then have to include your second class (inside the 
first.class.php - correct?) as:
include("./classes/second.class.php")
to make it a "correct" include without PHP having to search the 
directories for the include.

Give that a shot.

Regards,
Johannes

-- 
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



[PHP] help with \n\r in strings

2006-12-29 Thread Angelo Zanetti

Hi all,

I receive a text file with a whole bunch of strings. and each line is 
terminated by what I presume is \n\r however when I read the string into 
PHP, it seems that the last column of the row and the first column of 
the next row are connected but it appears as a space but I've done all 
kinds of tests like $spacePos = strrpos($dateAmount, ' '); but this is 
always empty.


So is there a way to test for \r\n? or what else can I use to delimit 
these two values (last column of row and first column of next row)?


Thanks in advance.

Angelo
  
--


Angelo Zanetti
Systems developer


*Telephone:* +27 (021) 469 1052
*Mobile:*   +27 (0) 72 441 3355
*Fax:*+27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] 

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



RE: [PHP] Re: Chocked

2006-12-29 Thread Robert Cummings
On Fri, 2006-12-29 at 09:48 +0100, Peter Lauri wrote:
> Hi,
> 
> I got it working before the post, but I was just curious if there were any
> change from php4 to php5 as I have been using that method for a while now.

Is the php.ini the same? Make sure it actually uses the php.ini that you
think it uses by checking phpinfo(). Make sure "." is in the include
path.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] help with \n\r in strings

2006-12-29 Thread Robert Cummings
On Fri, 2006-12-29 at 11:42 +0200, Angelo Zanetti wrote:
> Hi all,
> 
> I receive a text file with a whole bunch of strings. and each line is 
> terminated by what I presume is \n\r however when I read the string into 
> PHP, it seems that the last column of the row and the first column of 
> the next row are connected but it appears as a space but I've done all 
> kinds of tests like $spacePos = strrpos($dateAmount, ' '); but this is 
> always empty.
> 
> So is there a way to test for \r\n? or what else can I use to delimit 
> these two values (last column of row and first column of next row)?
> 
> Thanks in advance.

strpos( $dateAmount, "\n" )

or

strpos( $dateAmount, "\r" )

Double quotes are required for expansion of special characters.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



RE: [PHP] help with \n\r in strings

2006-12-29 Thread Peter Lauri
Try:

$string_as_array = explode("\n", $string);

echo "";
print_r($string_as_array);
echo "";

The array that you get will contain segments of the string that is separated
with \n. Let me know if that helps. 

Best regards,
Peter Lauri

www.dwsasia.com  - company web site
www.lauri.se  - personal web site
www.carbonfree.org.uk  - become Carbon Free

-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 29, 2006 10:43 AM
To: PHP List
Subject: [PHP] help with \n\r in strings

Hi all,

I receive a text file with a whole bunch of strings. and each line is 
terminated by what I presume is \n\r however when I read the string into 
PHP, it seems that the last column of the row and the first column of 
the next row are connected but it appears as a space but I've done all 
kinds of tests like $spacePos = strrpos($dateAmount, ' '); but this is 
always empty.

So is there a way to test for \r\n? or what else can I use to delimit 
these two values (last column of row and first column of next row)?

Thanks in advance.

Angelo
   
-- 

Angelo Zanetti
Systems developer


*Telephone:* +27 (021) 469 1052
*Mobile:*   +27 (0) 72 441 3355
*Fax:*+27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] 

-- 
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



Re: [PHP] help with \n\r in strings

2006-12-29 Thread Frank Arensmeier

If you just want to test for \n\r -

if ( substr ( -2, $my_string ) == "\n\r" ) { // substr with the  
negative value of 2 will give you the last two characters of your string

// do some stuff
}

I think it would be a good idea to explain a little bit more what you  
are trying to accomplish. Are you preparing the string for a database  
insert? Do you want to sanitise the string?


Stripping off those kind of characters can also be done with trim (or  
ltrim - trims white space characters from the left of the string or  
rtim - trims from the right). Read the manual for more details and  
options.


If you are not quite sure what those characters are, you can find out  
with this little helper.


$characters = preg_split( '//', $my_string );
foreach ( $characters as $character ) {
	echo "ASCI value of the character {$character} is: " . ord  
( $character ) . "\n";

}

Then you can look up the values in a ASCI table.

/frank


29 dec 2006 kl. 11.01 skrev Peter Lauri:


Try:

$string_as_array = explode("\n", $string);

echo "";
print_r($string_as_array);
echo "";

The array that you get will contain segments of the string that is  
separated

with \n. Let me know if that helps.

Best regards,
Peter Lauri

www.dwsasia.com  - company web site
www.lauri.se  - personal web site
www.carbonfree.org.uk  - become Carbon Free

-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED]
Sent: Friday, December 29, 2006 10:43 AM
To: PHP List
Subject: [PHP] help with \n\r in strings

Hi all,

I receive a text file with a whole bunch of strings. and each line is
terminated by what I presume is \n\r however when I read the string  
into

PHP, it seems that the last column of the row and the first column of
the next row are connected but it appears as a space but I've done all
kinds of tests like $spacePos = strrpos($dateAmount, ' '); but this is
always empty.

So is there a way to test for \r\n? or what else can I use to delimit
these two values (last column of row and first column of next row)?

Thanks in advance.

Angelo

--
-- 
--

Angelo Zanetti
Systems developer
-- 
--


*Telephone:* +27 (021) 469 1052
*Mobile:*   +27 (0) 72 441 3355
*Fax:*+27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] 

--
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



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



Re: [PHP] help with \n\r in strings

2006-12-29 Thread Robert Cummings
On Fri, 2006-12-29 at 11:17 +0100, Frank Arensmeier wrote:
> If you just want to test for \n\r -
> 
> if ( substr ( -2, $my_string ) == "\n\r" ) { // substr with the  
> negative value of 2 will give you the last two characters of your string
>   // do some stuff
> }

You have your substr() parameters backwards.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] help with \n\r in strings

2006-12-29 Thread Arpad Ray

Angelo Zanetti wrote:
So is there a way to test for \r\n? or what else can I use to delimit 
these two values (last column of row and first column of next row)? 
 


Since it's coming from a file, you might as well just read it with 
file(), which will split each line into an array automatically. If it's 
a CSV file, then fgetcsv() helps you out even more.


Arpad

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




Re: [PHP] 403 Forbidden

2006-12-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-29 12:17:12 +0530:
> When I try to run any php script on apache I get a error
> "Authorization required 403 Forbidden". I don't get this error on
> IIS. I am using Windows XP professional please help. I am using
> Apache 2.2.1

That's a problem with your apache configuration, unrelated to PHP.
The Apache manual is at http://httpd.apache.org/docs/2.2/

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Payflow and Php5 on FreeBSD

2006-12-29 Thread Dave

Hello,
   Thanks for your reply. Some additional information, I have not noticed a 
php5-pfpro extensions port, i did see one for php4, but i was informed that 
going back to php4 is not an option, programmers here use php5 specific 
functions.
Judging from googling i'm sure i'm making this harder than it needs to be, 
but i have two requirements: one is to avoid or minimize downtime, and two 
is to not utilize both ports and source-compiled software, which in my 
opinion makes future maintence harder especially if i'm not going to be 
doing it.
   I can think of two options, i'd appreciate comments, suggestions, and 
ideas. Option 1 is to uninstall all php5.x ports on the box and do a 
source-install of php5. I'm really not happy about this option, but i'll use 
it if something easier doesn't come along. Option2 is to compile php5 from 
source on another box, get the pfpro.so shared object from that box, copy it 
in to the php5 extensions area on the original box, and load it via 
extensions.ini.
   Another idea is i've read on php.net that payflow is now a pecl 
extension, which i interpret to mean i could just download and drop it in, 
but i have not been able to find the file although this one would probably 
be easiest.

Thanks.
Dave.


# pkg_info
apache-2.1.9_5  Version 2.1 of Apache web server with prefork MPM.
apache-ant-1.6.5_2  Java- and XML-based build tool, conceptually similar to 
mak
autoconf-2.59_2 Automatically configure source code on many Un*x 
platforms

cclient-2004g,1 Mark Crispin's C-client mail access routines
curl-7.15.3 Non-interactive tool to get files from FTP, GOPHER, 
HTTP(S)
cvsup-16.1h_2   General network file distribution system optimized for 
CVS

diablo-jdk-1.5.0.07.01_1 Java Development Kit 1.5.0_07.01
expat-2.0.0_1   XML 1.0 parser written in C
ezm3-1.2Easier, more portable Modula-3 distribution for building 
CV

fontconfig-2.3.2_3,1 An XML-based font configuration API for X Windows
freetype2-2.1.10_3  A free and portable TrueType font rendering engine
gettext-0.14.5_2GNU gettext package
gmake-3.80_2GNU version of 'make' utility
help2man-1.36.3 Automatically generating simple manual pages from 
program o

imake-6.9.0 Imake and other utilities from X.Org
javavmwrapper-2.3   Wrapper script for various Java Virtual Machines
jpeg-6b_4   IJG's jpeg compression utilities
libdrm-2.0_1Userspace interface to kernel Direct Rendering Module 
servi

libiconv-1.9.2_2A character set conversion library
libltdl-1.5.22  System independent dlopen wrapper
libmcrypt-2.5.7_2   Multi-cipher cryptographic library (used in PHP)
libtool-1.5.22_2Generic shared library support script
libxml2-2.6.23_1XML parser library for GNOME
linux_base-8-8.0_14 Base set of packages needed in Linux mode (for 
i386/amd64)

m4-1.4.4GNU m4
mysql-client-4.1.18_1 Multithreaded SQL database (client)
mysql-server-4.1.18_2 Multithreaded SQL database (server)
p5-gettext-1.05_1   Message handling functions
pecl-PDO-1.0.3  PHP Data Objects Interface
perl-5.8.8  Practical Extraction and Report Language
pfpro-3.0.8_2   SDK for VeriSign's PayFlow Pro
php5-5.2.0  PHP Scripting Language (Apache Module and CLI)
php5-bcmath-5.1.2_1 The bcmath shared extension for php
php5-bz2-5.1.2_1The bz2 shared extension for php
php5-calendar-5.1.2_1 The calendar shared extension for php
php5-ctype-5.1.2_1  The ctype shared extension for php
php5-curl-5.1.2_1   The curl shared extension for php
php5-dom-5.1.2_1The dom shared extension for php
php5-gd-5.2.0   The gd shared extension for php
php5-iconv-5.1.2_1  The iconv shared extension for php
php5-imap-5.1.2_1   The imap shared extension for php
php5-mcrypt-5.1.2_1 The mcrypt shared extension for php
php5-mysql-5.1.2_1  The mysql shared extension for php
php5-pcre-5.1.2_1   The pcre shared extension for php
php5-posix-5.1.2_1  The posix shared extension for php
php5-session-5.1.2_1 The session shared extension for php
php5-simplexml-5.1.2_1 The simplexml shared extension for php
php5-sqlite-5.1.2_1 The sqlite shared extension for php
php5-tokenizer-5.1.2_1 The tokenizer shared extension for php
php5-xml-5.1.2_1The xml shared extension for php
php5-xmlreader-5.1.2_1 The xmlreader shared extension for php
php5-xmlwriter-5.1.2_1 The xmlwriter shared extension for php
php5-zlib-5.1.2_1   The zlib shared extension for php
pkgconfig-0.20  A utility to retrieve information about installed 
libraries

png-1.2.12_1Library for manipulating PNG images
python-2.4.2An interpreted object-oriented programming language
rdate-1.1   Sets the clock of the local host to the time of another 
hos

rsync-2.6.8_2   A network file distribution/synchronization utility
t1lib-5.1.0_1,1 A Type 1 Rasterizer Library for UNIX/X11
wget-1.10.2 Retrieve files from the Net via HTTP and FTP
wildfire-3.1.1_1Wildfire is an enterprise ins

Re: [PHP] Chocked

2006-12-29 Thread tedd

At 5:22 PM -0800 12/28/06, Paul Novitski wrote:

At 12/28/2006 03:51 PM, Skip Evans wrote:

"chocked" ?

"chocking" ???



RTFM:
http://php.net/chocked


Warm regards,
Paul



Now (along with Skip), I'm really confused.

First, Peter said he was "chocked" and I didn't know what to do -- 
should I call 911, or maybe he was stuck on a hill and couldn't roll 
down it, or what?


Now, Paul says to RTFM and provides a link that doesn't provide 
anything while others converse with Peter as if they know WTF he's 
talking about.


The new year approachth -- is this a sign of things to come? Has 
there been another seal broken?


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



Re: [PHP] Chocked

2006-12-29 Thread Skip Evans

tedd wrote:

At 5:22 PM -0800 12/28/06, Paul Novitski wrote:


At 12/28/2006 03:51 PM, Skip Evans wrote:


"chocked" ?

"chocking" ???




RTFM:
http://php.net/chocked



This link said that the function "chocked" could 
not be found.


Is it anything like being "stoked" about something 
 back in the 80s? Is this like... a reference to 
... like Valley Girl?


I'm so sheeerrr...




Warm regards,
Paul




Now (along with Skip), I'm really confused.

First, Peter said he was "chocked" and I didn't know what to do -- 
should I call 911, or maybe he was stuck on a hill and couldn't roll 
down it, or what?


Now, Paul says to RTFM and provides a link that doesn't provide anything 
while others converse with Peter as if they know WTF he's talking about.


The new year approachth -- is this a sign of things to come? Has there 
been another seal broken?


tedd



--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240

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



[PHP] Project php-mobile

2006-12-29 Thread Fernando chucre

Hello,

I am a PHP-Developer, and for a long time I wait for um php binary for PDA's
(mobiles devices). But this time not hapen. So I and my friend Lauro Salmito
(C develeper) making the PHP-Mobile Project. (this still not created). We
want create a small binary, Mobile Edition.

Basically we make a binary with the fallowing features:

  - Language Reference ;
  - Function Reference 
 - V. Array Functions
 - XII. Class/Object
Functions
 - XXII. Date and Time
Functions
 - XXIX. Directory Functions
 - XL. Filesystem
Functions
 - XLVI. FTP Functions 
 - XCV. MySQL Functions
 - XCVII. MySQL Improved
Extension
 - CXXIII. PostgreSQL Functions
 - CXXVI. Program Execution
Functions
 - CXLVIII. SOAP Functions
 - CL. Standard PHP Library (SPL)
Functions
 - CLI. SQLite Functions
 - CLVI. String Functions
  - Graphical library
 - For this we don't have Idea, probably we get an exists in PDA
 world, or if necessary we will make it.

For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2,
this is a suite developer based in Eclipse.

We accept any help.

We will notice when we register the project.

Thanks

--
Fernando Chure
PSL/CE - Brasil


Re: [PHP] Payflow and Php5 on FreeBSD

2006-12-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-29 07:20:58 -0500:
>Thanks for your reply. Some additional information, I have not noticed a 
> php5-pfpro extensions port, i did see one for php4, but i was informed that 
> going back to php4 is not an option, programmers here use php5 specific 
> functions.
> Judging from googling i'm sure i'm making this harder than it needs to be, 
> but i have two requirements: one is to avoid or minimize downtime, and two 
> is to not utilize both ports and source-compiled software, which in my 
> opinion makes future maintence harder especially if i'm not going to be 
> doing it.
>I can think of two options, i'd appreciate comments, suggestions, and 
> ideas. Option 1 is to uninstall all php5.x ports on the box and do a 
> source-install of php5. I'm really not happy about this option, but i'll 
> use it if something easier doesn't come along. Option2 is to compile php5 
> from source on another box, get the pfpro.so shared object from that box, 
> copy it in to the php5 extensions area on the original box, and load it via 
> extensions.ini.

Both your options are inferior to the hypothetical case where there was
a php5-pfpro port in the official FreeBSD ports collection: you'd just
put your pfpro SDK into $DISTDIR, cd $PORTSDIR/devel/php5-pfpro,
sudo make install. Write the port and submit it to the FreeBSD GNATS.
They might reject the submission on basis of it being too much of a
niche software, but having the port will greatly improve the
administrators' experience maintaining the installation.

I'm suggesting that you bite the bullet while it still hasn't grown
the size of a cannon ball.

See Porter's Handbook [1] for instructions; you can use one of the
existing PECL ports as a template.  I can help you through the process
off-list.

[1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/

>Another idea is i've read on php.net that payflow is now a pecl 
> extension, which i interpret to mean i could just download and drop it in, 
> but i have not been able to find the file although this one would probably 
> be easiest.

I don't believe you'll have much luck with binary downloads, building
the extension requires the Payflow Pro SDK, and AIUI one needs to be
registered with Verisign to have access to that. [2]

[2] http://cz.php.net/manual/en/ref.pfpro.php

Finding the library compiled by someone else might be easiest for the
moment, but quick money will only burn your ass.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



[PHP] Project php-mobile

2006-12-29 Thread Fernando chucre

Hello,

I am a PHP-Developer, and for a long time I wait for um php binary for PDA's
(mobiles devices). But this time not hapen. So I and my friend Lauro Salmito
(C develeper) making the PHP-Mobile Project. (this still not created). We
want create a small binary, Mobile Edition.

Basically we make a binary with the fallowing features:

  - Language Reference ;
  - Function Reference 
 - V. Array Functions
 - XII. Class/Object
Functions
 - XXII. Date and Time
Functions
 - XXIX. Directory Functions
 - XL. Filesystem
Functions
 - XLVI. FTP Functions 
 - XCV. MySQL Functions
 - XCVII. MySQL Improved
Extension
 - CXXIII. PostgreSQL Functions
 - CXXVI. Program Execution
Functions
 - CXLVIII. SOAP Functions
 - CL. Standard PHP Library (SPL)
Functions
 - CLI. SQLite Functions
 - CLVI. String Functions
  - Graphical library
 - For this we don't have Idea, probably we get an exists in PDA
 world, or if necessary we will make it.

For make binary and libraries we will uses the Palm_OS_Developer_Suite_1_2,
this is a suite developer based in Eclipse.

We accept any help.

We will notice when we register the project.

Thanks

--
Fernando Chure
PSL/CE - Brasil


[PHP] Only allow one vhost to use exec() ?

2006-12-29 Thread MIKE YRABEDRA

I want to be able to use the exec() function on my site, but do not want to
allow all the other users that same ability.

IS there a safe and secure way to limit the use of that function to a single
virtualhost...maybe even a single page or directory?



-- 
Mike  B^)>

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



RE: [PHP] Only allow one vhost to use exec() ?

2006-12-29 Thread Aras
Enable safe mode ON, and specify that specific directory in safe mode exec
dir in php.ini.
Alternatively, those settings can be set within Apache configuration
(httpd.conf) per any Vhost directive.


...
..
..
php_admin_flag safe_mode 1
...


Aras Koktas
[EMAIL PROTECTED]
Business Excellence Development
Phi.dot Internet Systems


-Original Message-
From: MIKE YRABEDRA [mailto:[EMAIL PROTECTED]
Sent: Friday, December 29, 2006 4:53 PM
To: php-general@lists.php.net
Subject: [PHP] Only allow one vhost to use exec() ?



I want to be able to use the exec() function on my site, but do not want to
allow all the other users that same ability.

IS there a safe and secure way to limit the use of that function to a single
virtualhost...maybe even a single page or directory?



--
Mike  B^)>

--
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



Re: [PHP] Chocked

2006-12-29 Thread Jim Lucas

Peter Lauri wrote:

I was chocked when I got my additional dedicated server from my server
provider. I assumed everyting would have been the same as I ordered the
server with same package name etc. The chocking part was that the server had
PHP5 and not PHP4.

 


Ok, it is not a hard piece of work to get it working, but one thing stunned
me :-)

 


Assuming that I have the following structure:

 


/index.php

/classes/first.class.php

/classes/second.class.php

 


Index.php:

 


include_once("classes/first.class.php");

 

 


first.class.php

 


include_once("second.class.php");

 

 


This worked fine, but this time I get an "open dir" error. Is this something
that is new to PHP5 for this, or do I just need to config the server to
accept this "sloppy" including of files?

 


Best regards,

Peter Lauri

 


  www.dwsasia.com - company web site

  www.lauri.se - personal web site

  www.carbonfree.org.uk - become Carbon Free

 



  
More the likely it is a difference in the include_path setting which can 
be found in the php.ini file.  This can also override this setting in 
the VirtualHosts block and .htaccess file.  Check these locations for 
any additional include_path changes in the old system. 
sometimes you will see things like


include_path = '/path/to/htdocs:.:/var/www/html'

or other variations of this

Jim Lucas

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



Re: [PHP] 403 Forbidden

2006-12-29 Thread Jim Lucas

Roman Neuhauser wrote:

# [EMAIL PROTECTED] / 2006-12-29 12:17:12 +0530:
  

When I try to run any php script on apache I get a error
"Authorization required 403 Forbidden". I don't get this error on
IIS. I am using Windows XP professional please help. I am using
Apache 2.2.1



That's a problem with your apache configuration, unrelated to PHP.
The Apache manual is at http://httpd.apache.org/docs/2.2/

  

correct/incorrect

there could be a line like this in his php code somewhere.

header('WWW-Authenticate: Basic realm="Someplace"');
header('HTTP/1.0 401 Unauthorized');

and if something correct is not entered, they will recieve the 403 Error

So, it could be a PHP thing, but it IS more then likely an Apache issue

Jim

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



Re: [PHP] 403 Forbidden

2006-12-29 Thread Jim Lucas

Jim Lucas wrote:

Roman Neuhauser wrote:

# [EMAIL PROTECTED] / 2006-12-29 12:17:12 +0530:
 

When I try to run any php script on apache I get a error
"Authorization required 403 Forbidden". I don't get this error on
IIS. I am using Windows XP professional please help. I am using
Apache 2.2.1



That's a problem with your apache configuration, unrelated to PHP.
The Apache manual is at http://httpd.apache.org/docs/2.2/

  

correct/incorrect

there could be a line like this in his php code somewhere.

header('WWW-Authenticate: Basic realm="Someplace"');
header('HTTP/1.0 401 Unauthorized');

and if something correct is not entered, they will recieve the 403 Error

So, it could be a PHP thing, but it IS more then likely an Apache issue

Jim


spoke too soon.  Never mind

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



[PHP] mime with php4.4.4 does not work anymore

2006-12-29 Thread Roger Thomas
I have been serving my community with Invision Power Board (IPB) v1.3.1 Final. 
Things are working well with PHP 4.3.8 and Apache 1.3.29.

Yesterday I just upgraded to PHP4.4.4 and I have problems with Excel and Word 
attachments with IPB. Whenever I click on those attachments, I will get all 
sorts of funny characters all over my browser screen. However, image 
attachments are correctly displayed inline.

I added --with-mime-magic=/usr/local/apache/conf/magic to configure but nothing 
change. If I were to roll back to PHP 4.3.8, IPB works perfectly.

What have I missed. Please advise. TIA.

--
roger


---
Sign Up for free Email at http://ureg.home.net.my/
---

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



Re: [PHP] help with \n\r in strings

2006-12-29 Thread Manolet Gmail

2006/12/29, Arpad Ray <[EMAIL PROTECTED]>:

Angelo Zanetti wrote:
> So is there a way to test for \r\n? or what else can I use to delimit
> these two values (last column of row and first column of next row)?
>



mmm what about open the file with and hex editor?.. or mmm notepad++
have a option to see if is \r \n or \r\n

hopes helps


Since it's coming from a file, you might as well just read it with
file(), which will split each line into an array automatically. If it's
a CSV file, then fgetcsv() helps you out even more.

Arpad

--
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



Re: [PHP] Chocked

2006-12-29 Thread Casey Chu

He probably meant "shocked" and "shocking".

On 12/29/06, Jim Lucas <[EMAIL PROTECTED]> wrote:

Peter Lauri wrote:
> I was chocked when I got my additional dedicated server from my server
> provider. I assumed everyting would have been the same as I ordered the
> server with same package name etc. The chocking part was that the server had
> PHP5 and not PHP4.
>
>
>
> Ok, it is not a hard piece of work to get it working, but one thing stunned
> me :-)
>
>
>
> Assuming that I have the following structure:
>
>
>
> /index.php
>
> /classes/first.class.php
>
> /classes/second.class.php
>
>
>
> Index.php:
>
>
>
> include_once("classes/first.class.php");
>
>
>
>
>
> first.class.php
>
>
>
> include_once("second.class.php");
>
>
>
>
>
> This worked fine, but this time I get an "open dir" error. Is this something
> that is new to PHP5 for this, or do I just need to config the server to
> accept this "sloppy" including of files?
>
>
>
> Best regards,
>
> Peter Lauri
>
>
>
>   www.dwsasia.com - company web site
>
>   www.lauri.se - personal web site
>
>   www.carbonfree.org.uk - become Carbon Free
>
>
>
>
>
More the likely it is a difference in the include_path setting which can
be found in the php.ini file.  This can also override this setting in
the VirtualHosts block and .htaccess file.  Check these locations for
any additional include_path changes in the old system.
sometimes you will see things like

include_path = '/path/to/htdocs:.:/var/www/html'

or other variations of this

Jim Lucas

--
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