Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




FastCGI Setup


Can anyone give me an example of the setup of FastCGI with php (with
apache). There are some good instruction how to do it with a Zeus
webserver, but none with apache.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Mod_php Or Fastcgi?
which package you perfer?

mod_php on apache is okay but some people said fastcgi version of php
is faster, is it true?



Mod_php Or Fastcgi?
which one you preferred for running a production, busy site?

seems PHP site only tell you to use mod_php, but seems fastcgi is a
better choice for busy site (such as Yahoo also use fastcgi)

Problem With FastCGI PHP On Sun ONE Web Server 6
I installed the Zend PHP enabler for Sun ONE Web Server which is
basically a wrapper to run PHP in fastcgi mode. The interpreter runs
fine but there's one nasty problem: PHP doesn't use the PHPRC
environment variable I set in the config to assign each virtual server a
different php.ini file. phpinfo() shows PHPRC correctly among the
environment vars but for some reason PHP uses the default compiled-in
ini path anyway. Any ideas what might be wrong here?

Here's the configuration:

In obj.conf, the default object:
Service type="magnus-internal/fastcgi-php" fn="FCGIRequestHandler"
BindPath="localhost:8082" AppPath="/usr/local/bin/php-4.3.4-fastcgi"
StartServers="1" PHP_FCGI_CHILDREN="5" PHPRC="/usr/local/etc"

<Object name=fastcgi>
# File types for fastcgi-php bound in mime.types
ObjectType fn=force-type type=magnus-internal/fastcgi-php
Service fn=FCGIRequestHandler
</Object>

Cannot Conect To Fastcgi Server
Since recently opening a php file on my w2k Pro takes ages and often ends up
with an error massege "cannot conect to fastcgi server".
However if I refresh the page it starts working normally.
How do I fix it?

What Is The Pid When Running Php In FASTCGI Server Mode
I have replaced apache with nginx and now run php in FASTCGI server
mode like this:
PHP_FCGI_CHILDREN=6 php -b 127.0.0.1:9086 -c /my/php/ini/path
nginx reverse proxies to php and this works great!
Now I want to monitor the php processes using monit but it requires a
pid file. Here's the question. How do I generate these pid files? I...

Turck MMCache + FastCGI For Windows
does anybody have try this yet? tell us what you think. Turck MMCache is the only one has windows support while other Zend Performance, ioncube PHP accel. support Linux, unix only.

Moving To A Host Running Fastcgi PHP
My site is currently running on Linux/Apache with mod php. I have the option to move to a host running Redhat on Zeus servers with php running as fastcgi. Unfortunately I know nothing about fastcgi.

Is this a sensible move? Would I have to change anything?

I currently use a php template, includes, etc, and mod_rewrite in htaccess.

FastCGI And DB Connections / Global Variables?
When I'm using FastCGI do I need to code differently than I do when
using regular CGI? Because the PHP.exe processes don't go away do
global variables stick around from page request to page request,
creating the need for better managment / pooling of DB connections?

Mod_php Or Fastcgi For Heavy Loaded Server?
concurrent request to httpd might as high as 300

and each httpd need 12M of memory (currently using mod_php)

so total memory needed might over 3GB


so under this case, should i use fastcgi?

PHP5 Instability Problem With Both FastCGI And ISAPI (Win2k/IIS)
I've got 3 W2K Advanced Server machines here running PHP5.0.0 on IIS5.
Two of them run perfectly using FastCGI. The third is unstable with
FastCGI, after it's been running for a day or so it starts randomly
printing out the error "-2147417842 (0x8001010e)" on a blank page.
(Restarting IIS clears this for another day)

