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




Common Causes For Apache Exiting With SIGSEGV?


I have a website that's built with PHP and MySQL and it works just
fine, most of the time. However, when the load gets higher (say 3
hits per second), Apache starts to exit with SIGSEGV on almost every
request.

Are there any typical areas to look at to solve these kinds of
problem?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Exiting/Entering A Function
I've always been told that a function should have one exit and one entrance. Lately, I've been seeing code like this:

function foo($temp)
{
if ($temp >= 0)
return true;
else
return false;
}

Nothing really wrong with that only I've been told to do it like this:

function foo($temp)
{
$status = false;
if ($temp >= 0)
$status = true;
return $status;
}

Is there really any significant difference between the two? Any security risks?

Common SQL Injection
What are common SQL injection methods that are used? I would like to test my site against them. Login Set Up Email: [input box] Pass: [input box] [submit button]

Common Database For Php And Java
how could I use common database for php as well as java.Is there any support for java available.Please some suggestion.

What Editor Is The Most Common In PHP Developer?
I am newbie in PHP, Thanks for any advise.

Web Surveys: Common Practice
I am just wondering, what is the current best
common practice for online surveys:

1. allowing users to vote any number of times
2. allowing one vote per IP
3. requiring email address verification (seems overly complex for a survey)
4. setting a cookie on the web browser and allowing no more voting until
the user closes the web browser
5, other

Common PHP Files On Different Domains
I have several websites on a remote virtual server. These websites use the same software.  I am looking for a way to update all the common files at the same time, rather than uploading the same file via FTP to each domain. I can not INCLUDE() a file from a different domain.

Is there a way to use a common source file stored on one domain, to be used on multiple domains?

PHP In Array Issue - Common Words
I have an array

$commonwords = array ("and", "he", "I", "in", "is", "it", "of", "that", "the", "to", "was","are", "as", "at", "be", "but", "for", "had", "have", "him","his", "not", "on", "one", "said", "so", "they", "we", "with", "you", "about", "an", "back", "been", "before", "big", "by", "call","came", "can", "come", "could", "did", "do", "down", "first", "from", "get", "go","has", "her", "here", "if", "into", "just", "like", "little", "look", "made", "make","more", "me", "much", "must", "my", "no", "new", "now", "off", "old", "only", "or","our", "other", "out", "over", "right", "she", "see", "some", "their", "them", "then","there", "this", "two", "up", "want", "well", "went", "were", "what", "when", "where","which", "who", "will", "your", "i", "&", "a", "good", "i'm");

Now I am trying to check if a perticuler search word containing any word which is in array.. so avoide them.. example:

if(!in_array($space_split['search_word'],$commonwords))
{
// some work
}

this is not giving me right result.. for example.. it is not avoiding some words like "a" "i'm" "&" and few others..

can anyone tell me what is this issue?

Common Login For Diff Modules
I need to make a community site containing blog, forum, shoutbox, gallery, news, event calenders. Any one can give me suggestions like how can i make them accessible with one common login? Is it already handled by joomla or any other cms?

Pre-caching Common Queries On A Database
In trying to improve the performance of searches on a database, I read that it makes sense to run a small set of common queries off-line and cache them in a plain HTML file, and then use HTTP Location: to point to the static page. Problem is the book I read only talks about CGI. Can anyhow tell me/point me in the right direction for doing a similar thing using PHP?

Common MySql Search Algorithms In PHP?
I need to put together a simple search function. I imagine there is
already some PHP code out there that handles the basics?

For instance, how do I search for just words, from one word boundry to
another?

Sharing Common Files Between Sub-domains
I'm looking for some ideas and best practices for setting up my sub-domains to make sharing/including common files among different sub-domains easy.

Specifically, I am looking for a solution that will make it easy to reference common files in the PHP script as well as referencing common images within the HTML. This is particularly a problem when including files in a PHP script that may include other files - can't use relative pathing.

For example, let's say I had this folder structure:

mydomain.com
 |
 |--sub1.mydomain.com
 |
 |--sub2.mydomain.com
 |
 |--images
 |
 |--includes

I could create a $prepath varaible with the value ".." for the subdomains and "" for the main domain. Then use that to reference all files from the root of the main domain. Of course I would have to reference any images in the HTML with a full path from the main domain only.

