# Problem with PHP5 and Apache



## manyblue (Nov 24, 2010)

I heve installed apache ok.
I have done the following:


```
# cd /usr/ports/lang/php5
```

Installed


```
# make install clean
```

configured http.conf


```
# ee /usr/local/etc/apache22/httpd.conf
```

add


```
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
```

we go to the line DirectoryIndex

and add


```
DirectoryIndex index.php index.htm index.html
```

in the apache modules loaded must olready exist


```
LoadModule php5_module libexec/apache22/libphp5.so
```

modified loader.conf


```
# ee /boot/loader.conf
```

and add


```
accf_http_load=â€YESâ€
```

restart the service 

we also installed


```
/usr/ports/lang/php5-extensions
/usr/ports/databases/php5-mysql
/usr/ports/www/php5-session
/usr/ports/graphics/php5-gd
```

We check whether we really have php service, for this we will create a file named:  test.php  in /usr/local/www/apache/data 

edit


```
# ee / usr/local/www/apache22/data/test.php
```

In the file put the following code:


```
<? Php phpinfo ();?>
```

and I do not work and I donâ€™t  Know why. Can help me please.

Thank you very much


----------



## SirDice (Nov 24, 2010)

"It doesn't work" isn't very helpful and tells us nothing. Tell us _exactly_ what happens.

Can you connect to the webserver? Is there something shown? Does it show the source code for the web page? Does it show anything at all?


----------



## manyblue (Nov 24, 2010)

My problem is that I can not run php5 on Apache22.
I have installed Apache22 working perfectly with .htm and .html files but do not work with .php files.

The sequence of installation I did:
Apache22, php5, mysql5 and then install:

lang/php5-extensions
databases/php5-mysql
www/php5-session
graphics/php5-gd

but when you test a file. php browser gives me error. I do not know if I explained well so I started with free 3 weeks ago.

php5 install it as I have said in previous post.

As always, thank you very much for your attention.
Greetings


----------



## SirDice (Nov 24, 2010)

You just regurgitated what you said before and so we still don't know what happens.


----------



## manyblue (Nov 24, 2010)

I forgot, the index.html file that comes by default in apache in  /user/local/www/apache22/data/index.html  works perfectly. I deleted that file and I uploaded to that same directory another file index.html (UTF-8) simple, but does not open, but apache does not work if it responds.The same with files .php
What I have installed is

http://www.kitesurfelmedano.com/images/pkg_info.png


----------



## SirDice (Nov 24, 2010)

Yes, you already said that in post #1 and #3.


----------



## manyblue (Nov 24, 2010)

SirDice said:
			
		

> Yes, you already said that in post #1 and #3.



Yes.
I have two problems.
1) I have installed php5 and mysql60-server and apache22 do not work with index.php
2) The file .html apache default /usr/local/www/apache22/index.html if it works but I erase and upload the .html and other file server does not work.


----------



## SirDice (Nov 24, 2010)

manyblue said:
			
		

> 1) I have installed php5 and mysql60-server and apache22 do not work with index.php
> 2) The file .html apache default /usr/local/www/apache22/index.html if it works but I erase and upload the .html and other file server does not work.



Sir: I bought a car, filled it with gas but it doesn't work.
Dealer: What doesn't work?

Sir: I bought a car, went to the gasstation and filled it with gas but it doesn't work.
Dealer: Exactly what doesn't work?

Sir: I bought a BMW, went to a Shell station and filled it with gas but it doesn't work.

Can you tell why the car doesn't work? Me neither. 
Perhaps if the Sir told the dealer the check engine light was burning the dealer might know what the problem was.


You're getting an error, don't you think it might be helpful if you actually told us what that error is?


----------



## manyblue (Nov 24, 2010)

Thank you very much for your attention.

I repeat to you:

My problem is:
that I set up a server with FreeBSD, OK, and running the correct operating system, install apache22 and it worked because when you enter the url of the server I get the html test page "it is working", do not try another html file that had not mounted ftp to upload the file to the server, so I figured that was right, OK.

Then install php5, then install mysql and then