If I try to use the built in ISAPI module it will give the "PHP has
encountered an access violation" error at the end of various pages
throughout the server (especially when a page is requested by a
different PHP page using file_get_contents("http://www.whatever.com/")
where the same page viewed through a browser won't give the error message

One thing that seems to be mentioned in a lot of websites is it being
caused by MySQL, however all machines are set up the same and running
ISAPI plenty of pages that do access MySQL don't get that error. I've
tried turning off persistant connections but that didn't fix either error.

XML DOM Setup With PHP
I am using PHP version 4.4.0.0 and apache2 version 2.0.54.

I am trying to install the xml dom support but am not having any luck.

Following the instructions on php.net I have done the following:

1. Set the extensions directory in php.ini extension_dir =
"C:/php/extensions"
2. Loaded the xmldom module by uncommenting the line in php.ini
extension=php_domxml.dll
3. Copied iconv.dll into C:WindowsSystem32 so that it can be found
on my system's path
4. Restarted my Apache Server

phpinfo() shows that xmldom support is enabled

domxml
DOM/XML enabled
DOM/XML API Version 20020815
libxml Version 20611
HTML Support enabled
XPath Support enabled
XPointer Support enabled
DOM/XSLT enabled
libxslt Version 1.1.7
libxslt compiled against libxml Version 2.6.11

The code that is throwing the error is as follows:

$dom = new DOMDocument();

I am getting the error message:

PHP Warning: domdocument() expects at least 1 parameter, 0 given in
F:webpopup est.php on line 11

CURL Setup
How to setup CURL in wamp?. Please help me!

Server Setup?
I need to setup a new Linux RedHat 7.0 server I need to run. I'm new to this whole world of *nix and server admin but I do have some experience with Microsoft IIS. I was wondering if there's a program or script that will install the latest Apache, PHP, Perl and MySQL on my Linux server. I really don;t have the time to invest in learning everything and I need to get this server up for someone ASAP.

If this isn't available do you know of any tutorials or websites that will help me get this running as quick as possible.

GD Lib Setup Problems
I have Windows XP with PHP5 installed. In the PHP5.ini it reads (not
commented):
extension=php_gd2.dll

The extension path is right as well.

Now I have an Apache running.

However dumping the gd_info causes problems already (so does creating
an image from a JPEG).
Fatal error: Call to undefined function gd_info()

Otherwise, my PHP5 works fine. And when I start PHP.exe, it will even
say "gd module already loaded".

I also restarted my PC.

Php Setup On Win 2000 IIS
php setup on win 2000 IIS how is it done, i've try but the pages dont show up . any one know of a step by step setup tutrioal on this please. I have phpMyAdmin 2.3.3 and My SQL.

Faster DB Setup
Which database setup would be faster to run insert/select/update queries on - 1 table with hundreds of thousands of records, or hundreds of tables with thousands of records (connected by an id)?

LAMP Setup
I am trying to set up a Linux machine (Fedora 3) as a
LAMP server on a LAN with a Windows XP Prof machine. The boxes are connected
via a cheap switch.

I have added the site address to the Hosts file on both machines, flushed
all chains from iptables on the Linux machine and there appears to be no
firewall on XP.

From the XP machine I can telnet mysite.com 80 and get my html test page -
however when I use Internet Explorer it cannot find my page and responds
"The web page you requested is not available offline". The same thing
happens when I use another box with windows 2000. Pressing the connect
button just sends it off looking for - what I assume - is a DNS site

From the Linux machine I have used Tcpdump to monitor the traffic (at least
this is making me learn about Fedora) on the XP machine. I get plenty of
traffic when I use telnet but nothing when I use Internet explorer - I would
have expected something not that I understand what the messages mean

Setup New Database
in a project i want to offer the user a feature that installs a new mysql-db with given values. the values are stored in a *.txt-file.

WORKS:
- create a new db.
- select the database to create tables
- create a table

DOESN'T WORK:
- instert something into table

content of sql.txt: PHP Code:
 CREATE TABLE mytable 

Cgi Setup On Apache Under Rhe
i've been wading through the docs and usenet for a bit now trying to
figure out how to setup cgi to run in cgi on a stock rhe box - which is
of course configured to run mod_php. the reason i need to do this is
to test a theory that a certain library (mapscript) failes under
mod_php but not cgi so i'm unconcerned with security issues at this
point: i'm testing only.

i've tried various permutations of cgi.xxx settings in a local php.ini
and SetEnv REDIRECT_STATUS On in .htaccess files to now avail. i'm on
a gov box and don't have admin privs so i'm looking for a way to force
php into cgi mode, even if it's a hack like exporting some vars in a sh
script and exec'ing php.

is there a way to force php into cgi mode that someone can reccomend.

sorry if that has been answered before - but i've been reading/digging
for a few hours with no luck. ps - i'm a php newbie but quite versed
in cgi/www devel in various languages other than php.

PHP IMAP Setup
I am running FreeBSD box 4.5 , i am trying to install PHP, Courier-IMAP and IMP well i have it working except for the PHP IMAP support i am quite new to all this system admin stuff so i'll tell you how i installed PHP /usr/ports/www/mod_php4

i did make , and make install and then choose options from the scrren ie IMAP etc It give a few errors sorry they flew past too quick , anyway even when i put the follwoing line into php.ini extention=imap.so , i get the error that imap.so cant be found Everything else is ok as i have tested the IMAP Server with Sqwebmail but i was trying to get IMP to work. IMP wokrs fine but i get an "invalid function error" for all IMAP functions so it doesnt really work at all.

PHP Setup On Win2K
I've administrated various types of servers and set-up countless development environments for PHP and MySQL I've never created a full production server before, relying on service/hosting providers to do this for me.

So, I'm looking for any advice on setup, bugs, tutorials, technical resources, thoughts, or experiences. Maybe this could become a sticky for technical/security setups? Who knows...

I'm especially interested in custom builds of the php engine. There are many functions I know I'll never use in the life of this server, such as CURL, Cybercash, .NET, FrontBase, etc. I'm looking for tutorials/tips on compiling for Windows if anybody has any. Can a custom isapi module be compiled for windows?

Sql Setup Scripts
Ive recently been asked to take on a site that uses some light weight
php scripts - im a 100% n00b when it comes to PHP so you know whats
coming.

the client went into the files and amended what she thought was her
admin password... only its not... i think its the database connection
login and password

$link = mysql_connect ("localhost", "USERNAME", "PASSWORD") or die
(__FILE__ . __LINE__);

anyone know how i can reset this back to how it was without a backup
or could the host help with this (i am asking them)?

Timer Setup?
is there a way to make a function that would do sometime in a given period of time without anyone having to activated?

Session Setup Difficulties
I've recently set up PHP on a Solaris box. Pretty simple. I've had no problems with the installation. However, I can't seem to get Sessions to work correctly. A session will establish itself, i.e. a file will create itself in /tmp, and if I turn on --enable-trans-sid, I can see the ID. Auto-start will work too, if I turn it on.

The problem is that 1) I can't seem to access the session id through $PHPSESSID, and 2) nor can I register a variable with a value in the session. The strange thing about the second problem is that the variable will register in the session, but I can't assign it a value.