Common Email Characters Not Accepted By Mysql
I'm making array of characters to replace with temporary proxys (equalsign, singlequote, doublequote, etc.) that will be switched back the original character when a user views his or her emails. For those of you who've done e-mail scripts with mysql before, which characters have proven to be the most trouble (I'm only imagining how many emails one email could hold up if checkmail.php's error array didn't have a certain charactter)?

Failed Opening Required 'common.inc'
I get this fatal error message when i try to include the 'common.inc' file. Could someone explain where common.inc and php.ini should be located and what their contents should be. I am running an apache server and php4. I found 3 different 'common.php' files in different locations within the php directory.

Reusing An Object For Common Select To Database
I've noticed that after I finished this app, I had repeated a similar task over and over and would like to modularize it. The repeated task was connecting to the database, executing a select, putting all the results of the columns into different variables of an object. PHP Code:

Forum Integrating Into The Common Web-site Interface
I am developing a dynamic site and I'd like to have the communication place for users of my web-site. For this goal I'd like to use phpBB, I like it. But I don't want to open this forum separately in another window or in the same with another design. I'd like to save the common web-site design (navigation menu on the left side of page, header and feuilleton).

List Of Common Words Mit My Keyword Search?
Seeing if anyone had a list of common words (the,a, as, of,...) so that I can limit my keyword search. I do not want to use the length of the word to limit.

How I Can Find Longest Common Prefix Of Strings
I'm interested in such algorithm that solves problem of finding longest
common prefix of two or more strings.

I haven't found such function in PHP, or I pass it?

Common Prob With Mysql LOAD DATA LOCAL INFILE ...
i have most recent php & mysql versions running on a linuxmachine

i want to use LOAD DATA LOCAL INFILE and pass it from php to mysql.

- the file i load is given with full path and the directory is readble
- On MySQL local-infile = ON
- From PHP i connect using client flag (128) to allow passing a file over
that connection: mysq_connect( $host, $usr, $pwd, false, 128)

Ive followed all advice from php & mysql sites and deja.com ...

But i still get the message: The command is not allowed with this MySql
Version or something ...

any ideas where i should look further?

what are *all* the requirements for a LOAD DATA LOCAL INFILE to work
seamingly?

Authenticating User Common User Names
I want to create a password protected page with PHP and Mysql. I have 2 groups User and Admin. The respective groups have a common user/password. The user/password are stored in a database. I want to authenticate the user through a login form and not through a pop-up ($PHP_AUTH_USER) way.

What I want is, if a user logs in and he moves from one page to another, he should not be asked for validity again. Is this possible only with scripting (without session and $PHP_AUTH...). If yes - how do I keep track of an authorised user and unauthorised user, so that he should not be validated again. Does setting the user variable to global in all the pages do the trick.?

Apache 2.0 And Php
I was wondering if anyone has had any luck getting php to compile and work with apache 2.0. i use apache tool box to compile it but they dont have support for it yet. if anyone has compiled and tested it with the previouse beta's or rc's any info would be awesome!!!

CGI Vs Apache
Is there any difference on how PHP is wrote based on the server type? I have been using PHP on an Apache module and I just started using a CGI module but I am getting a lot of errors, mainly "Variable undefined" and when I tried to add records to a MYSQL database, I received this error: "CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

Trying To Run A .bat (w2k, Php, Apache)
I'm trying to execute this code:

<?php
$run = "c:Program FilesApache GroupApachelogswebalizer
unStatistics.bat";
exec ($run);
}
?>

but don´t run. Any idea?

Php 4.2.0 And Apache 1.3.24
Why can't I run apps like phpnuke, postnuke, xoops, phpwebsite, etc.? I have tried them all seriously and always get the same effects. When I try to install either of them the pages never change even with register_globals On.

Was I suppose to upgrade apache to 2.0.35 for compatibility issues?

Apache
Has anybody wrote a script or coded anything to set php up on apache running on windows.

Php 5.04 With Apache 2.0.54
I can build php 5.04 with apache 1.33 statically
with the apache configuration option: --activate-module=src/modules/php5