lang/php5-extensions
databases/php5-mysql
www/php5-session
graphics/php5-gd

I try the server with a file .php and will not, so I try to test html and will try it out with another html file uploaded by me and not go.
Summary: apache dasen't open php html htm files this is my probleme.
Thank


----------



## AndyUKG (Nov 24, 2010)

Check the allow deny settings for /usr/local/www/apache22/data/, by default apache installs with deny from all order deny,allow I think. Set to allow from all order allow,deny...

ta Andy.


----------



## manyblue (Nov 24, 2010)

Non-rolling thing, I decided to reinstall everything again.

My goal is to have a server with:

Apache, mysql, php, java, phpmyadmin phpsysinfo and pure-ftpd.

I just installed freeBSD and everything is okay and now I'm installing apache22. when I have done it up and running we'll talk again for php OK for you ????.

My intention is to mount after apache mysql and then php in this order, is it OK or NO ???.

Thank you very much for your attention offcorse.

Greetings fron Canary Islans


----------



## DutchDaemon (Nov 24, 2010)

How to ask questions the smart way. Try it.


----------



## manyblue (Nov 25, 2010)

New Here.
I'have installed freeBSD 8.0, apache22, mysql51-server and php5 with php5-extension, php5-mysql, php5-session and php5-gd.
When I install php5-session gave me error 1.
When I install php5-gd gave me error error no number.
Now, go with the browser and open the index.html file there and see what I keep various things that come out

http://manyblue.homeunix.com

I believe and I edit a file test.php and see what comes open

http://manyblue.homeunix.com/test.php

Finally for that in httpd.conf DirectoryIndex index.html and it only appears that I put  index.php but index.htm does not appear.

I hope I explained right now.
As always a healthy


----------



## jasonhirsh (Nov 25, 2010)

In regards to your error 1.  I imagine you also had a statement that that port was installed..  perhaps as a requirement for another port.   The pkg_info command tells you what is installed, I imagibe your php5 installation is broken.  You mighjt want o delete all the ports/packages and try again


Your link to index.html shows a default apache  index.html.  Either you plan to use the default directories or you have not changed the settings in httpd.conf

Your link to the test.php shows that php is not running...

hope that helps


----------



## manyblue (Nov 25, 2010)

I'm OK with the subject, aware.

I'm doing a video with more data (rc.conf, http.conf, pkg_info ...) to upload to internet and give you the URL for to see it.
There is also another option if you want, I have remote assistance enabled sshd access so you will enter and view the teme. As you want but the choice of the video I'm making.

Thank you very much for your attention to see if I can make this work.

Greetings


----------



## manyblue (Nov 25, 2010)

I forgot, the video is in wmv format.
Why is that monkeys have weight. In flv weighs me twice.
If you want in any specific format, let me know.


----------



## DutchDaemon (Nov 26, 2010)

> Why is that monkeys have weight. In flv weighs me twice.



I'm sure this means something, but not in English ....


----------



## manyblue (Nov 26, 2010)

http://www.abogadosodaly14.com/php5_apache.avi

[ 76.5 MB -- Mod. ]


----------



## DutchDaemon (Nov 26, 2010)

Have you checked the relevant log files, like httpd-error.log and httpd-access.log? Also see what /var/log/messages says when starting Apache, MySQL, etc. We don't need endless configuration files and lists of installed packages, we need errors.


----------



## manyblue (Nov 26, 2010)

http://www.abogadosodaly14.com/error.log_access.log.avi

http://www.abogadosodaly14.com/message.avi


----------



## manyblue (Nov 27, 2010)

AndyUKG said:
			
		

> Check the allow deny settings for /usr/local/www/apache22/data/, by default apache installs with deny from all order deny,allow I think. Set to allow from all order allow,deny...
> 
> ta Andy.



I understand this but I donÂ´t anderstand where must I do it, in httpd.conf ...... line ??? 

Thank you very much for your atention, forgive my ignorance but I just 3 or 4 weeks with freeBSD so I'm a newbie. But my best to get it is great.


----------



## jasonhirsh (Nov 27, 2010)