I'm thinking that perhaps I have something configured improperly. I have --enable-track-vars on, but otherwise, I don't know what else might need to be done.

I'm preferring to do this without client-side cookies. I also don't know what needs to be configured for that to work.

How To Setup Gubed Debugger?
I need a debugger for php.
I use Mandriva 2006. Quanta 3.4

I searched for gubed and tried to install.
But cant setup.

please guide me how to setup and which package to download(there are 3
packs)

How I Setup My Mysql Database(s)...
Quick question on how I setup my mysql database(s)...

If my setup is such that I have multiple clients, and each client gets
10 tables to store their data, is it better for performance if I put all
of these tables into 1 large database (with a unique identifier
prepended to each one) or create a separate database for each client?
i.e., assuming 1000 clients, I either would have:

A) 1 database and 10,000 tables in it, 10,000 total tables

B) 1000 databases with 10 tables in each, 10,000 total tables

Intuition tells me that the multiple databases would be better for
isolating data between clients, but I am not sure if this would slow
things down.

All the info I found on this online was inconclusive and mostly was
people speculating, so I hoped you all could help more.

PHP 4.3.4 And MySQL_i_ Extension. How To Setup?
I'm running PHP 4.3.4 on my home Windows XP Pro machine for programming and
testing. In preparation for using PHP 5, I'd like to move to using the
MySQLi extensions (as opposed to the plain MySQL extensions).

I've upgraded to the MySQL 5.0 alpha and have it running fine.

What I haven't been able to locate is the PHP dll needed for the MySQLi
extension. Can anyone point me in the right direction?

