Questions tagged [php]

PHP is a general-purpose scripting language that is especially suited for Web development. The online manual is an excellent resource for the language syntax and has an extensive list of the built-in and extension functions. Most extensions can be found in PECL.

Filter by
Sorted by
Tagged with
1 vote
0 answers
602 views

LDAP request seems to hang at repeating 125 byte packet, and TCP connection does not close

I've rewritten this question to focus on a specific part. Originally titled "Apache hangs or quits, but keeps TCP sockets open and won't accept connections" Problem Problem is a website (Moodle) ...
JDS's user avatar
  • 2,628
4 votes
3 answers
3k views

Is there a safer way to stop mysql(d)?

I'm running very hard php script on my cheap virtual machine, which has about half million page views a week so it's a bit problematic. I restart my mysql twice a day. That wouldn't be problem, but ...
genesis's user avatar
  • 343
2 votes
1 answer
2k views

What is "php exited with error code 1"?

I'm running a php script through the webserver to execute psexec which in turns executes another php script. When I run this from the command line normally, everything works fine and there are no ...
Rob's user avatar
  • 2,453
1 vote
1 answer
146 views

Solaris PHP OCI8 Outbound Port Usage

We are going to be using PHP/OCI8 to connect to a remote Oracle Instance. My problem is the need to define the outbound port usage from PHP so the firewall rules that need changed will allow the data ...
Manzo's user avatar
  • 13
3 votes
3 answers
9k views

Is there a way to use Java and PHP on the same Apache server or at least, same port?

I am pretty new to Java for Web and my question is if I can use Java and PHP together? I know I can use them together, let's rephrase the question, is there a way to access them at the same port? ...
Andrew's user avatar
  • 143
3 votes
2 answers
2k views

Setup secure shared hosting (Apache, PHP, MySQL)

So I'm setting up a shared hosting with Apache, PHP, MySQL and the biggest question mark is how to do with PHP, since there is a million options out there how to configure it securely. The plan is: ...
Apaz's user avatar
  • 43
0 votes
1 answer
49 views

On Windows, do I need to give any special permissions to my web server user to run a script created by Administrator?

I'm trying to run a PHP script from the webserver that executes other scripts and programs. When I run it manually, everything works fine, but when I run it from the webserver, it doesn't seem to ...
Rob's user avatar
  • 2,453
5 votes
3 answers
2k views

PHP APC Accelerator completely breaks Apache2 on Windows?