I don't know abouyt anyone else, but I have no idea why you atre posting videos of text files...  they also don't work

Open your default httpd.conf which should be in /usr/local/etc/apache22 with any editor... I use either ee or bedit.  Both of these have search functions..   search for teh etxt.. No one can tell you the line number as that would vary with changes made to the file.   Make sure you restart apache   (apachectl restart) to allow changes to take place


----------



## manyblue (Nov 27, 2010)

jasonhirsh said:
			
		

> I don't know abouyt anyone else, but I have no idea why you atre posting videos of text files...  they also don't work
> 
> Open your default httpd.conf which should be in /usr/local/etc/apache22 with any editor... I use either ee or bedit.  Both of these have search functions..   search for teh etxt.. No one can tell you the line number as that would vary with changes made to the file.   Make sure you restart apache   (apachectl restart) to allow changes to take place



The videos that I send you the URLs with data, the video http://www.abogadosodaly14.com/php5_apache.avi  has the httpd.conf but you must put the url directly in the navegator has 80 MB wait a moment for the discharge. The rest go well.

If you want I can send you de user and pass fot to came inside my server with putty or other program and to look it.

I have find to lines with text:


```
AddType text/html.shtml
DefaultType text/plain
```


----------



## jasonhirsh (Nov 28, 2010)

open your httpd.conf  with a text editor and search for the text.  You must have some form of text editor or you couldn't have gotten the server operating


----------



## manyblue (Nov 29, 2010)

As is before, I reinstalled FreeBSD 8.0 with ports tree,
After I updated and installed the updates of the ports tree using portsnap pre-installation.
And installed after apache2.2.17_1 with httpd.conf configuration.
generating mysql5.5-server after the grant tables to mysql and change the directory owner and group data, applied to rc.conf mysql_enable = "YES".
So far so properly installed and no errors. At the moment Apache works well.

http://manyblue.homeunix.com

First, because in DirectoryIndex, index.html only appears when I installed it for first time appeared me index.htm and index.html??.

Second, the only lines that contain tex as I can find are


```
AddType text / html.shtml
DefaultType text / plain
```

As this updated php5, what would be my next step??

As always thank you very much and sorry for the inconvenience.
Greetings


----------



## manyblue (Nov 29, 2010)

I have installed libxml2 (2.7.8)


----------



## manyblue (Nov 29, 2010)

I have installed on my laptop WampServer. I looked at the httpd.conf configuration and I've seen such AllowOverride All while on my freeBSD server put AllowOverride None. I looked at the php configuration is exactly like I did in my freeBSD httpd.conf (AddTypy aplication, and loadmodule php DirectoryIndex index.php)
I still do not understand why php does not work.


----------



## jasonhirsh (Nov 30, 2010)

*It doesn't appear you have configured httpd.conf*

I would suggest that you  take a look at http://www.freebsdmadeeasy.com/tutorials/web-server/install-php-5-for-web-hosting.php


I found this to be of an extreme help to me when I first did my server

It has step by step directions on the installation

1. The code you mentioned


```
AddType text / html.shtml
DefaultType text / plain
```

has nothing to do with enabling php5

2.  Maybe you webserver works on your intranet but it does not resolve on the internet


----------



## manyblue (Nov 30, 2010)

jasonhirsh said:
			
		

> I would suggest that you  take a look at http://www.freebsdmadeeasy.com/tutorials/web-server/install-php-5-for-web-hosting.php
> 
> 
> I found this to be of an extreme help to me when I first did my server
> ...




As always thank you very much.
I'll tell you that this manual you tell me is the first I've followed and nothing, it will not php5.
At this moment I am reinstalling everything again and will come back to follow the manual that you tell me.

Another thing, I searched through the official website of php and I and found this:

When I upgrade to apache 2.2, this: 


```
AddType application/x-httpd-php .php5 
AddType application/x-httpd-php .php42 
AddType application/x-httpd-php .php4 
AddType application/x-httpd-php .php3 
AddType application/x-httpd-php .php 
AddType application/x-httpd-php .phtm 
AddType application/x-httpd-php .phtml 
AddType application/x-httpd-php .asp
```