The instructions on the php.net site talk about how to compile the Linux
version of PHP for this new extension, but no reference is made to a dll.

I'd like to be able to try this out without having to upgrade to PHP 5 on
this machine.

As an experiment, I took the php_mysqli.dll file that is included with the
PHP5 source code and placed it in my extensions directory. PHP 4.3.4 reports
the following error message in a dialog box "Unknown(): Unable to load
dynamic library 'c:PHPextensionsphp_mysqli.dll'-The specified module
could not be found"

The location is correctly specified, so I suspect that the problem is not as
suggested by the dialog box error.

How Do You Setup Sablotron For PHP4?
I have recently found the XLST functions in PHP. When I looked into using them I found that i needed to setup Expat and then Sablotron before it works. I've downloaded both but m having massive dificulties getting either to do anything. I a running Windoze 2000 Server (IIS 5) and PHP version 4.0.6.

Setup Username And Password
Normaly only Administrator can setup username and password for new users. However, could you please tell me how a visitor can regist himselve a new username and password so that he can post new messages. So he only can read messages but if he wants to post new message, he has to input his username and his password.

(For example, visitor can read message in this forum but if he want to post message he have to regist for an username and password) then he can post). How I can set up like that. I thought that cookies does not work in this case.

PHP Soap Server Setup
i'm trying to set up a soap server to receive and process SOAP requests. however phppatterns.com is down temporarily. Anyone have any other good resources of setting up a SOAP SERVER? there's tons of resources on how to use soap client implementations, but i couldnt' find a good resource on soap servers and wsdl creation!

Sendmail Account Setup
I want to be able to create a sendmail account by commands sent from a web
page. I am using php. After everything is done, I want to enter his info
into the database (easy) and create this sendmail account. Can anyone give
me pointers to explanations/excamples? I have done a quick search on the
web, but haven't turned up anything. In addition, I do NOT want to create a
regular user account on the server -- only a sendmail account.

Initial Setup Problem
I made a very simple page called index.php, and it goes to the Firefox browser and says Opening with dialog box appears and if I say open with Firefox it opens another window

the TEST phpinfo() works, I installed with WAMP base.

<p>This page was created at
<?php echo date("h:i:s a", time()); ?>
on the computer running PHP.</p>

As a Html file it works, it just does not show the PHP stuff

ok= index.html
not ok = index.php

How To Setup A Database On Godaddy.
My hosting service is godaddy.com. In their help files it only tells me how to setup the MYSQL database but it doesnt help you make any codes to use it or anything else. I really wanted to use an MS access database with godaddy. So my question is, how do I setup any form of database on godaddy and make code where people can go to my website and create an account that will allow them to login to a specialized web page?

Setup MySQL On A Standalone Machine
Has anyone setup MySQL on a standalone machine?

Parse Error In Setup.php On Line 207
This question has t have been answered 100s of times already, I have tried to correct this myself but cannot see a problem, When I try to run my /folder/setup/setup.php, I get an error message saying:

Parse error: parse error in /folder/setup/setup.php on line 207

I have looked at line 207 using metapad, but there seems to be no problems with the code!
the code: datestamp varchar(50) NOT NULL default '', thei is using the MySql CREATE TABLE function.

Absolute Beginner (Setup Questions)
I am trying to figure out how to get started with PHP/MySQL.
Everything I've read so far says to start with PHP first. I was
expecting something like Visual Basic Express or some other type of
free IDE. So I discovered that I needed to download a virtual server,
so I downloaded OmniSecure and followed the set up instructions as far
as I could figure them out.

So here is where I'm stuck.

1) While trying to set up and configure everything it tells me to move/
rename a certain .ini file. I can't find this file.

2) Even if I did get set up correctly I'm not sure what program/IDE to
use to begin entering code?

I am obviously a beginner, but have made several Access databases and
basic applications using Visual Basic Express and SQL Server Express
but all of those programs have had various set up wizards that made
everything idiot proof.

How To Setup IMAP Mail Server?
I have run rpm -Uvh --force imap-devel-4.7-6k.i586.rpm and rpm -Uvh --force imap-4.7-6k.i586.rpm is this means that I have setup IMAP mail server? if so this server type is "Cyrus" or "UWash"?

