Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Web Hosting


Advertisements:




SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Configuring Apache To Run Php Without Shebang Line


I posted this problem in the PHP forum without a response. I thought this forum might be better.


View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Configuring MySQL/Apache To Run A Larger Website More Efficiently
I'm running a comic site on a dedicated linux box that has weekly releases. When a new release comes out I'll typically get 4000-5000 unique hits an hour. The problems started when I set up a MySQL download logging system, that would query and display the file names when the user loads the site, and update +1 when they download a comic. Yesterday after a release, the site became very slow to access, and after about 20 seconds you'd connect and be able to browse freely at nice speeds but if you went idle you'd have to wait about 20 seconds to connect again. The other domains on the server were running fine, and I could access my whm fine as well, the server load was 0.10 or lower.

I'm assuming there's a max connection limit somewhere either on the mysql or apache side that's restricting the site from handling the load it's getting. I've poked around google and researched it a bit but couldn't really find much. I don't have an enormous amount of time to invest in this because it's just a hobby so I'd appreciate any help one of you could offer!

View Replies!   View Related
WHM Is Not Actually Configuring Apache?
I'm over here trying to rebuild php with GD in WHM, I go through the entire motion of Apache Update (with GD selected as a PHP Module) and ummmm... after it's done, I check my phpinfo() and there is no GD section, let alone has the build date been changed.

View Replies!   View Related
Configuring Subdomains In Apache On A Localhost
I'm currently trying to configure apache 2 to handle subdomains. This is on a local machine (not tied to any domain names) and I'm only doing it to research how the final structure of a site 'could' be setup.

Basically I have a single install of Apache 2 running. The outcome eventually should be to have specific sub domains that all point to the same document root as the actual domain name. So eventually I will have:

http://www.mydomain.com
http://subdomain1.mydomain.com
http://subdomain2.mydomain.com