How can I build php 5.04 with apache 2.0.54 statically?
It seems that the information I have only shows how to build php as a
dynamical module of apache.

PHP And Apache 2.0
I am installing Apache 2.0 with PHP. On top of PHP I plan on installing
netjuke.

I am having problems and have a strange issue:

the following works:

<? phpinfo(); ?>

but the following does not worl. the source code appears on the page as
if it is not being processed.

<?php phpinfo(); ?>

Apache In Win Xp
I already installed Apache, Mysql and PHP (last version for each one) into my system running Win Xp. “All running ok” When I run scrip “A” my data lost; it didn’t print. Code:

Php & Apache
Just wonder if there are any sites with a guide on how to set up apache and
php on windows XP. Would like to test my php-pages locally.


Apache + PHP
I have installed Apache apache_2.0.52-win32-x86-no_ssl.msi and
PHP php-4.3.10-Win32 on windows 2000 professional . I also get success
in installeing both of them , but when i am trying to run apache
C:/localhost on my mozilla or internet explorer browser , i am not able
to get the default page, i don't know why its not working. I am a new
learner of PHP and for the learning process i want to download it as
soon as possible.

Anyone Using HP-UX With Apache, PHP And OCI?
I'm searching for someone who's using HP-UX 11.x with Apache and PHP
with the OCI8 extension (for accessing Oracle).

I'm having some issues while running this and would like to exchange
some information.

my environment is:

HP-UX 11.11
Apache/2.0.49 from the hpuxwsApache package
PHP 4.3.4 as included in that package
OCI8 as included in that package

(I also tried Apache 2.0.52 with PHP 4.3.8 but that didn't make a
difference)

when I'm enabling OCI8, Apache works fine, but the commandline PHP fails
(and I need that as I have background processes, generating some
reports). The error is:

PHP Warning: Unknown(): Unable to load dynamic library
'/opt/hpws/apache/php/lib/php/extensions/oci8.sl' - Can't find path for
shared library: libclntsh.sl.8.0 in Unknown on line 0

after finding http://bugs.php.net/bug.php?id=13151 I managed to solve
this by setting:
export LD_PRELOAD=$ORACLE_HOME/JRE/lib/PA_RISC/native_threads/libjava.sl

and now also PHP from the commandline works fine as well. but I've no
clue if this is a good solution or there's a better way.

but now I'm running into an issue with LDAP: ldap_bind() fails from a
PHP script run from the commandline, while exactly the same code works
perfectly fine through Apache - and it also works fine from the
commandline when removing the LD_PRELOAD setting - but that removes the
OCI8 functionality again...

so I'm feeling stuck having the choice between LDAP and OCI8 - but my
scripts uses both...

(FUP to comp.sys.hp.hpux)

Apache For Win
Can any one tellme how to configure Apache on win nt to run PHP i already have PHP running on IIS.

Apache 2.0.48 And PHP 4.3.4?
I'm currently running Apache 1.3.27 on Debian Woody with a PHP backport
(version 4.3.4), together with Apache-SSL 1.3.27.

I have been considering upgrading to Apache 2.0.48 which I now believe is
recommended for production. However what is the status of the
interoperability with PHP? I have read on the PHP site that it is not
recommended to run Apache 2.0 with PHP but does this refer to the latest
revisions or the initial release?

Help With PHP And APACHE
I'm using PHP and Apache. How do you configure Apache so that it
allows the use of php and session data. I get the following error:

Warning: session_start():
open(/tmpsess_ed0b0c6b9b2d32d64172373bd8a6bcaf, O_RDWR) failed: No
such file or directory (2) in
c:orcl_asapacheapachehtdocsforumuserauth.php on line 5

On my php.ini file, i specifiy that location of for the session data to
session.save_path = "C:/temp"

PHP And Apache
I am trying to set up a Web site I am building so that it works like
this:

When someone goes to: www.runningback.com/reg

The "reg" get's passed into index.php as an argument and index.php is
executed.

I can pick up "reg" in index.php using $_SERVER['PATH_INFO'].

But right now what happens is the url is not recognized by Apache 1.3
and so gives me an error.

If I call www.runningback.com it calls index.php just fine, but not
when I want to pass in an augument. I'm trying to make user friendly
urls.