PHP And PEAR And MySQL Setup On Apache
Very experienced developer, newbie to PHP. My situation:

I have installed on my WIndows XP machine the following:
* PHP 5.2.1
* MySQL 5.0
* Apache 2.2

All of these are installed under C:Program Files under their own
directories.

The PHP installation works fine. I can put PHP files under the Apache
htdocs directory and have them run. My challenge now is getting the
MDB2.php libraries to run - right now I am getting an MDB2.php not
found error, which I believe is due to a include_path error...

So, I have 2 PHP.INI files -- one in C:Program FilesPHP and one in
the htdocs directory of Apache. They both have the exact same
include_path defined in the them. The very strange thing is that when
I run phpinfo(), the include_path comes out to be .;C:PHP5PEAR.

I have no idea where this value is coming from (it is the value for
Master and Local). I have search everywhere -- the PHP.INI files, the
registry, the ENV variables --- everywhere -- and I have no idea where
this value is coming from. Where does phpinfo() pull the include_path
from?

If I can track down and change this value to the "real" PHP path, I
may be able to get to the next hurdle of using MDB2!

Setup IMAP Mail Server
How to setup IMAP mail server?

How To Setup GUBED Debugger In Suse9.3
I use suse9.3, KDE3.4, Quanta, Compiled php5.
I need a debugger for php.
I found Gubed.

I downloaded and tried a lot. but vein.

Sessions In A Load Balanced Setup
Has anyone here implemented sessions in a load balanced environment using
database storage as a custom session handler? I'd be interested to hear
about your experiences. Upsides, downsides, bugs, troubles, security, etc.

Running PHP On Command Line & IIS Setup
I am trying to run PHP off of a IIS server....which hasn't be so pretty. I have included the path environment variable C:PHP, rebooted and started back up. Within C:PHP are two executables php-cgi.exe and php-win.exe. everything I have read online has said that all I need to do is point an environment path to this folder and everything should work. wrong!!!!

I try to run a script in dos and get php is not valid command error.....it's as if it isn't recognizing the command path. I have also set up php under properties to be opened by the CLI....so what am I doing wrong here? I'm running IIS 6 with a dedicated server.

How To Setup A Local Server Environment:
I want to setup a localserver environment in my desktop (OS : Win XP)so that i could use ASP.Net , PHP , Ajax ,Mysql and SQL server in that local host.
I want to know wat are the things i should download? and from where it to
be download?

Setup Problems Php / Mysql /phpmyadmin
I used this php package to install on my system... (i had problems with the
isapi package from php so im back to the cgi portion of PHP php-cgi.exe)