with both subdomains showing the content at mydomain.com (there is reasoning behind this but I'm not gonna go into that).

I have apache setup as follows:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>


<VirtualHost *:80>
ServerName subdomain1.daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName subdomain2.daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>

Now on my local machine, only the top one works - the subdomains dont. if I add the following into my hosts file in windows, they all work:
127.0.0.1 daneastley
127.0.0.1 subdomain1.daneastley
127.0.0.1 subdomain2.daneastley

the problem being, that I wish to test this enviroment on the local network. How would I go about having every computer being able to access this? I'm assuming it comes down to DNS stuff.

View Replies!   View Related
Configuring Apache With SSL On Windows
i couldn't find a more suitable category to put this post in: I am setting up a development server local to my office here, so that we can develop projects using an SVN app, but the SVN system needs SSL for logging in. i am now going round in circles where httpd.exe cannot start as a service from the apache monitor, with the following error:

The Apache service named reported the following error:
>>> httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.84 for ServerName
in the windows event viewer.

I'm using:
Windows XP Home edition, SP3
Apache 2.2.9
full computer name is devserver
workgroup is WORKGROUP

I used openssl bundled with this version of apache to generate the SSL certificate, and they all seem to be ok. When i change the line

SSLEngine on

in the httpd-ssl.conf file, the apache service starts when the SSLEngine is off, but not when the SSLEngine is on.

i have trawled the internet but not found any answer. ive checked thru httpd.conf and httpd-ssl.conf several times but i just can't see anything wrong (although im not entirely experienced!).

View Replies!   View Related
Configuring PHP To Work With MySql
I'm using Windows XP and installed Apache, PHP 5 and MySql 5. They were all working before, but recently I had to format my hard drive. Fortunately, I had an image of my computer created from before but MySql was not installed when that image was created.

After deploying that image, everything seems to be working fine. The server is running and PHP scripts are executing as well. But I can't seem to have MySql to work. I've followed many tutorials online, but have no luck.

I have edited the php.ini file to point to the correct directory that holds the extentions or dll's. I also enabled the following:

extension=php_mbstring.dll
extension=php_mysqli.dll
extension=php_mysql.dll

I already tested to see if MySql was correctly installed by using the command line client and it seems to be installed. I was able to log in and see the default databases created.

But when I run the following php script

<? phpinfo() ?>

I don't see the MySql section anywhere and that's why I'm assuming that PHP is not currently working with MySql for me. However, interestingly, I do see the "mbstring" section, which I assume should show only if MySql is working with PHP. But nothing else related to MySql info shows up. I've attached part of the screen shot if it helps you.

View Replies!   View Related
Configuring Php/mysql On IIS Server
I have setup php and mysql on a windows IIS 6 server. php has installed fine and works but I have 2 problems

1. When i browse to http://localhost i get a 403 error but when browsing to http://localhost/index.php it works fine. It makes me think that the server does not know what extension to default to when doing a directory listing

2. I have phpmyadmin installed and the cfg file is set to do a 'config' authentication. That works but everytime i go to submit a form to create a new database or anything i get prompted with an HTTP user/pass. I'm not sure if this is a phpmyadmin issue or a php configuration issue

View Replies!   View Related
Strip Whitespace From Each Line Of PHP File
I have a load of PHP files that need trimming down, so for example

Code:
<html>
<?php
$loads_of_stuff = 1231231;
?>
</html>
change to

Code:
<html>
<?php
$loads_of_stuff = 1231231;
?>
</html>

There are 000's of lines, so some awk command or something similiar would be great to execute on each file.

View Replies!   View Related
PhpBB2 Emailer.php Line 234 Error
I'm running CentOS with a postfix mail server.

I haven't experienced mail problems on other CMS systems - so the basic setup should be working okay - but apparently not that well.

I get the famous emailer.php line 234 error when some users send PMs to each other... The PMs go through, but the error is annoying none the less.

Does anyone have a decent solution for this?

The phpbb community advise to make a Google search (http://www.google.com/search?q=configuring+php+mail ) or use SMTP just don't do it for me - and I don't want to leave some big hole for spammers.

View Replies!   View Related
PHP Warning: Module 'SQLite' Already Loaded In Unknown On Line
[16-Jun-2008 17:13:17] PHP Warning: Module 'SQLite' already loaded in Unknown on line 0
[16-Jun-2008 17:13:17] PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0

I'm getting this a lot lately on some of my websites with DB in use

Using a cpanel/centos box with mysql 5 and php 5

View Replies!   View Related
Could I Run Apache
with 64mb RAM guaranteed, and 256 burst?

I won't be using MySQL or anything, just Apache. And it will probably only be used for directory listings of my files. Is it sufficient?

View Replies!   View Related
How To Know Which Mode Php Run
how to know in which mode php running ? CGI or ISAPI

View Replies!   View Related
Run Away Apache - Can Not Find Cuase
I am having a problem with my web server where apache is eating up all memory AND all swap. For example last night I left a SSH session open to my server running top sorted by memory usage and this am the server was down again, I was unable to reach it. I had request a reboot, but on my screen running top I had...

06:21:16 up 24 days, 2:47, 1 user, load average: 179.43, 137.53, 75.9
Cpu(s): 1.8%us, 9.4%sy, 0.0%ni, 0.0%id, 86.6%wa, 0.3%hi, 1.9%si, 0.0%st

It also reported 8mb of RAM free, and 0K of swap free. It was sorted on memory usage and my 17" monitor was filled only with httpd on that list, top entry said 385mb. This will happen with out fail fairly quickly if I do not intervene. Right now I have a cron script that runs ever hour and issues a

/etc/init.d/httpd restart

And that works until Apache runs out of semiphores, then I have to do a

/etc/init.d/httpd stop
for semid in `ipcs -s | grep apache | cut -f2 -d" "`; do ipcrm -s $semid; done
/etc/init.d/httpd start

for it to recover. Right now after the reboot, and 30 mins past the last httpd restart I have...

top - 11:33:05 up 2:00, 3 users, load average: 0.17, 0.12, 0.09
Tasks: 126 total, 1 running, 125 sleeping, 0 stopped, 0 zombie
Cpu(s): 7.1%us, 1.5%sy, 0.0%ni, 90.5%id, 0.8%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 960656k total, 785560k used, 175096k free, 40512k buffers
Swap: 1927792k total, 0k used, 1927792k free, 216472k cached

So all looks fine. Eventually that free number will fall to nothing, and the swap will start filling up. I do not see anything in the logs that is all that helpful. After a httpd restart I will have a lot more free ram.

Server is:

OS: CentOS 5.x x86_64 w/ PLESK + Power Pack

Hardware: AMD 64 Athlon 4200 DC/1024MB/160GB SATA

(if I could do it over I would not put PLESK on, turns out to be a PITB, my other servers do not have a control panel and all run fine... )

Apache is:

[root@www log]# rpm -q httpd
httpd-2.2.3-7.el5.centos

The primary function of this server is to run a web forum based on Invison Power Board, and I have kept up with their patches.

I have never had this problem on any server I have run.

View Replies!   View Related
Cron: How To Run Php File
My server with cPanel, I'd like run file http://domain.com/file.php at 0h00 everyday, I have set the Cron Job in cPanel :

Code:
0 0 * * * /usr/bin/ehpwget http://domain.com/file.php
but The cron is not working well

Code:
/bin/sh: /usr/bin/ehpwget: No such file or directory

Can any one please let me know how to run a php file with cron.
(as user or root)

View Replies!   View Related
Cron Run Php Scripts
I have my own server. I create php file for adding cronjobs. I checked /etc/cron.deny and /etc/cron.allow. both of them is empty so no problem. I execute the php script but nothing : I check with crontab -u user l and it told me no cronjobs for that user. When I access as root from ssh and try teh same command, it works fine. I don't understand how to fix that.

View Replies!   View Related
My Site Cannot Run Php Files
my site cannot run php files

move from server 1 to server 2

another site no ploblem move from server 1 to server 2 too

What ploblem i need fix this

here my site

[url]

View Replies!   View Related
Get PHP To Run On Windows Host
I want to get PHP to run on Windows webhost. The webhost is not able to run a simple PHP file with phpinfo() yet. Tech support says I can use .htaccess to get PHP to run.

What is the best way to setup PHP on Windows Host so that it can run Joomla?

View Replies!   View Related
How To Run PHP 4 And 5 In Ubuntu Without CGI
When we chose Symfony to implement [url], PHP 5 was needed but we only had PHP 4 installed in our Ubuntu hosting servers. We couldn¡¯t just migrate everyone to PHP 5 since some of client¡¯s applications were incompatible with PHP 5. Some tutorials were found online explaining how to run PHP 4 and PHP 5 simultaneously such as [url] and [url]but they all used CGI. As you probably know, CGI is not scalable and we needed to scale in PHP4 and PHP5 since we needed to server millions of hits in both configurations. The following are additional the requirements we had:

1. Run Apache

2. Use mod_php for both PHP versions.

3. Run eAccelerator with both PHP versions.

4. Use as many Ubuntu packages as possible to ease maintenance issues and easily deploy on multiple servers.

5. Use Ubuntu 6.06.1 LTS

The solution we came up with was to run Apache 2 with PHP 5 and run Apache 1 with PHP 4 on separate IPs. Ubuntu comes already with these packages. The only package we had to compile was eAccelerator. The following lists the steps taken to get this setup:

Apache 2 with PHP 5

* apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-curl php5-gd php5-mysql php5-dev make php5-mcrypt php5-imap
* vi /etc/php5/cli/php.ini and uncomment extension=mysql.so
* vi /etc/apache2/ports.conf and put Listen Your.IP.Goes.Here:80
* a2enmod expires
* vi /etc/apache2/conf.d/hosting
<VirtualHost *>
DocumentRoot /home/httpd/mainpage
ServerName mainpage.com
ServerAlias www.mainpage.com
Options Includes FollowSymlinks
AddType application/x-httpd-php .php
DirectoryIndex index.php index.html index.htm
</VirtualHost># Cache images and javascripts
ExpiresActive on
ExpiresByType image/gif ¡°access plus 1 week¡±
ExpiresByType image/jpeg ¡°access plus 1 week¡±
ExpiresByType image/png ¡°access plus 1 week¡±
ExpiresByType image/x-icon ¡°access plus 4 week¡±
ExpiresByType application/x-javascript ¡°access plus 4 week¡±
ExpiresByType application/x-shockwave-flash ¡°access plus 4 week¡±
* cd /usr/local/src
* wget http://bart.eaccelerator.net/source/...-0.9.5.tar.bz2
* tar xjvf eaccelerator-0.9.5.tar.bz2
* cd eaccelerator-0.9.5/
* phpize5
* ./configure
* make
* make install
* mkdir /var/tmp/{eaccelerator4,eaccelerator5}
* chown www-data /var/tmp/eaccelerator*
* chmod 700 /var/tmp/eaccelerator*
* vi /etc/php5/apache2/php.ini and add the following:
zend_extension=¡±/usr/lib/php5/20051025/eaccelerator.so¡±
eaccelerator.shm_size=¡±0¡å
eaccelerator.cache_dir=¡±/var/tmp/eaccelerator5¡å
eaccelerator.enable=¡±1¡å
eaccelerator.optimizer=¡±1¡å
eaccelerator.check_mtime=¡±1¡å
eaccelerator.debug=¡±0¡å
eaccelerator.filter=¡±"
eaccelerator.shm_max=¡±0¡å
eaccelerator.shm_ttl=¡±0¡å
eaccelerator.shm_prune_period=¡±0¡å
eaccelerator.shm_only=¡±0¡å
eaccelerator.compress=¡±1¡å
eaccelerator.compress_level=¡±9¡å

Apache 1 with PHP 4

* apt-get install libapache-mod-php4 php4-mysql php4-gd apache-ssl apache-common libzzip-0-12 php4-common php4-dev apache
* dpkg-reconfigure apache and uncheck mod_userdir and check mod_php4 and cancel on hostname
* vi /etc/apache/httpd.conf and make sure to add this
Listen Your.SECONDIP.Goes.Here:80
NameVirtualHost *# Cache images and javascripts
ExpiresActive on
ExpiresByType image/gif ¡°access plus 1 week¡±
ExpiresByType image/jpeg ¡°access plus 1 week¡±
ExpiresByType image/png ¡°access plus 1 week¡±
ExpiresByType image/x-icon ¡°access plus 4 week¡±
ExpiresByType application/x-javascript ¡°access plus 4 week¡±
ExpiresByType application/x-shockwave-flash ¡°access plus 4 week¡±Remove the following
<IfModule mod_alias.c>
Alias /icons/ /usr/share/apache/icons/

<Directory /usr/share/apache/icons>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Alias /images/ /usr/share/images/

<Directory /usr/share/images>
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_alias.c>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory /usr/lib/cgi-bin/>
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</IfModule>

Change
<Directory />
Options SymLinksIfOwnerMatch
AllowOverride All
</Directory>
ServerSignature Off
ServerTokens Prod
* cd /usr/local/src
* rm -rf eaccelerator-0.9.5
* tar xjvf eaccelerator-0.9.5.tar.bz2
* cd eaccelerator-0.9.5/
* phpize4
* ./configure ¨Cwith-php-config=/usr/bin/php-config4
* make
* make install
* vi /etc/php4/apache/php.ini and add the following:
zend_extension=¡±/usr/lib/php4/20050606/eaccelerator.so¡±
eaccelerator.shm_size=¡±0¡å
eaccelerator.cache_dir=¡±/var/tmp/eaccelerator4¡å
eaccelerator.enable=¡±1¡å
eaccelerator.optimizer=¡±1¡å
eaccelerator.check_mtime=¡±1¡å
eaccelerator.debug=¡±0¡å
eaccelerator.filter=¡±"
eaccelerator.shm_max=¡±0¡å
eaccelerator.shm_ttl=¡±0¡å
eaccelerator.shm_prune_period=¡±0¡å
eaccelerator.shm_only=¡±0¡å
eaccelerator.compress=¡±1¡å
eaccelerator.compress_level=¡±9¡å

View Replies!   View Related
Can't Run PHP Stable With Versions Above 5.0.3
Windows 2003
IIS6
PHP 5.0.3 and PHP 5.2.1 running with the ISAPI dll
MySQL 5.1.11

I kind of have 2 problems, the first being the one in the thread title and the second is while running any version of php my main site experiences slowdowns and hangs.

For some reason whenever I try to install a new version of PHP I have major problems. I have tried several times when new versions come out. I just recently tried the newest, 5.2.1, which I want to try and use, I think there are performance improvements for IIS and windows platform in the new 5.x versions?

Anyway I can install 5.2.1 and get it running, and my sites load, but soon after my main site starts to hang, stops loading or loads extremely slow. I can't figure it out. I even tried using the exact same PHP.ini settings from my old working php install.

So everytime I am forced to go back to the latest version that I know works with my server/sites, 5.0.3 [url]

If I restart IIS the pages start loading fast again right after, even recycling the worker process that the site uses usualy makes the pages load normal again.

I tried setting the worker process to recycle every 60min and to use 2 web gardens. These changes havn't really had any affect for better or worse.

Downgrading back to PHP 5.0.3 seems to run a bit more stable, but even with this version I get these slowdowns now. I have been running my site(s) on this server for 3 years now and most of the time they have ran stable.

--------------------------------------------------------

I was sleeping this morning and recieved a text-message saying the site wasn't loading. So I wake up and the site indeed was pretty much not loading at all. I look at permon that I left running to see this: [url]

I give IIS a restart, which you can see above, then the levels go back to normal, here is a screen shot a couple minites later to what the "Current Connections" graph usualy looks like when the site loads fine. [url]

During this slowdown the CPU usage was not maxing out, was maybe averaging 60% and ram was 50%. I am getting a 2nd server soon to off-load the MySQL to it and have it dedicated for that. But i don't think that will help this current issue. Here is the system resources when the site is loading fine: [url]

I have around 40 or so other sites hosted on IIS and my main site "canadaka.net" which is purple on the top graph, is the only one that hangs or slowsdown. When this slowdown happens to this site, all the other sites on IIS, which are on a seperate worker process, continue to load fine.

I can't figure out why these slowdowns are happening.

View Replies!   View Related
Apache - Run Virtual Host As User
I've run into a wall trying to run apache with multiple websites allowing users to use FTPd to manage files.

I'm running FreeBSD 7.1 on Apache 2.2.x

The issue is that Apache runs as www:www but FTPd writes the files as username:client. When performing some scripts that edit back-end files, this obviously can cause errors.

The data for each directory is stored in /home/username/www

I looked into some apache directives I could use. I tried putting User and Group directives into the vhost configuration for each vhost, but that did not work. I even found the perchild module and it looked like it can do the job but was a bit scared and turned off by the fact that it states it is beta at the top of the page. (I cannot link to it because I do not have enough posts.)

View Replies!   View Related
Error When Trying To Run Apache Update (cPanel)
I got a new server online today with a fresh installation of centos and cPanel:

WHM 11.15.0 cPanel 11.18.1-R20683
CENTOS Enterprise 5 i686 on standard - WHM X v3.1.0

I have done the initial setup (ip's nameservers etc..) but when I try and run apache update I get the following:

Premature end of script headers: /usr/local/cpanel/whostmgr/docroot/cgi/easyapache.pl: Please check /usr/local/cpanel/logs/error_log for the exact error.

I look in the log file but it just repeatse the above error and doesnt supply any additional info.

View Replies!   View Related
My Apache Any 1h Going To Down And I Force Run Restart Httpd
i ask of cpanel.net that why : my apache any 1h going to down and i force run restart httpd

cpanel :
Howdy,

This is occurring because your server is consistently hitting the maximum
allowed concurrent connection limit, defined by MaxClients in httpd.conf:

[root@part7 ~]# grep MaxClient /usr/local/apache/logs/error_log | tail -5
[Mon Oct 22 13:07:46 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 13:32:03 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 14:03:29 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 14:16:07 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 16:48:36 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[root@part7 ~]#

You will need to adjust this setting to a value which better accommodates your
server to prevent any further downtime.

View Replies!   View Related
Crontab To Run PHP [without Using Wget And Lynx]
Hello, I don't know how to use crontab to run PHP without using wget and lynx

1) The PHP script can run via SSH command line mode without problem
2) I can use crontab to run the PHP script with wget or lynx.

However,

3) The script will not run if i using below entry

1 2 * * * php /path/to/script/crontest.php
1 2 * * * php -q /path/to/script/crontest.php
1 2 * * * php -f /path/to/script/crontest.php

1 2 * * * /usr/local/bin/php - /path/to/script/crontest.php
1 2 * * * /usr/local/bin/php -f /path/to/script/crontest.php
1 2 * * * /usr/local/bin/php -q /path/to/script/crontest.php

View Replies!   View Related
Force PHP Not To Run On 777 Folder
how to force that the PHP files won't run if the folder permission is 777

I saw this in micfo.com

but I want to know how to do this

View Replies!   View Related
How Can We Make PhP Run On Html Pages
How can we make PhP run on html pages?

View Replies!   View Related
IIS - Make PHP Run With .html Extension
I know nothing about IIS as I ormally use Linux / Apache so I'm not sure this is possible.

I have built a site in PHP that the client now wants to move over to a IIS-hosted server. Although it's all in PHP because it was a re-build of an old static site I used ModRewrite to make all the page .html.

I know IIS doesn't have a URL rewrite feature as such. What I was wondering is, is it possible to configure IIS so that a PHP page can have a .html extension?

View Replies!   View Related
Prevent Php Script Run As .gif Or .jpg
Does anyone know how to prevent some shell, php script change file name from file.php to file.jpg or file.gif and upload to server and run it to attack server?

View Replies!   View Related
Php Includes Issue On Linux Server With Apache 2.0.63 / Php 5.2.6
I am having some trouble with getting 'include' working. I have a new dedicated server running Apache 2.0.63 and PHP 5.2.6. Local includes on the same domain are running ok, but remote includes are throwing a problem. On the many sites we plan to host on this servber we use a central 'webmaster' page called as an include from a specific site (also on the same server).

I need to edit the PHP.ini and /or recompile the PHP with the appropriate modules to do one of the following...

1 (ideally) - allow includes from any site that is held on this dedicated server

2. allow includes from specified websites

3. simply allow remote includes

right settings to get one of these

options running and solve my problem?

View Replies!   View Related
Cheap Reliable Server That Can Run PHP/MySQL With Plesk
I currently have a decent server that runs around 10 websites, but 1 of those sites contributes around 99% of the total traffic. This large site is being moved onto a new server, leaving the remaining 9 sites rattling around on this big (and expensive!) server.

So, I am now looking for a smaller server to handle the other smaller sites. They get minimal traffic - around 5k uniques a day.

View Replies!   View Related
Installed Apache And PHP Only Seeing Default Apache Page
I am having an issue where I have a server that Directadmin is installed on. I go to the a url that is on the server and all i see is the default page of apache saying congrats, it is installed. Although there is no file like that in the public_html any longer and I can see my files in the public_html folder of that specific site.

View Replies!   View Related
Apache/MySQL/PHP Issue - PHP Not Loading
I've got a server that was running Apache 2.0/PHP 5.2.5 & MysQL 5.0 just fine, however I needed to upgrade to a newer version of MySQL.

So I uninstalled MySQL 5.0 and installed MySQL 5.1, copied the MySQLlibs over, and recompiled Apache/PHP with easyupdate. Apache & MysQL both start/run fine without errors, however PHP files don't load. Just get black pages (HTML works fine obviously).

I went ahead and updated to Apache 2.2 & PHP 5.2.6 while I was at it, but that doesn't change things. I'm not sure why uninstalling MysQL & reinstalling would break any dependencies, but looks like thats the case. Perhaps I need to reinstall some libraries?

Or would it be easier just to reinstall Apache/PHP entirely? I have no data.

View Replies!   View Related
How To Set Lighttpd Proxy To Let Apache Run Cgi/perl Scripts?
I'm running both Apache (on port 81) and Lighttpd (port 80) on my VPS. I would like to have Apache run CGI/Perl scripts only for virtual hosts in the Lighttpd.conf. My Lighttpd.conf already has fastCGI enabled though.

View Replies!   View Related
Changing Register_globals From .htaccess Will Cause 500 Error When Php Run As CGI
Today I have a customer want to swich the register_globals on on his account ,,, i'm running PHPSuExec and running php as cgi not as Apache module , and as you know using php as cgi will cause internal error 500 if some one add php_flag register_globals on
to .htaccess file.

what is the soluation to switch register_globals on for his account only without using the .htaccess file.

put in mind the php files that need the register_globals to be on is encrypted with zend , so we does not have access to it for modification.

have any one have the solution?

View Replies!   View Related
Php.ini Default For Apache 1.3.39 Php 5.2.5
my php.ini is blank

if maybe please take one php.ini default :-)

