Re: Apache php weird problem

2009-06-16 Thread MANI
thanks a lot joachim, that did the trick.

On 6/16/09, Joachim Schipper  wrote:
> On Tue, Jun 16, 2009 at 03:07:01PM +0430, MANI wrote:
>> yes! I'm running -current ( snapshot June 6 ). sorry I didn't saw
>> 2009/06/03 httpd ABI change, So I should build php from port tree?
>
> Or use a -current package. I don't know what architecture you are on,
> but ftp.openbsd.org has php5-core-5.2.9p2 for e.g. i386 and amd64.
>
> It looks like you pointed your PKG_PATH at the wrong place. It should be
> ftp://your.mirror.here/pub/OpenBSD/snapshots/packages/`machine`.
>
>   Joachim



Re: Apache php weird problem

2009-06-16 Thread Joachim Schipper
On Tue, Jun 16, 2009 at 03:07:01PM +0430, MANI wrote:
> yes! I'm running -current ( snapshot June 6 ). sorry I didn't saw
> 2009/06/03 httpd ABI change, So I should build php from port tree?

Or use a -current package. I don't know what architecture you are on,
but ftp.openbsd.org has php5-core-5.2.9p2 for e.g. i386 and amd64.

It looks like you pointed your PKG_PATH at the wrong place. It should be
ftp://your.mirror.here/pub/OpenBSD/snapshots/packages/`machine`.

Joachim



Re: Apache php weird problem

2009-06-16 Thread MANI
yes! I'm running -current ( snapshot June 6 ). sorry I didn't saw
2009/06/03 httpd ABI change, So I should build php from port tree?


here is my dmesg:

