Discussion:
[PHP-INSTALL] New to PHP
Col Day
2010-10-04 06:25:19 UTC
Permalink
Hi all,

Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule
(after telling me what I've done wrong)) and have installed Apache 2.2 and
PHP 5.3.3 onto a laptop running Vista. (yes I know!!!).

I've had Apache running fine with my basic web site created using Serif's
Webplus10 but wanted to experiment with PHP as I want an uploadable area on
my website for my friends and family to submit video/photos.

I've checked the install of PHP using php -v and I get the output that

PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20)

but when I try and go to the test.php file (below) I get an http 403 webiste
requires you to log in. Error message.

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line
<?php
echo "<p>This is a PHP line</p>";
phpinfo();
?>
</body>
</html>

This is the text of the test.php file which I have plonked down in
/apache/htdocs

What have I missed?

the Dummies book is quoting PHP 5.0.0 as the latest release so not too far
away really.

Thanks for your help.

Cheers.

Col Day
Hendrik Schmieder
2010-10-05 08:10:44 UTC
Permalink
Post by Col Day
Hi all,
Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule
(after telling me what I've done wrong)) and have installed Apache 2.2 and
PHP 5.3.3 onto a laptop running Vista. (yes I know!!!).
I've had Apache running fine with my basic web site created using Serif's
Webplus10 but wanted to experiment with PHP as I want an uploadable area on
my website for my friends and family to submit video/photos.
I've checked the install of PHP using php -v and I get the output that
PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20)
but when I try and go to the test.php file (below) I get an http 403 webiste
requires you to log in. Error message.
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line
<?php
echo "<p>This is a PHP line</p>";
phpinfo();
?>
</body>
</html>
This is the text of the test.php file which I have plonked down in
/apache/htdocs
What have I missed?
the Dummies book is quoting PHP 5.0.0 as the latest release so not too far
away really.
Thanks for your help.
Cheers.
Col Day
Look at the apache configuration and apache error log.

Hendrik
Ferenc Kovacs
2010-10-05 10:58:51 UTC
Permalink
Post by Col Day
Hi all,
Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule
(after telling me what I've done wrong)) and have installed Apache 2.2 and
PHP 5.3.3 onto a laptop running Vista. (yes I know!!!).
I've had Apache running fine with my basic web site created using Serif's
Webplus10 but wanted to experiment with PHP as I want an uploadable area on
my website for my friends and family to submit video/photos.
I've checked the install of PHP using php -v and I get the output that
PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20)
but when I try and go to the test.php file (below) I get an http 403 webiste
requires you to log in. Error message.
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line
<?php
echo "<p>This is a PHP line</p>";
phpinfo();
?>
</body>
</html>
This is the text of the test.php file which I have plonked down in
/apache/htdocs
What have I missed?
the Dummies book is quoting PHP 5.0.0 as the latest release so not too far
away really.
Thanks for your help.
Cheers.
Col Day
check out:
http://hu.php.net/manual/en/install.windows.installer.msi.php
and
http://hu.php.net/manual/en/install.windows.manual.php

my guess is, that you didn't added the required parts to your apache
configuration (LoadModule, AddType, DirectoryIndex)

Tyrael
Ferenc Kovacs
2010-10-20 05:25:51 UTC
Permalink
how/where to unsubscribe from this elist?
thanks in advance
http://www.php.net/mailing-lists.php

Tyrael
El Reggae Dancer
2010-10-20 08:09:50 UTC
Permalink
Hello,