View Replies!   View Related
Run Php4 For .php4 Files And Php5 For .php [httpd.conf]
First off my error: apache force downloads .php4 files

Background:
Im attempting to run php4 and php5 at the same time. I had php 5 installed with the server when I got it.

I have installed php 4 from the source like this:

Code:
./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/PHP4 --without-mysql
I then copied the php.ini file to /PHP4/php.ini

In my httpd.conf Im loading and adding both php 4/5 modules like so:

Code:
LoadModule php4_module libexec/libphp4.so
LoadModule php5_module libexec/libphp5.so

AddModule mod_php4.c
AddModule mod_php5.c
Then later in the httpd.conf Im trying to tell apache to handle .php4 files with PHP 4 and .php with PHP5

Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php4 .php4
I restarted apache to load the new conf. .php files still use PHP5, but for some reason .php4 files are being downloaded, not running with PHP 4.

If I use htaccess to application/x-httpd-php4 php, .php files also force download. What am I missing?

View Replies!   View Related
Php 4/5 And Apache 2
I would like to compile apache 2.2 with php 4.4.8 and fastcgi, plus phpsuexec support.

Is this a stable option or not?

I would also like to do the same, but with php 5 as well simultaneously on another server.

My question is how would a clients script know what to use, php4 or php5 on the same box?