My local development configuration: Apache 2.2.21 VC9 downloaded from Apache Lounge (as suggested at PHP For Windows website. Manual installation as service. PHP 5.3.8 VC9 x86 Thread Safe, installed ...
gremo's user avatar
  • 349
4 votes
3 answers
4k views

trigger a php script when an email is received

I have a centOS server with qmail and I want to set it up so that every time an email is delivered, a php script is run immediately after. I don't need to "forward" the specific message to the php ...
matteo's user avatar
  • 729
1 vote
1 answer
465 views

Why is my application hanging when ran from the webserver?

I'm using PsExec to run a command line program without having to wait for it to finish to report back to the script that ran it. I'm using a PHP script to run it. When I run the PHP script manually on ...
Rob's user avatar
  • 2,453
0 votes
1 answer
590 views

PHP 5.3.8 fopen on Windows Server 2003

I'm working with a project where the client is running WordPress on Windows 2003. They upgraded to PHP 5.3.8 and most things are working well. They aren't able to connect to outside services, though, ...
Jonathan Wold's user avatar
1 vote
2 answers
166 views

PHP installed twice - get rid of one

Newb question: Running CentOS 5.x I had an older version of PHP (about 5.2.9 or something) and I downloaded the source for and installed the latest (5.2.17). Now, I checked yum and it had PHP 5.2.17 ...
Max's user avatar
  • 439
6 votes
5 answers
13k views

Is There A Simple PHP Web Server [closed]

Is there anything that is a dead-simple PHP web server for Linux that literally takes a single PHP file and serves it via port 80. Don't want to configure a full blown web server like apache, lighttpd,...
Justin's user avatar
  • 5,438
2 votes
2 answers
3k views

How can I run a php script from the CLI without prepending "php" to it? [closed]

I'm trying to create a script that runs from the webserver that will run a php file via exec(), but I want it to do so without prepending the php to it. Can this be done? Using Windows 2008 and XAMPP
Rob's user avatar
  • 2,453
-3 votes
1 answer
352 views

Apache not working

i have centos 5...php 5.3.8 and apache 2.2.21...I had this problem now i have another problem... first of all i see apache test page even though my script is still there ( but that problem i can fix), ...
user's user avatar
  • 869
0 votes
1 answer
534 views

Mediatemple: PHP open_basedir doesn't open private folder

On Mediatemple, I have a file in /var/www/vhosts/domain.com/private that needs to be included in a PHP script. I've changed vhost.conf, changed /etc/php.ini and no matter what, I still get "failed to ...
fredrover's user avatar
  • 101
1 vote
3 answers
176 views

What's a common mechanism for emailing in the background?

When users sign up to my site, the connection from my server to our 3rd-party SMTP provider is very bad and the app takes from a few seconds to a few minutes to connect. While it is trying to connect ...
lamp_scaler's user avatar
0 votes
2 answers
328 views

Out of memory PHP issue

I am getting below errors despite setting memory_limit in php.ini to 64mb: Fatal error: Out of memory (allocated 6291456) (tried to allocate 91284 bytes) in /home/favstayc/public_html/coverbuddy2/...
Passionate Engineer's user avatar
0 votes
1 answer
40 views

Strange behavior in PHP for MAC

I have a problem in Mac Snow Leopard. If i put a php file on the WebServer with the phpinfo() and i call from the command line php -r 'phpinfo();' I get different results even if they (apparently) ...
Cris's user avatar
  • 101
0 votes
1 answer
314 views

Choose which memcache version

For memcached server we are running on version 1.4.5, and the application is built with PHP 5.3.6 and memcache (http://pecl.php.net/package/memcache) version 3.0.5 Currently we have 2 memcached pools,...
forestclown's user avatar
2 votes
4 answers
3k views

how to set php SERVER_PORT var to 80, behind varnish?

how to force php to read SERVER_PORT as 80, when apache listens on 8080 and varnish listens on 80 ?? if my apache vhost is set to 8080, SERVER_PORT will always be 8080, this is troubling me a little ...
Daniel's user avatar
  • 43
0 votes
1 answer
1k views

How to switch from CGI/FastCGI Server API to DSO?

Apache: How to switch from CGI/FastCGI Server API to DSO? I want to switch back and forth. I found this answer for the reverse step, but I need the the first part: Apache: How to switch to CGI/...
Mark's user avatar
  • 9
1 vote
0 answers
865 views

Apache 2.2.16 with mod_php on Debian Squeeze CPU high load

Configuration: CPU 16 cores 14 GB RAM Apache 2.2.16 PHP 5.3.3-7 with enabled APC Apache mpm config: StartServers 50 MinSpareServers 50 MaxSpareServers 256 ...
Vitaly Baev's user avatar
2 votes
2 answers
442 views

Is it worth to manually compile PHP vs use deb package?

For performance reason, I'm wondering if it is worth to compile php 5.3.x myself instead of using the default .deb package. I know some PHP core developers that say that is worth to do it. By the ...
JohnT's user avatar
  • 21
1 vote
0 answers
151 views

Make Lighttpd treat .CSS files as .PHP files

I want files with a .CSS extension to be treated as PHP, and parsed/executed as if they were .PHP files (in addition to retaining the default behavior of parsing .PHP files as PHP). Is there an easy ...
Keith Palmer Jr.'s user avatar
0 votes
1 answer
920 views

Create CardDAV or LDAP server on shared host via PHP? [closed]

Is it possible to run a CardDAV or LDAP server on my shared hosting account? It is a Linux account using CPanel. I do not want to store my address book on my local computer any more, but centralized ...
TruMan1's user avatar
  • 435
1 vote
3 answers
5k views

Installing PHP PECL memcached extension on CentOS 5.6

I would like to setup memcached on my server so that I can learn how to use it. It is my understanding that the basic requirements to use it with PHP are: PHP memcached PHP PECL memcached library ...
Mike Moore's user avatar
2 votes
3 answers
861 views

Secure http transfer with ssh (tunnel)?

I have two servers which communicate over http. I wish this transfer be secure. How can this be achieved? I do not wish to use use https (that would require ssl certificate,right?) [SERVER-I] --> [...
kapeels's user avatar
  • 355
0 votes
2 answers
3k views

PHP_FE_FUNCTION : C error when trying to enable extension

I have a question about PHP. I use Ubuntu but I have different PHP builds that I built myself in /opt/php. I have a problem (using PHP 5.3.8) when enabling an extension doing the following synopsis ...
François ッ Vespa ت's user avatar
4 votes
3 answers
6k views

Enabling phar on Dreamhost shared hosting?

So, i'm trying to use Silex on my dreamhost account and I'm getting an error Fatal error: Class 'Phar' not found in blah blah blah... when I try to include the Silex.phar file. When I look at ...
Paul Wicks's user avatar
1 vote
1 answer
3k views

How do you enable SSL for PHP cURL on Linux?

That's all there is to my question: how do you enable SSL for PHP cURL on Linux (specifically Ubuntu)? I'm not finding the answer by Googling it.
Jason Swett's user avatar
  • 1,468
2 votes
1 answer
642 views

Suhosin per-URL exceptions?

I am using SimpleID as my OpenID provider and it turns out that if I log on via pages like those on StackExchange, one of the parameters of the GET request gets dropped by Suhosin. The name of the ...
0xC0000022L's user avatar
  • 1,546
3 votes
1 answer
439 views

Setting the From header makes mail() take a long time to send

I've seen this behavior twice in the past week or so, where mail takes a very long time to send (60 seconds). In troubleshooting one case, I found that cause is setting a custom 'From' header. I can ...
Tim Lytle's user avatar
  • 511
0 votes
2 answers
169 views

php mail settings - proper values for my setup

We use a hosting company for our website but we have our mail servers hosted by our isp with our website domain; @sample.net. SMTP mail.isp.com On the website we have a contact form which emails ...
aaa's user avatar
  • 1
1 vote
2 answers
5k views

When accessing PHP files, nginx throws an 404 error

Right, sorry for the previous, recent questions I've asked about nginx, this is just doing my head in. I've enabled PHP using fastcgi_php and it works just fine, however, when I access to a PHP file, ...
MacMac's user avatar
  • 2,141
0 votes
2 answers
4k views

the url requested was not found on this server

I uploaded a script called phpmotion to my vps, see this when you go to pretty much any page you'll see this error Not Found The requested URL /xyz was not found on this server. Apache/2.2.3 (...
user's user avatar
  • 869
0 votes
1 answer
1k views

What is the best practice for adding Apache mod_unique_id to PHP error logs?

I have turned on mod_unique_id for my apache server and the apache logs show that the unique_id is indeed being logged. Also, I can now access $_SERVER['UNIQUE_ID'] via PHP through the $_SERVER ...
Mike Purcell's user avatar
  • 1,738
2 votes
1 answer
2k views

Install PECL mailparse on XAMPP?

Similar to Is it possible to install Mailparse extension via PECL installation - without recompiling PHP I'm trying to install mailparse on xampp. XAMPP actually has a guide for this, and I've tried ...
cwd's user avatar
  • 2,783
6 votes
1 answer
1k views

Looking for specifics about how PHP session garbage collection works

PHP has several session settings that control the probability that garbage collection (i.e. deletion of expired sessions) will occur. My question is: does this probability apply to all running Apache ...
JDS's user avatar
  • 2,628
14 votes
5 answers
56k views

PHP: Serve a file for download without providing the direct link

I want to serve invoices for download. Currently I'm using a simple numbering scheme (invoice-01.pdf, invoice-02.pdf, and so on). I know that I could use hashes instead to obscure the data. Is it ...
Frank Vilea's user avatar
0 votes
1 answer
280 views

Test PHP script load on Debian server

Anyone maybe know is there Linux (debian) tool for testing PHP application performance? I want to check in witch places my PHP/MySQL script need optimization.
PsychoX's user avatar
  • 185
1 vote
2 answers
1k views

PHP as an Apache Module: Change the path of PHP interpreter

I have a Ubuntu LAMP with PHP installed as a module. Since it's a default LAMP server, Apache fetches /usr/bin/php to execute PHP. I have a PHP built in /opt/php/5.3.8 and I like to use this path ...
François ッ Vespa ت's user avatar
0 votes
1 answer
6k views

nginx with php5-fpm, maximum execution time exceeded

In php.ini I have set "max_execution_time = 1200", phpinfo() confirms that, but my script stops after 300 seconds with message: "PHP Fatal error: Maximum execution time of 300 seconds exceeded" ...
dmz's user avatar
  • 3
0 votes
1 answer
1k views

Apache 2.2, worker mpm, mod_fcgid and PHP: Can't apply process slot

We're having an issue on an apache server where every 15 to 20 minutes it stops serving PHP requests entirely. On occasions it will return a 503 error, other times it will recover enough to serve the ...
mopoke's user avatar
  • 51
8 votes
3 answers
46k views

Change php modules directory

I am compiling php, and its setting my modules directory to /usr/lib64/20090626-zts I would like to change this to /usr/lib64/php/modules, but I cannot find a configuration option to do so. I can ...
copacetic's user avatar
  • 183
3 votes
2 answers
2k views

What does "Restart PHP" mean in Zend Server?

I've been using Apache with PHP for years, both as standalone installs (Windows and Linux) and as part of WAMP stacks on Windows. Today I decided to try out Zend Server CE, and was surprised that it ...
BenMorel's user avatar
  • 4,607
0 votes
1 answer
147 views

setup php + sql server on win7

I have a SQL server running on Windows 7. Downloaded PHP and uncommented the mssql-extension. Now Apache fails to start up. When I comment the mssql-extension again, it starts up fine. I did some ...
user410932's user avatar
0 votes
1 answer
59 views

Strange error with Apache & PHP [duplicate]

Possible Duplicate: Why is PHP script downloaded instead of executed What causes PHP pages to consistently download instead of running normally I have searched for this issue and did not find ...
Jack H's user avatar
  • 71
47 votes
1 answer
80k views

Curl POST - 411 Length Required

We have a RestFUL API we build in PHP. If we make the request: curl -u api-key:api-passphrase https://api.domain.com/v1/product -X POST We get back: 411 - Length Required Though if we simply add -...
Justin's user avatar
  • 5,438
1 vote
1 answer
1k views

NGINX and php_fpm streaming file takes triple in transfer?

My setup: - nginx 1.0.6 ( compiled from scratch ) - php 5.3.8 with php-fpm ( also from scratch ). I use this PHP script to stream files from the remote site to my users: $chunksize = 1 * (...
Alex's user avatar
  • 11

1
107 108
109
110 111
159