OpenBSD 4.5-current (GENERIC.MP) #45: Sat Jun  6 13:35:06 MDT 2009
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM) Duo CPU T2450 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
real mem  = 1063415808 (1014MB)
avail mem = 1019879424 (972MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 02/08/07, BIOS32 rev. 0 @
0xfd5f0, SMBIOS rev. 2.4 @ 0xdc010 (17 entries)
bios0: vendor Phoenix Technologies LTD version "R0100J4" date 02/08/2007
bios0: Sony Corporation VGN-N370E
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC HPET MCFG SLIC APIC BOOT SSDT SSDT SSDT SSDT
acpi0: wakeup devices PWRB(S4) PXS1(S3) PXS2(S3) PXS3(S3) PXS4(S3)
USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB7(S3) LANC(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) Duo CPU T2450 @ 2.00GHz ("GenuineIntel" 686-class) 2 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEGP)
acpiprt2 at acpi0: bus 2 (RP01)
acpiprt3 at acpi0: bus 4 (RP02)
acpiprt4 at acpi0: bus 6 (RP03)
acpiprt5 at acpi0: bus -1 (RP04)
acpiprt6 at acpi0: bus 8 (PCIB)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpicpu1 at acpi0: C3, C2
acpitz0 at acpi0: critical temperature 90 degC
acpitz0: TZ00: failed to read _AC0
acpitz1 at acpi0: critical temperature 90 degC
acpitz1: TZ01: failed to read _AC0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 type LiOn oem "Sony Corp."
acpibtn0 at acpi0: LID0
acpibtn1 at acpi0: PWRB
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: DD01
acpivout1 at acpivideo0: DD02
acpivout2 at acpivideo0: DD03
bios0: ROM list: 0xc/0x1! 0xdc000/0x4000! 0xe/0x1800!
cpu0: unknown Enhanced SpeedStep CPU, msr 0x06130f2c06000f2c
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 2000 MHz (1404 mV): speeds: 2000, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xc000, size 0x1000
inteldrm0 at vga1: apic 1 int 16 (irq 7)
drm0 at inteldrm0
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02:
apic 1 int 22 (irq 4)
azalia0: codecs: Realtek ALC262, Conexant/0x2c06, using Realtek ALC262
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 1
int 17 (irq 3)
pci1 at ppb0 bus 2
mskc0 at pci1 dev 0 function 0 "Marvell Yukon 88E8036" rev 0x16,
Yukon-2 FE rev. A1 (0x1): apic 1 int 16 (irq 7)
msk0 at mskc0 port A: address 00:13:a9:c6:c4:6c
eephy0 at msk0 phy 0: 88E3082 10/100 PHY, rev. 3
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 1
int 16 (irq 7)
pci2 at ppb1 bus 4
ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 1
int 18 (irq 11)
pci3 at ppb2 bus 6
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02:
apic 1 int 18 (irq 11), MoW1, address 00:19:d2:96:64:28
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1
int 23 (irq 5)
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1
int 17 (irq 3)
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1
int 18 (irq 11)
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1
int 23 (irq 5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci4 at ppb3 bus 8
cbb0 at pci4 dev 3 function 0 "TI PCIXX12 CardBus" rev 0x00: apic 1
int 16 (irq 255), CardBus support disabled
"TI PCIXX12 FireWire" rev 0x00 at pci4 dev 3 function 1 not configured
"TI PCIXX12 Multimedia Card Reader" rev 0x00 at pci4 dev 3 function 2
not configured
cardslot0 at cbb0 slot 0 flags 0
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at at

Re: Apache php weird problem

2009-06-16 Thread MANI
No, my httpd.conf file configured with AddType and LoadModule for php
correctly, and I don't get source code in browser, I just get a blank
page and a segmentation fault in error_log.

I tried to browse index.php with lynx instead of firefox, lynx
returned following error:

Looking up 127.0.0.1
Making HTTP connection to 127.0.0.1
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://127.0.0.1/index.php'
Alert!: Unable to access document.
lynx: Can't access startfile

but lynx shows http://127.0.0.1/index.html without any error.

On 6/16/09, Richard Toohey  wrote:
> And not this?
>
> http://marc.info/?l=openbsd-misc&m=123972169917551&w=3
> http://marc.info/?l=openbsd-misc&m=123972131216791&w=3
>
> (Not replying to the list to cut down the noise.)
>
> On 16/06/2009, at 9:37 PM, MANI wrote:
>
>> First of all thanks for the clues.
>>
>> On 6/16/09, Richard Toohey  wrote:
>>> On 16/06/2009, at 7:08 PM, Richard Toohey wrote:
>>>
 [1] the index.php is really in /var/www/conf?
>>
>>No, it was another typo in mail, It's in /var/www/htdocs.
>>
 [2] you meant the index.php not to be valid PHP?  No  on purpose?
>>
>>Actually at first it was pure php but I changed it for testing
>> purposes, Now:
>>
>> $ cat /var/www/htdocs/index.php
>>
>> 
>> 
>> 
>>  Agent47 Test Page for Apache Installation
>> 
>>  
>>  
>>   
>> 
>>
>>> [4] What happens if you try
>>>
>>> php index.php
>>
>> $php /var/www/htdocs/index.php
>>
>> 
>> 
>> 
>>  Agent47 Test Page for Apache Installation
>> 
>>   
>> Hello PHP!  
>> 
>>
>>
>>> [5] What happens if you disable the mysql extension - just get php
>>> core working first?
>>
>> I removed mysql extension but no luck ... :(
>>
>>> [6] Anything from php -v or php -m that gives any clues?
>>
>> $ php -v
>>
>> PHP 5.2.8 with Suhosin-Patch 0.9.6.3 (cli) (built: Mar  1 2009
>> 15:20:21)
>> Copyright (c) 1997-2008 The PHP Group
>> Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
>> with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH
>>
>> $ php -m
>> [PHP Modules]
>> bcmath
>> calendar
>> ctype
>> date
>> dom
>> exif
>> filter
>> ftp
>> gettext
>> hash
>> iconv
>> json
>> libxml
>> mysqli
>> openssl
>> pcre
>> PDO
>> posix
>> Reflection
>> session
>> SimpleXML
>> sockets
>> SPL
>> standard
>> suhosin
>> sysvsem
>> sysvshm
>> tokenizer
>> wddx
>> xml
>> xmlreader
>> xmlwriter
>> zlib
>>
>> [Zend Modules]
>> Suhosin
>>
>>> [7] Did you really mean to install php5-mysql and mysql-SERVER?
>>> You might have meant mysql-CLIENT - makes more sense.
>>
>> No, I also needed mysql-server.



Re: Apache php weird problem

2009-06-16 Thread Joachim Schipper
On Tue, Jun 16, 2009 at 02:07:33PM +0430, MANI wrote:
> First of all thanks for the clues.

Are you, perchance, running -current? The http ABI was changed
(http://www.openbsd.org/faq/current.html#20090603), and you appear to be
running a port from -stable. (Which is not guaranteed to work, and
doesn't, in this case.)

You didn't post a dmesg and may not be running a kernel compiled by the
project, so I wasn't able to figure out whether you were running
-current.

For what it's worth, my Apache/PHP install works fine...

Joachim



Re: Apache php weird problem

2009-06-16 Thread MANI
First of all thanks for the clues.

On 6/16/09, Richard Toohey  wrote:
> On 16/06/2009, at 7:08 PM, Richard Toohey wrote:
>
>> [1] the index.php is really in /var/www/conf?

   No, it was another typo in mail, It's in /var/www/htdocs.

>> [2] you meant the index.php not to be valid PHP?  No > > on purpose?

   Actually at first it was pure php but I changed it for testing purposes, Now:

$ cat /var/www/htdocs/index.php




 Agent47 Test Page for Apache Installation



  


> [4] What happens if you try
>
> php index.php

$php /var/www/htdocs/index.php




 Agent47 Test Page for Apache Installation

  
Hello PHP!  



> [5] What happens if you disable the mysql extension - just get php
> core working first?

I removed mysql extension but no luck ... :(

> [6] Anything from php -v or php -m that gives any clues?

$ php -v

PHP 5.2.8 with Suhosin-Patch 0.9.6.3 (cli) (built: Mar  1 2009 15:20:21)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH

$ php -m
[PHP Modules]
bcmath
calendar
ctype
date
dom
exif
filter
ftp
gettext
hash
iconv
json
libxml
mysqli
openssl
pcre
PDO
posix
Reflection
session
SimpleXML
sockets
SPL
standard
suhosin
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
Suhosin

> [7] Did you really mean to install php5-mysql and mysql-SERVER?
> You might have meant mysql-CLIENT - makes more sense.

No, I also needed mysql-server.



Re: Apache php weird problem

2009-06-16 Thread Richard Toohey

On 16/06/2009, at 7:44 PM, Richard Toohey wrote:

[7] Did you really mean to install php5-mysql and mysql-SERVER?
You might have meant mysql-CLIENT - makes more sense.

D'oh!   More sending without thinking first - installing php5-mysql
should have pulled in mysql-CLIENT automatically.

That's enough from me.



Re: Apache php weird problem

2009-06-16 Thread Richard Toohey

On 16/06/2009, at 3:22 PM, MANI wrote:

# cd /var/www/conf
# vi index.php

  1
  2  PHP Test Page!
  3  
  4 Hello PHP!
  5  
  6 


[cut]
browsing to http://127.0.0.1/index.html shows *It Worked!* default  
page.


browsing to http://127.0.0.1/index.php will shows a blank page,  
when I view

source in firefox there in no html in source with following log:

[Tue Jun 16 07:45:41 2009] [notice] child pid 12856 exit signal  
Segmentation

fault (11)

[cut]

Just a few (probably dumb) questions ...

[1] the index.php is really in /var/www/conf?
[2] you meant the index.php not to be valid PHP?  No   
on purpose?

[3] the segfault is what the issue is?  Or the blank page?

Thanks.



Re: Apache php weird problem

2009-06-16 Thread Richard Toohey

On 16/06/2009, at 7:08 PM, Richard Toohey wrote:


On 16/06/2009, at 3:22 PM, MANI wrote:

# cd /var/www/conf
# vi index.php

  1
  2  PHP Test Page!
  3  
  4 Hello PHP!
  5  
  6 


[cut]
browsing to http://127.0.0.1/index.html shows *It Worked!* default  
page.


browsing to http://127.0.0.1/index.php will shows a blank page,  
when I view

source in firefox there in no html in source with following log:

[Tue Jun 16 07:45:41 2009] [notice] child pid 12856 exit signal  
Segmentation

fault (11)

[cut]

Just a few (probably dumb) questions ...

[1] the index.php is really in /var/www/conf?
[2] you meant the index.php not to be valid PHP?  No > on purpose?

[3] the segfault is what the issue is?  Or the blank page?

Thanks.

Hmm, number 3 was a dumb question, but I was thinking
down the lines of number 1 and number 2 - what are you
actually trying to do?

Having the html page go through the PHP engine does this
on stock i386 4.5 (so no segfault or blank page):

 PHP Test Page! Hello PHP!

[4] What happens if you try

php index.php

(i.e. from the command line.  Can you get anything to do with
PHP working - outside Apache first)

[5] What happens if you disable the mysql extension - just get php
core working first?

[6] Anything from php -v or php -m that gives any clues?

[7] Did you really mean to install php5-mysql and mysql-SERVER?
You might have meant mysql-CLIENT - makes more sense.

Hopefully a few clues from that.



Re: Apache php weird problem

2009-06-15 Thread MANI
On Tue, Jun 16, 2009 at 7:52 AM, MANI  wrote:

> # apachectl stop
> # tail -f /var/www/logs &
> # apachectl start
> #
>   3  
>   4 Hello PHP!
>   5  
>   6 
>
> # apachectl stop
> # tail -f /var/www/logs &
> # apachectl start
>
>

Sorry mistype I mean:

# apachectl stop
# tail -f /var/www/logs/error_log &
# apachectl start



Apache php weird problem

2009-06-15 Thread MANI
Hi misc,

#uname -a

OpenBSD agent47.bsd.org 4.5 GENERIC.MP#45 i386

# pkg_add -v php5-core
# pkg_add -v mysql-server-5.0.77
# pkg_add -v php5-mysqli-5.2.8

in /var/www/conf/httpd.conf :  *Include /var/www/conf/modules/*.conf*

in /var/www/conf/modules/php5.conf -> /var/www/conf/modules.sample/php5.conf
:
*LoadModule php5_module /usr/local/lib/php/libphp5.so*
*AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
DirectoryIndex index.php*

in /var/www/conf/php5 :  mysqli.ini -> /var/www/conf/php5.sample/mysqli.ini
also default php.ini in /var/www/conf exists.


# cd /var/www/conf
# vi index.php

  1
  2  PHP Test Page!
  3  
  4 Hello PHP!
  5  
  6 

# apachectl stop
# tail -f /var/www/logs &
# apachectl start
#
  3  
  4 Hello PHP!
  5  
  6 

# apachectl stop
# tail -f /var/www/logs &
# apachectl start
# [Tue Jun 16 07:42:38 2009] [notice] Initializing etag from
/var/www/logs/etag-state
[Tue Jun 16 07:42:38 2009] [notice] chrooted in /var/www
[Tue Jun 16 07:42:38 2009] [notice] changed to uid 67, gid 67
[Tue Jun 16 07:42:38 2009] [notice] Apache configured -- resuming normal
operations
[Tue Jun 16 07:42:38 2009] [notice] Accept mutex: sysvsem (Default: sysvsem)

browsing to http://127.0.0.1/index.html shows *It Worked!* default page.

browsing to http://127.0.0.1/index.php will shows a blank page, when I view
source in firefox there in no html in source with following log:

[Tue Jun 16 07:45:41 2009] [notice] child pid 12856 exit signal Segmentation
fault (11)

I also tried to LoadModule directly into httpd.conf without using any
Include file but no luck, also started apache in a non-chrooted environment
will not help.
File permission are also ok in htdocs: -r--r--r-- root bin index.php
Any Idea?