PHP 5.0.0 installer [2,235Kb] - 26 July 2004
(CGI only, packaged as Windows installer to install and configure PHP, and
automatically configure IIS, PWS and Xitami, with manual configuration for
other servers. N.B. no external extensions included

It works fine... as the test page outputs the correct php page.

i also setup MySQL database 4.0.20a-nt that works fine too.

I installed PHP to make use of the mysql database thrue phpmyadmin. When i
try phpadmin it gives the messages;

cannot load MySQL extension,
check PHP Configuration.
Documentation

So how do i load the mysql extenstion thrue php.ini in system dir to work
with php-cgi.exe ?

When i tried to load the php_mysql.dll with php.ini wich is provided with
the isapi package of php it gives an error loading ... Php startup mysql:
unable to initialize module. Module compiled with module Api=20040718 ,
debug = o , thread safety =1 PHP compiled with module Api=20040412 , debug =
o, thread safety =1 these options need to match.

Setup Question With Open_basedir Constraint
I accidently posted this over at php.general, but I don't generally get
a response over there, and I get a better response here, so I am posing
this question here as well. Hopefully someone has done something like
this and can offer some advice. Thanks in advance.

OK, I need some expert advice on how to do something like this. I have
an open_basedir restriction in place by my host, and I am hosting a few
sites (that will grow in the future).

What I want is something like this.

/mainsite - application files that I am creating would go here.
/site1 - folder for site 1
/site2 - folder for site 2

I would like to have all my application files underneath /mainsite like
this:

/mainsite
config.php
index.php
...

Then under /site1 and /site2 I would have symlinks (or php files with
include files in them) that would point to the same file in /mainsite

/site1
config.php - pointing to /mainsite/config.php
index.php - pointing to /mainsite/config.php
...

Same for /site2

Problem is I have open_basedir set, so that I can't get to
/mainsite/config.php from /site1/config.php

What are some of my options for setting this up? This would allow me to
essentially have one code base, and then anytime a site (say site1)
wanted a custom config.php file, I could replace the symlink config.php
file with one created just for them, but the rest of the code would
still be from the main code base.

Easiest Setup On Linux For A PHP Newbie
I'm starting out with PHP. I'd like to work on a project for personal
use; I will not be putting it on the web. What is the easiest way to do
this? I know I can set up an Apache server (I'm on Ubuntu Linux), but
I'm wondering if there's any simpler option, given that my scripts
don't have to be accessible on the web.

Why I Cant Setup Apache In Windows 2000
i can install apache in windows 2000 professional
but when i was to install it in a LAN it cant run correctly
when i type http://localhost/ in browser i recieve The page can not find
why?

Newbie Connection / Setup Problems With MySql
I'm a newbie to MySQL and just needs little help with a couple of
problems. I am currently working through a book on Dreamweaver MX
2004, and I'm using MySQL and PHP.

Unfortunately though I can't seem to connect to the database and I'm
not sure my user info was setup correctly in the first place.

The book says to copy the newland_tours.sql database to the c:mysql
folder. however I'm pretty sure that the test and mysql database
files that the root user has access to are in the c:mysqldata folder
so I have copied this file to this folder as well.

When I go back into Dreamweaver and click on Applications, Databases
and the Plus sign to add a MySql connection, if I click the button
that says Select, to choose the database, only test and mysql are
still listed.

I'm not entirely sure that I would be able to connect to the database
anyway even if it was showing because when I try one of the databases
listed with the following info:

Connection Name: conn_test
MySQL Server: localhost
Usename:root
Password:
Database:test

It asks me to select a password. It doesn't seem that I would be able
to connect as the root user without a password. When I click on the
traffic lights signal in the taskbar to go to WinMySqlAdmin, in the
MyIni Setup section it has the user down as House and a password that
is familiar to me, so I think I must have entered this info when I set
up the My.ini file. However, even if I enter the user as House and
enter the password I chose it gives me an error 1045, access denied.

Before trying to load this database that I want to use, I thought I
needed to sort out the user problems and to see if I could log into
MySql. So I opened a command prompt and CD to c:mysqlin. When I
get here I type C:mysqlin> mysql and I get the "welcome to the
mysql monitor" message and leaves me at a mysql> sign.

Someone told me that I should be able to get the database loaded seen
as I can get the mysql screen up by logging in as the root user
without any password or username. The person said to copy the
newland_tours.sql database into the c:mysqlin fodder which I did.

If I try to CD to that directory from the mysql> after logging in it
gives me errors saying unknown command 'm' and '' To be able to CD
to that directory again I have to exit from the mysql monitor by
typing exit or q and it returns me to the c:mysqlin> prompt.

If I now try and type this:

C:mysqlinmysql < newland_tours.sql

to load the database from the c:mysqlin> prompt, it gives me an
error saying:

Error 1044 at line 1, access denied for user "@localhost" to database
'database'

If I try this with the username and password that are listen in the
my.ini file I get the following error:

Error 1045: Access denied for user: 'house@localhost" <using password:
yes>

If you can help me with the user problems and connection/access
problems I'm having so I can get the connection set up I'd be very
grateful as I'm starting to get a tad confused by it all.

Is It Very Difficult To Setup A Simple Mailing List?
I've seen and been on mailing lists where there are a bunch of people on it, but, when you reply to "the list" you are actually replying to something like, "mailinglist@widgets.com". So I want to setup something like this for a special project. I'm imagining that when the server gets an email to "mailinglist" that it would basically just re-send the message to everyone on the list.

Is this very difficult or even advisable using PHP's mail function?


Copyright © 2005-08 www.BigResource.com, All rights reserved