...does not worked for me, so I did this: 


```
<FilesMatch "\.(php*|phtm|phtml|asp|aspx)$"> 
SetHandler application/x-httpd-php 
</FilesMatch>
```

Another interesting point with Apache 2.2 is following. 
Let suppose we installed PHP as module. But for some directory, we need to use PHP as CGI (probably because of custom configuration). This can be done using: 


```
<FilesMatch "\.(php*|phtm|phtml|asp|aspx)$"> 
SetHandler none 
</FilesMatch> 

AddType application/x-httpd-php-custom .php 
Action  application/x-httpd-php-custom  /cgi-bin/php-huge
```

Note type must be different than "application/x-httpd-php" and also you need to deactivate the handler on sertain extention. You can do mixed configuration: 


```
<FilesMatch "\.(php)$"> 
SetHandler none 
</FilesMatch> 

AddType application/x-httpd-php-custom .php 
Action  application/x-httpd-php-custom  /cgi-bin/php-huge
```

in such case files like *.php5 and so on will be parsed via module, but *.php will go to php-huge executable.


----------



## manyblue (Nov 30, 2010)

jasonhirsh dear friend:
I will not tell you all my life, but I'll tell you that my main profession is Captain of the Spanish Merchant Navy, I've been captain for 28 years, so I have almost always been away from home, for those circumstances I have not seen it grow to my two daughters, my wife says she does not want angry navigate more so for this I have trained in this world of computing during 4 years. Currently not navigate, I am dedicated to repair and assemble computers and corporate networks as well as web design and multimedia both dynamic and static pages.
I have two friends working in the astrophysical observatory in La Palma, one works in the Royal Greenwich Observatory and the other in the Nordic Telescope, the last doctor who has me in 3 months get a place in office but wants to learn to ride with freeBSD server to give me the job is stable and well paid.
For all these reasons it is vital to my learning to ride a minimum server with

freeBSD + apache + php + mysql + phpmyadmin + pure-ftpd + phpsysinfo

I have mounted freeBSD 8.0 and apache, mysql I am amounting now, when I finished I'll say say you here in this forum. I invite you to come into my server and tell me what I'm doing wrong.
My private email is armando12347@yahoo.com, send me email and I send you user and pass and su pass.

You don't know what as you would appreciate for this help because as I said before is vital for me.

A big hug from the Canary Islands.


----------



## AndyUKG (Nov 30, 2010)

Hi,

  Im guessing you are using something like translate.google.com and its causing a bit of confusion. This is an English language forum, but I speak spanish so if you don't understand my post(s) then let me know.
Also if you are not only new to FreeBSD, but also new to the "vi" editor then you need to learn the basics of "vi" first. For example this guide might help:

http://www.eng.hawaii.edu/Tutor/vi.html


Now, assuming you know how to use "vi" and search for and change text, you need to look in your httpd.conf and change the section that looks like this:


```
DocumentRoot "/usr/local/www/apache22/data"

# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
     AllowOverride None
     Order deny,allow
     Deny from all
</Directory>
```

to


```
DocumentRoot "/usr/local/www/apache22/data"

# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
     AllowOverride All
     Order allow,deny
     Allow from all
</Directory>
```

thanks Andy.


----------



## manyblue (Nov 30, 2010)

Andy, many thanks for your attention, this is the first.
I looked at the manual installation of apache and php on freeBSD made easy, according to your advice. I have done your recomendation in httpd.conf


```
DocumentRoot "/ usr/local/www/apache22/data"

# First, we configure the "default" to be a very Restrictive September of
# Features.
#
<Directory />
     AllowOverride All
     Order allow, deny
     Allow from all
</ Directory>
```

but I think that something was missing because no work

http://manyblue.homeunix.com(for html)

http://manyblue.homeunix.com/test.php (not open)

I mounted apache according to the FreeBSD made easy manual,but I did not made  this


```
# mv /usr/local/www/apache22/usr/local/www/
# sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf
```

It has something to do with what happens?

There are more lines in httpd.conf with AllowOverride None  ???