I have installed PHP 5.3.3. (Solaris 10).
Is the bug submitted in 2004 (http://bugs.php.net/29698) fixed in PHP 5.3.3 ?

I have set inculde_path in my php.ini as following:
include_path = "/var/php/include:."

/var/php/include has 2 subdirectories:
/var/php/include/dir1
/var/php/include/dir2

I have vars.php file in /var/php/include/dir1

and my PHP script : test.php
===========
<?php
echo "A $color $fruit"; // A
include 'vars.php';
echo "A $color $fruit"; // A green apple
?>
============
when I run this script, it's not working as expected, and I've got errors like:
Warning: include(vars.php) [function.include]: failed to open stream: No such
file or directory in /apache2/htdocs/test.php on line 5
Warning: include() [function.include]: Failed opening 'vars.php' for
inclusion

(include_path='/var/php/include:.') in /apache2/htdocs/test.php on line 5

The script is working either I use :
include 'dir1/vars.php'
or
I move the vars.php from /var/php/include/dir1 to /var/php/incude

So my question is :
is include_path recursive ?
Or should I add all subdirectories in "include_path" ?
Hendrik Schmieder
2010-10-22 07:11:33 UTC
Permalink
Post by El Reggae Dancer
Hello,
I have installed PHP 5.3.3. (Solaris 10).
Is the bug submitted in 2004 (http://bugs.php.net/29698) fixed in PHP 5.3.3 ?
include_path = "/var/php/include:."
/var/php/include/dir1
/var/php/include/dir2
I have vars.php file in /var/php/include/dir1
and my PHP script : test.php
===========
<?php
echo "A $color $fruit"; // A
include 'vars.php';
echo "A $color $fruit"; // A green apple
?>
============
Warning: include(vars.php) [function.include]: failed to open stream: No
such
file or directory in /apache2/htdocs/test.php on line 5
Warning: include() [function.include]: Failed opening 'vars.php' for
inclusion
(include_path='/var/php/include:.') in /apache2/htdocs/test.php on line 5
include 'dir1/vars.php'
or
I move the vars.php from /var/php/include/dir1 to /var/php/incude
is include_path recursive ?
Or should I add all subdirectories in "include_path" ?
include_path is NOT recursive .


Hendrik
El Reggae Dancer
2010-10-26 10:09:02 UTC
Permalink
Hello,

I've compiled PHP 5.3.3 with Zend.
Sometimes, my Apache 2.2.11 crashed and created a core dump (probably due to the
Zend enabled in PHP).
OS : Solaris 10 10/09 s10x_u8wos_08a X86

Apache logfile:
---------------

[Mon Oct 25 13:11:47 2010] [notice] child pid 3485 exit signal Segmentation
fault (11)
possible coredump in /var/opt/webstack/apache2/2.2/logs
and the Apache log file is full of the following message:
------------------------------------------------------

[Fri Oct 22 15:03:18 2010] Script:
'/var/opt/webstack/apache2/2.2/htdocs/oracleimage.php'
---------------------------------------
Zend/zend_language_scanner.l(697) : Block 0x0df81c14 status:
Beginning: Cached
Freed (invalid)
Start: OK
End: OKPHP ERROR logfile:
---------------------
[25-Oct-2010 14:31:35] PHP Fatal error: Allowed memory size of 134217728 bytes
exhausted at /opt/src/php-5.3.3/Zend/zend_opcode.c:48 (tried to allocate 4864
bytes) in /var/opt/webstack/apache2/2.2/htdocs/inc/Module.php(64) : eval()'d
code on line 1

Here below is my Backtrace:
-----------------------------
gdb /opt/webstack/apache2/2.2/bin/httpd core

Core was generated by `/opt/webstack/apache2/2.2/bin/httpd -D 32bit -f
/etc/opt/webstack/apache2/2.2/h'.
Program terminated with signal 11, Segmentation fault.
[New process 69021 ]
[New process 134557 ]
#0 0xfd614e6c in zend_mm_check_ptr (heap=0x81e0790, ptr=0x5a5a5a5a,
silent=1,
__zend_filename=0xfdb16fb4 "/opt/src/php-5.3.3/Zend/zend_opcode.c",
__zend_lineno=284, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /opt/src/php-5.3.3/Zend/zend_alloc.c:1347
1347 if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev) {
(gdb)
(gdb) bt
#0 0xfd614e6c in zend_mm_check_ptr (heap=0x81e0790, ptr=0x5a5a5a5a,
silent=1,
__zend_filename=0xfdb16fb4 "/opt/src/php-5.3.3/Zend/zend_opcode.c",
__zend_lineno=284, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /opt/src/php-5.3.3/Zend/zend_alloc.c:1347
#1 0xfd616374 in _zend_mm_free_int (heap=0x81e0790, p=0x5a5a5a5a,
__zend_filename=0xfdb16fb4 "/opt/src/php-5.3.3/Zend/zend_opcode.c",
__zend_lineno=284, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /opt/src/php-5.3.3/Zend/zend_alloc.c:1983
#2 0xfd617196 in _efree (ptr=0x5a5a5a5a, __zend_filename=0xfdb16fb4
"/opt/src/php-5.3.3/Zend/zend_opcode.c", __zend_lineno=284,
__zend_orig_filename=0x0, __zend_orig_lineno=0) at
/opt/src/php-5.3.3/Zend/zend_alloc.c:2351
#3 0xfd62e6c5 in destroy_op_array (op_array=0x8e4a630) at
/opt/src/php-5.3.3/Zend/zend_opcode.c:284
#4 0xfd62e05b in destroy_zend_function (function=0x8e4a630) at
/opt/src/php-5.3.3/Zend/zend_opcode.c:115
#5 0xfd62e081 in zend_function_dtor (function=0x8e4a630) at
/opt/src/php-5.3.3/Zend/zend_opcode.c:127
#6 0xfd6468b3 in zend_hash_apply_deleter (ht=0x81e0a38, p=0x86f0e48) at
/opt/src/php-5.3.3/Zend/zend_hash.c:611
#7 0xfd646d9d in zend_hash_reverse_apply (ht=0x81e0a38,
apply_func=0xfd627f12 <clean_non_persistent_function>)
at /opt/src/php-5.3.3/Zend/zend_hash.c:760
#8 0xfd628991 in shutdown_executor () at
/opt/src/php-5.3.3/Zend/zend_execute_API.c:309
#9 0xfd6389a3 in zend_deactivate () at /opt/src/php-5.3.3/Zend/zend.c:890
#10 0xfd5d01f3 in php_request_shutdown (dummy=0x0) at
/opt/src/php-5.3.3/main/main.c:1633
#11 0xfd6ed100 in php_apache_request_dtor (r=0x83d4510) at
/opt/src/php-5.3.3/sapi/apache2handler/sapi_apache2.c:509
#12 0xfd6ed861 in php_handler (r=0x83d4510) at
/opt/src/php-5.3.3/sapi/apache2handler/sapi_apache2.c:681
#13 0x0807c038 in ap_run_handler ()
#14 0x0807c438 in ap_invoke_handler ()
#15 0x08087a55 in ap_process_request ()
#16 0x08085603 in ?? ()
#17 0x083d4510 in ?? ()
#18 0x00000004 in ?? ()
#19 0x083d4510 in ?? ()
#20 0xfed63b5a in proc_mutex_fcntl_release () from
/opt/webstack/apache2/2.2/lib/libapr-1.so.0
#21 0x0808207c in ap_run_process_connection ()
#22 0x0808c36c in ?? ()
Is this a PHP bug, or my PHP is not correctly compiled and installed ?
Any help would be appreciated.

El Dancer

Loading...