Apache 1.3 + PHP 4.x + SSL
I've never implemented a secure server before - and I now have a project
for it - It will be an Apache 1.3 environment tuned with PHP and MySQL
- and I'd appreciate any comments/advice/note from folk who have done
similar. I have my application working fine in a non-SSL environment
and believe the switch-over should not be too difficult. But...

Can someone confirm the following:

My LAMP (Linux, Apache, MySQL and PHP) sit all on the same server - I
only require SSL between client and server therefore I believe I do not
need to tune PHP/MySQL - true/false?

I have the following modules compiled in my Apache httpd
Compiled-in modules:
http_core.c
mod_vhost_alias.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_include.c
mod_dir.c
mod_cgi.c
mod_actions.c
mod_alias.c
mod_access.c
mod_auth.c
mod_unique_id.c
mod_so.c
mod_setenvif.c
mod_ssl.c
mod_php4.c
suexec: enabled; valid wrapper /opt/apache/bin/suexec

I believe I have everything I need already compiled in - true/false?

Is it sufficient for me just to edit the my httpd.conf file under the
heading 'SSL Virtual Host Context' and tune accordingly?

Since my server sits behind an external firewall, and since the only
services will be ssh and apache listening, would one consider that
reasonably secure? Can anyone recommend any other steps I might consider?

Since Apache/PHP sit on the same server as MySQL I plan on having them
use sockets (pipes?) and not tcp/ip port 3306 - I've not done this
before either but believe it gives added security and performance
benifits -

PHP & Apache
I am having problems getting PHP and Apache to "talk" with one another. Does anyone know of a good website that can show me how to get this done without a lot of pain?



Apache
I'm installing Apache for the first time on my home machine, XP Pro. Of
course, the very first screen has me "Lost." It asks for my network domain
and network servername.

How do I go about finding what the network domain and network servername are
for my machine?

Php Apache
I tried to run php with Apache in windows. But Apache doesn't recognize the PHP file and returns an alert box to save a file.

i knew that i need to have a line
AddType application/x-httpd-php. php

in httpd.conf under conf directory or apache installed directory. But this doesn't work.

Php4ts.dll And Apache?
I've installed Apache 2.0.46 on a win98se machine and then tried to install php as a module. I unzipped php 4.3.2 to c:program filesphp, moved a php.ini file to c:windows and edited the directories, then moved php4ts.dll to the sapi folder. When I tried to start Apache after configuring httpd.conf, it could not find a library file (i assume the php4ts.dll file that i placed in the sapi folder). So then I moved php4ts.dll to c:windows and Apache started.

What confuses me is why the file could not be found. I installed php and apache the same way on a winxp pro machine and it found the file in the sapi folder without any problems. Why would it not be found? It's not really a problem, but it bugs me why it would not work. Could it be a difference in the Apache installation between the two operating systems? Thanks in advance for the info.

PHP Not Available On Apache (Linux)
I am a newbie to Linux, and therefore having a difficult time of installations that are probably quite mundane to "high-timers." I hope this is the correct newsgroup for a posting like this, but if not, please suggest other newsgroups.

I have installed PHP4 on a LInux/Mandrake machine, running Apache 1.3.12. All installations are compiled and installed in the default locations.
In the browser, I see a text printout of the .php document I'm requesting, rather than the executed form.
File types of:

AddType application/x-httpd-php .php3 .php4
AddType application/x-httpd-php-source .phps

have been added to the Apache config file.

I have a list of what PHP was compiled with, and --disable-short-tags was not one of them.

Execute permissions (755) have been added to the files I'm trying to see.
The INSTALL file called for mod_so which would be visible if httpd -l was run. It was. The five steps required in the "Quick Install" went through without a problem. Actually, I'm just trying to execute that tiny .php file that they give you... <?phpinfo()?> .

I've done the copying thing:
cp php.ini-dist /usr/local/lib/php.ini

In the INSTALL file, it calls for LoadModule php4_module libexec/libphp4.so to have an entry in Apache's config file. I don't see one. I also did a search for the libphp4.so file, and there's none to be found. A search for libphp4 shows a number of files, but none with .so extension.
This PHP installation was performed from a php-4.01pl2.tar.gz download - is this the right module?