Andy, Thankyou ...................................


----------



## manyblue (Nov 30, 2010)

PD:
In case you do not know, I remember you that my httpd.conf is all defaults except the changes made according with the manual of php in freeBSD made easy.


----------



## manyblue (Dec 1, 2010)

As the post is becoming too long, Andy, I'll follow your advice at the foot your references. Manuals: apache, php, mysql from FreeBSD made easy.
If you think I'm wrong, tell me and if I have any questions I ask you OK. So stay this post for idiots like me.
Only tell you something, I know a litle about freeBSD because from tame ago I was a server with FreeBSD 6.0, a friend help me and I was operated perfectly, but without php my friend could not. I use the editor ee for convenience but I can use vi without problems.

I install freeBSD 8.0 with the ports tree, during the instalation, I choose the option with ssh,DHCP and I created my user to the group wheel.

The following is to put at my server one static ip


```
# vi /etc/rc.conf
```

I search the line 


```
# ifconfig_em0="DHCP"
```

and I made


```
# ifconf_emo="inet 192.168.1.xxx netmask 250.250.250.0"
# defaultrouter="192.168.1.1"
```

quit the editor vi and save changes

The following is to set ssh for the remote access and I made


```
# vi /etc/hosts.allow
```

and I search the line  ALL : ALL : allow must be without coment (no #)

quit the editor vi and save changes


```
# vi /etc/ssh/sshd_config
```

and I search the line (Listen: 0.0.0.0) must be without coment (no #)

quit the editor vi and save changes


```
vi /etc/group
```

and I search the line (wheel:root) and at the and write (wheel:root,user) for to add my user to the wheel group and then to have privileges of super user.

the following is to install


```
# cd /usr/ports/ports-mgmt/portmaster
# make install clean clean-depend
```

after, I update the ports tree


```
# cd /usr/ports
# portsnap fetch extract
# portsnap fetch update
```

APACHE 2.2.17_1


```
# cd /usr/ports/www/apache22
# make install clean clean-depend
```

all options for default

I install the dependences: PERL with the default options, Options for m4 the default options, Options for libiconv the default options, Options for apr-ipv6-devrandom-gdbm-db42the default options, Option for Phyton 26 the the default options.

the following


```
# vi /etc/rc.conf
```

add the line   


```
apache22_enable="YES"
```

quit the editor and save changes


```

```
vi /boot/loader.conf

add the line


```
accf_http_load="YES"
```

quit the editor and save changes

the following


```
# vi /usr/local/etc/apache22/httpd.conf
```

The following lines without coments (no #)


```
ServerRoot "/usr/local/"
DocumentRoot "/usr/local/www/apache22/data/"
```

should appear


```
LoadModule unique_id_module libexec/apache22/mod_unique_id-so
```

I change


```
ServerName manyblue.homeunix.com:80
ServerAdmin xxxxx@xxxxx.com
```

I search the lines


```
DocumentRoot "/usr/local/www/apache22/data"

# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
     AllowOverride None  
     Order allow,deny
     Allow from all
</Directory>
```

and I made


```
DocumentRoot "/usr/local/www/apache22/data"

# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
     AllowOverride All
     Order allow,deny
     Allow from all
</Directory>
```

quit the editor vi and save changes

.............ANDY................

know, the manual of freeBSD made easy say me

Currently in Apache 2.2.x the default directory is /usr/local/www/apache22 instead of
the old default. This should be changed to the standard directory of
/usr/local/www/data in every spot. You can move the folder like this if you do not
have a previous version of apache installed that has created the directory already.


```
# mv /usr/local/www/apache22 /usr/local/www/
```

You can replace it easily with sarep from the ports with this command


```
# sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf
```

This is enough to get the server going so that you can check that it will run, so do
that now.

Must I do it ????????????

my standar directory is


```
/usr/local/www/apache22/data/
```


To follow, I hope for your analysis, forgive my stupidity or ignorance.
I think that currently the lack of language should not be a barrier to be able to communicate.

ANDY, as always thank you very much for your attention and lost time.


----------



## AndyUKG (Dec 1, 2010)

Ok, so following on from your last post it just remains to install PHP. Very importantly you must ensure that you include the option to build the apache module when compiling PHP.


```
cd /usr/ports/lang/php5
make clean
make config  (here you need to select the apache module option which is off by default)
make deinstall  (in case you have a previous installation)
make install
```

Following that you still need to make the update to the httpd.conf to enable php file types:


```
AddType application/x-httpd-php .php .php3 .phtml
```

I have this directly under the "LoadModule" for php5.

That should be it. DonÂ´t forget you need to restart apache for the above change to take effect,

thanks Andy.


----------



## manyblue (Dec 1, 2010)

I anderstand Andy, but it is not weel. I followed the manual but it was impossible to do this:


```
# mv /usr/local/www/apache22 /usr/local/www/
# sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf
```

I explain you;

I went to


```
# cd /usr/ports/textproc/sarep
# make install clean clean-depend
# mv /usr/local/www/apache22 /usr/local/www
```

To here it is well, but when I do


```
# sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf
```

FreeBsd say me it is impossible because sarep it is not a command.
I think that this is my probleme, at the and. I tell you more


```
# cd /usr/local/etc/apache22/
# ls
# Includes       extras          magic
   envvars.d     httpd.conf     mime.types

# cd /usr/local/www/apache22/
# ls 
# cgi-bin    data    error    icons
```

I am doing the change for the set in


```
# /usr/local/etc/apache22/httpd.conf
```

I think that I must do


```
# cp /usr/local/etc/apache22  /usr/local/www/apache22
```

to copy the files inside of  /usr/local/etc/apache22  to  /usr/local/www/apache22

and at the and


```
# cd /usr/local/www/apache22/
# ls
# Includes       extras          magic
   envvars.d     httpd.conf     mime.types
   cgi-bin          data            error              icons
```

I am not sure of this but I think the probleme is here.

Tell me something  ???????   I canÂ´t to follow with php5

And one ask;  must I did the configuration for php5 in 


```
# vi /usr/local/www/apache22/httpd.conf
```
  ??????????????

ANDY, as always thank you very much for your attention and lost time.


----------



## manyblue (Dec 2, 2010)

[ Spanish text removed - Mod. ]


----------



## AndyUKG (Dec 2, 2010)

Hi,

  If you have found a problem with permissions then great. I'm not sure exactly what permission issue you have found though! The only requirement for html or any other content you want to be visible via apache is that it is readable by the user account that the apache daemons run as, which by default on FreeBSD is www. The easiest way to achieve this is to just "chown www myfile" any file or directory you require. By default files will be readable by the owner so you shouldn't need to mess with chmod.

So does you php test page now work?

thanks Andy.


----------



## manyblue (Dec 2, 2010)

AndyUKG said:
			
		

> Hi,
> 
> If you have found a problem with permissions then great. I'm not sure exactly what permission issue you have found though! The only requirement for html or any other content you want to be visible via apache is that it is readable by the user account that the apache daemons run as, which by default on FreeBSD is www. The easiest way to achieve this is to just "chown www myfile" any file or directory you require. By default files will be readable by the owner so you shouldn't need to mess with chmod.
> 
> ...



I do not know exactly, but somewhere else toll me yes because the people out of the server should be able to read,run but not write. I'm on it.


```
# Chmod -R 777 data
```

or 


```
# Chmod -R 777 index.html
```


Only ever give thanks for your input and concern.
When I have the solution I will post them here by way of curiosity.

You are welcome to come anytime canary more specifically to La Palma, you know my email, write me and we agreed if you want.

Greetings


----------



## codeWarrior (Dec 2, 2010)

so the first thing to do is make sure PHP is actually installed and working on the box... then make sure you invoke PHP correctly from within an Apache-PHP page...  

at the command line: 


```
[root] </usr/ports--> php -v
PHP 5.3.3 with Suhosin-Patch (cli) (built: Dec  1 2010 20:24:26)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root] </usr/ports-->
```

A second test at the command line is this: 


```
[root] </usr/ports--> php -info
```

You should get lot's of static back which that'll tell you PHP is installed and working [or not] and how it is configured. 

the other thing: from your code snippet: you said you did this in a test file: 


```
<? Php phpinfo ();?>
```

that won't work... it should be like this: 


```
<?php phpinfo (); ?>
```

note the "<?php" with no spacing... 

finally: Did you restart Apache after modifying the httpd.conf file ? 


```
[root] </--> apachectl graceful
```


----------



## manyblue (Dec 3, 2010)

1)


```
# cd /usr/ports
# php -v
PHP 5.3.3 with Suhosin-Patch (CLI)n(built: 2 2010 19:40:48)
Copyright (c) 1997-2009 The PHP Group
Zen Engine v2.3.0, Copyright (C) 1998-2010 Zen Tachnologies
```

2) 


```
# cd /usr/ports
# php -info
```

http://www.abogadosodaly14.com/phpinfo.avi

Note: To view the video waiting for downloads are about 13 MB

3) NO


```
# echo "<?php phpinfo (); ?>" >> /usr/local/www/apache22/data/test.php
```

4) No


```
# reboot
```



I think my probleme is


```
# cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
```

Why ???


```
cd /usr/local/etc/ 
# ls
devd
man.d
pam.d
php
php.conf
php.ini-development
php.ini-production
rc.d
xml2Conf.sh
xlstConf.sh
apache22
```

What must I do


```
# cp /usr/local/etc/php.ini-development /usr/local/etc/php.ini
```

I wait for your reply

Thank


----------



## manyblue (Dec 5, 2010)

Since no one tells me anything, I will tell you just I need the apache configuration (httpd.conf) for the php5 module, the load php5 module it is only that I need the rest. This was my real problem, php5 works but only reads the php file does not execute it.

I've cast a thousand ways, says the official website of php for apache (php and apache) and nothing, made easy php and apache and nothing , etc and nothing ............

If you want to help me OK, if donÂ´t want to help I will understand it and you can close the post.

Thank you very much for attention.

PD: I have apache 2.2.17_1 and php 5.1


----------



## AndyUKG (Dec 5, 2010)

Lets start again, ignoring the guides you have been using (it really should be very easy).

Firstly can you confirm this file exists?

/usr/local/libexec/apache22/libphp5.so

thanks Andy.


----------



## beesatmsu (Dec 5, 2010)

I went inside his server and fixed his problem...it seems to be a httpd.conf configuration...I sent him mine first, and he said his were ok...but after I replaced with mine, it magically worked....

I am assuming that he is now happy


----------



## manyblue (Dec 5, 2010)

Too hapy

thank thank thank Mr. Zachary Huang

but there is much difference between what was Zachary and manuals I've read


----------



## manyblue (Dec 5, 2010)

Who was Zachary or beesatmsu?


----------



## beesatmsu (Dec 5, 2010)

I am who I am


----------



## manyblue (Dec 6, 2010)

OK thank you beesatmsu and I remember my offer.


----------



## manyblue (Dec 6, 2010)

I have reinstalled and all is OK

Beesatmsu:

Thank to you. IÂ´m so happy!

And now for:

1) puredb + pure-ftpd 2) phpsysinfo 3) phpmyadmin 4) DarwinStreamingServer + mpeg4 5) MLDonkey 6) Virtual Server for the moment.

Kind regards from Canary


----------



## Bukkie (Mar 3, 2011)

beesatmsu said:
			
		

> I went inside his server and fixed his problem...it seems to be a httpd.conf configuration...I sent him mine first, and he said his were ok...but after I replaced with mine, it magically worked....
> 
> I am assuming that he is now happy



Hii beesatmsu,

I'll be grateful if you can please send a copy of the httpd.conf file you sent to manyblue. I am also working on a FreeBSD server but the [cmd=]# echo "<?php phpinfo (); ?>" >> /usr/local/www/apache22/data/test.php[/cmd] code is not giving any output in the browser, it is just blank without any error message being displayed in the browser.

Look forward to reading from you or any other person that wants to help out.

Thank you.


----------