Also, when is MPM Prefork recommended?

View Replies!   View Related
PHP+Apache
Perhaps one of you could enlighten me as to what I've done wrong.

When I try to access the server [url]or [url] it downloads the source to index.php as x-httpd-php. This should not happen.

When I try to access the server [url] or [url]it executes the script and works fine.

View Replies!   View Related
PHP In Apache Mode
I currently have one server running PHP in suPHP mode. One of my friend told me that if i change the PHP to Apache Mode, this would decrease my server load a lot and thus give more performance.

Anyone can tell me what mean changing PHP to Apache mode? Is that something i can do from WHM? Will this affect the domains currently hosted on my server?

View Replies!   View Related
After Reinstalling Apache And PHP What Else?
I had to reinstall Apache and PHP because something went corrupt with them on the server.

After I sucessfully reinstalled, a lot of bugs and SQL/PHP errors starting showing up server-wide.

So I am wondering, after the reinstall, what else is needed to be done? Is my past configuration lost? Modules/addons need to be reinstalled and configured as well?

View Replies!   View Related
Hardening PHP And Apache
Does any one know of any good articles/tutorials on how to harden PHP and Apache on a cPanel VPS?

View Replies!   View Related
(mysql/php/apache)
I recently have got a VPS and it needs optimizing. Please would someone look at my specs and help me set some good values for a website that runs a fairly small forum.