As a note, CGI forms and MySQL queries work fine on this machine.

Cookies & Apache & PHP & W2K
This below is my simple source to set a cookie:


<?
setcookie('geinig', 'banaan');
?>

Though it doesn't set the cookie, can't find it in my directory cookies, below is an advanced example I pulled from devshed:

<?

// set cookie if not already set

if (!isset($id)) {
srand((double)microtime()*1000000);
$randval = rand();
setcookie("id",$randval,1003842401,"/","localhost",0);
}

setcookie("id",$randval,1003842401,"/","localhost",0);

// a cookie to expire for 4 hours -> time()+14400


?>

But I can't get any values, perhaps because the cookie isn't set.

Used the below code to get the code: (used various codes though)

<? echo $HTTP_COOKIE_VARS["id"]; ?>

Any help would be much appreciated!

Apache Restart In Php
Im using apache 2.0.44 and php 4.3.0 on a linux machine.
I want to restart apache by using exec() or passthru() in php, but it wont work.

If a script in my working folder starts with #!/.../php -q
it is possible to restart apache by ./script.php, as root, by using exec() in this script.

But if I do it on browser, by executing the same script by exec(script.php), I get:

(98)Address already in use: make_sock: could not bind to
no listening sockets available, shutting down
unable to open logs

I changed the mode of the logfiles on 666, but thats not the answer.

So, if anyone understands my broken english, is it possible to restart apache by using a running apache? Or, is there a possibility to run another instance of apache under Linux?

Buffering On Win/apache
I am writing a ftp client which will work on my server, and I have little problem with using buffering in php.
Since it takes quite a while to connect to the ftp server (for whatever reasons) and I use them about 5-10 at a time I would like my script to show some progress, so I thought I would use buffering system. LIttle snip of my code:

Some Help With Apache Authentication
I'm developing a website that require a user and password validation. Almost everything works fine, but a have little problem when the user insert a wrong login (user/password).

If that happen, the website shows a page that says: Try again. The last is a reload of the index.php file.

My question is what I need to do in the code, for a new login dialog from apache.

PHP/MySQL/Apache
I got PHP MySQL and Apache all running on my local development machine, and have now written some useful code that runs fine locally. The problem is that now i have to make it work on the companies server, or my supervisor will look a bit dumb, as will I.

What i need help with is what to do to make php which is on the same server, talk to MySQL and fetch/write the data it needs to.
Could anyone give me idiot-proof help with making this work?

From looking at other posts and some literature i have made a guess that its to do with the part where i go:

<?
mysql_connect ('localhost', 'user', 'password');
mysql_select_db (dbname);
?>

But i'm not sure a: what to change the localhost to when its on the server. and b: if i need to make changes to any other files, especially server files.

Running PHP As CGI On Apache
I'm having what you could call a bad day, now I'm not an experienced user of PHP but I know enough to install scripts and get them looking how i want them to.

I'm trying to install Gallery 1.2.5, unfortunatly my new virtual host runs PHP in safe mode which renders the script useless, after reading their FAQ I found that i can run PHP as CGI and place the script in there.

Now I have a problem I cannot compile this on the server as i don't have the permissions or access to do so, is there anywher i can get a pre-compiled version of php.cgi with newbie type instructions?

Help..PHP/APACHE Slow
Have compiled PHP 4 with MySQL support into my Apache 1.23.32 server. It works great but I've noticed it drastically slows down the speed at which the pages load. I would expect a php script with a DB query to be slower, but this goes for almost 10 seconds or more on the same network. HTML zaps onto the screen real quick.Is there a way I can make the server respond faster?

Need Help Parsing Php Thru Apache
I had PHP4 working fine thru Apache on a windows ME laptop however, I nanged up and did something odd (in the file association) as now when I try and parse any php documents all I get is the Open with dialog box. What should the correct file associations be as I cant get apache to recognise any php files. Any help greatly appreciated.

Apache User Through Php Possible?
As a part of a "system test" page I'm writing, I want to find out what user that apache is running for the virtual host that it is running.

Ex:

(from apache's conf file)
DocumentRoot /home/ron/public_html/
User ron
Group ron

I want to find out that the virtual server is running as user "ron".


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