Plesk 8.1.1
Guaranteed RAM 384MB
Maximum RAM 768MB
RedHat Enterprise 4 AS
MySQL 4
PHP 4
Apache2

my.cnf

Code:
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
skip-bdb

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
httpd.conf

Code:
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers 2
MinSpareServers 1
MaxSpareServers 5
ServerLimit 10
MaxClients 10
MaxRequestsPerChild 4000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 10
MinSpareThreads 1
MaxSpareThreads 4
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

Listen 80

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule auth_ldap_module modules/mod_auth_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so

Include conf.d/*.conf

User apache
Group apache

ServerAdmin root@localhost

UseCanonicalName Off

DocumentRoot "/var/www/html"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

View Replies!   View Related
Apache/php Compile
when we compile apache, why do we need to have the following option?

'./configure' '--with-apxs=/usr/local/apache/bin/apxs

View Replies!   View Related
Apache 2 With PHP 5.2.x Recommended
I bought a new Forum Script but I cannot install it on my GoDaddy web hosting because my script has two Requirements for installing, listed below:

1- Web server with PHP 5-support
2- Apache 2 with PHP 5.2.x-module recommended

My question is, if you know any web hosting that support those two things?

View Replies!   View Related
Adding IMAP To Apache/PHP
I installed Fedora Core 4 from the DVD included with the "Run Your Own Web Server" book. Everything went great.

Now I need to add IMAP to PHP. This has proved very difficult, as it seems that the sources are not provided. I downloaded the latest Apache and PHP and tried to build with the same configuration used to build the ones that came with the book. (Apache went fine - the module inclusions are done through the configuration files. PHP is not going well at all - I grabbed the ./configure options from a phpinfo() call, and it just barfed all over the place.)

Simple question: is there an easy way to get the IMAP into PHP without going through the recompilation?

Simple answer: Install the PHP-IMAP RPM. I sure made this a lot harder than it need to be.

View Replies!   View Related
Php -v Keep Showing 4.4.7 Even After I Recompile Apache As 5.0.4
php -v keep showing 4.4.7 even after i recompile apache as 5.0.4 via WHM > Apache Update. Any ideas how to fix this?

I am on the following server:

WHM 11.2.0 cPanel 11.11.0-S16999
CENTOS Enterprise 5 x86_64 - WHM X v3.1.0

./configure [@php-5.0.4]...(--enable-pic --with-libdir=lib64 --prefix=/usr --with-xml --with-mm --enable-bcmath --enable-calendar --with-curl --with-dom --with-dom-xslt --with-dom-exslt --enable-exif --with-swf=/usr/local/flash --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gettext --with-imap=/usr/local/imap-2004g --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --with-mhash --enable-magic-quotes --with-mm --with-mysqli --with-mysql=/usr --with-snmp --enable-ucd-snmp-hack --with-openssl --enable-discard-path --with-pear --with-pspell --enable-safe-mode --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-versioning --enable-wddx --with-xmlrpc --with-zip --with-zlib).... . . . . . . . . . . . . Done

configure: error: libXpm.(a|so) not found.

make [@php-5.0.4]...(-j 8 clean).... Done

make [@php-5.0.4]...(-j 8).... Done

make [@php-5.0.4]...(install).... Done

initfpsuexec: using apache 1.x support
PHP version file has been updated to 4.4.7
Adding cPanel default aliases ...disabled scgi-bin since suexec is installed
Done
Executing /scripts/postbuildapache (if exists)...Done
Configuring perl magic....Off
Configuring php-pear magic....Off
Configuring ruby magic....Off
Configuring php-pecl magic....Off
/etc/rc.d/init.d/httpd start: httpd started
initfpsuexec: using apache 1.x support

Attempting to restart httpd

Waiting for httpd to restart...

httpd started ok

View Replies!   View Related
Apache And Lighttpd, Both Use Same Php.ini
my php.ini had some changes (/etc/php.ini). Today i have switch from apache to lighttpd, do i need to edit another php.ini file ? Apache and lighttpd use the same php.ini ( /etc/php.ini)?

View Replies!   View Related
Enabling Php By Default In Apache
When I create a website in apache I have to enable php on it manually, Is there a way that I enable php by default on root of apache?

View Replies!   View Related
Apache 2.2, PHP 5, SuPHP, Forcetype
Forcetype does not appear to run correctly with Apache 2.2 and SuPHP. Most information suggests changing

ForceType application/x-httpd-php

To:

ForceType x-httpd-php

This does not work for me and php code is being displayed as text instead of being parsed by apache.

View Replies!   View Related
Apache Not Recognizing My .php Files
Yesterday I was told by my hosting provider that my machine was at kernel panic, so they restarted it and I restarted my webserver (Apache).

I created a sub folder as I wanted to install a PHP script, so I created the folder using FTP and uploaded all of the script files.

The problem is, when I now visit that URL, my browser is asking me to download the .php file instead of the webserver executing it:

[url]

My web host said this:

it sounds like you aren't loading your php module library in your apache.conf and/or not associating the .php extension.

View Replies!   View Related
FastCGI- (apache 2.2, Php 5.1, Suexec)
I have just switched from mod_php to fastcgi + suexec, but now trying to use the ab command times out :

ab -n 10000 -c 100 [url]
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, [url]
Copyright 2006 The Apache Software Foundation, [url]
Benchmarking www.example.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
apr_poll: The timeout specified has expired (70007)
Total of 7422 requests completed

Then I get a bunch of emails from LFD ....

View Replies!   View Related
Shared Hosting With PHP 5 As Apache
This is just curiosity at this point, but I might be looking for a shared host that has PHP 5 as an Apache module at some point. I'm desperately in need of an upgrade for my VPS, but I want to take it as slow as I can and do thorough testing on my existing sites before upgrading the whole shebang.

I'm sure that nobody's running it as a module on shared hosting these days, due to the potential problems therein, but I just wanted to check to see if anyone had heard of such a thing that might be stable for a couple months' work with almost zero traffic.

View Replies!   View Related
Session Clustering With Apache/PHP
Is there any alternative to ZendPlatform's session clustering? ZendPlatform seems to be very easy to manage.

View Replies!   View Related
Update Apache And Php In Plesk
How can I update my apache and php to latest version in PLESK?

I need to install GD and Zend Optimizer too.

View Replies!   View Related
Apache Pipe To PHP Script
ive read that apache can pipe log files into a PHP script. ive tried it and its not working.

ive tried 2 ways, one pipes to the script file (which says to load with PHP.exe on the top line). the other way pipes to PHP.exe and tells it to load the script.

i put a simple bit in my script to create a new file just to check if it worked and it looks like the script is never being run yet i dont get any errors from apache.

View Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved