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.
1
vote
0answers
7 views
Filter mail sender PHP files
Is there a way to tell PHP which PHP files exactly are allowed to send emails? I would like to create a whitelist about these PHP files, and other PHP files would not be able to send emails at all.
...
-2
votes
0answers
12 views
install pthread on centos [closed]
I need to install pthread for my web applications, my server is Centos.
I need to find a place where I can get some documentation on installing pthread. My web server is Apache 2.2.3 and PHP is 5.4.
...
2
votes
0answers
20 views
PHP CLI: Call to undefined function mysql_connect() even with mysql module enabled
I try to run a PHP script from the command line, but get the following error:
Call to undefined function mysql_connect()
However, the mysql module is loaded:
root /var/www/scripts # php -m | grep ...
-2
votes
1answer
16 views
PHP installation does not support PostgreSQL linux [closed]
I have a server with centos 6
i have installed apache webserver in this with php, mysql and postgreSQL.
php version is 5.3.19
PostgreSQL is 9.2
I also installed phpPgAdmin
If I try to access ...
-1
votes
1answer
13 views
Which version of php is PHP/5.3.2-1ubuntu4.19 [closed]
Is it PHP version 5.3.2 or PHP version 5.3.2.1 or some other version and only the first 3 digits are shown? Where can I find this info?
0
votes
0answers
16 views
Installing apc in wampser x64 win 7 x64 [closed]
I have wampserver x64 installed with PHP 5.4.3 in windows 7 ultimate x64, I downloaded the apc extention from here http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows /, extract it ...
-2
votes
0answers
27 views
Compare variables in .htaccess
Is there a way in .htaccess to compare %{HTTP_COOKIE} value with %{QUERY_STRING} value, if they match then redirect according to?
something like this
RewriteCond expr "! %{HTTP_COOKIE} -strmatch ...
-3
votes
1answer
34 views
Server connections too Slow [closed]
There is a Wordpress Blog on it, with over 20.000 Visitors a day.
When i have over 250 simultaneous visitors, my site loads after 3-5 seconds. But when there are fewer than 250 like 180 my site loads ...
-1
votes
0answers
27 views
Building a secure shared hosting environment [closed]
I'm creating a shared host environment but I'm not entierly sure about what path to take. It will be for ordinary customers and business customers so already there I'm thinking that they should be ...
0
votes
0answers
18 views
APC is behaving weirdly in combination with PHP5-FPM and Nginx
I've got APC running on my Ubuntu 13.04 Server box for quite a while now. A couple of days ago, something, somewhere went wrong and now it's acting very strangely. I'll lay it out.
APC 3.1.13 ...
0
votes
0answers
25 views
Ubuntu install php5-ffmpeg
When I try to install php5-ffmpeg:
apt-get install php5-ffmpeg
I get an error:
The following packages have unmet dependencies:
php5-ffmpeg : Depends: phpapi-20090626+lfs
As I understand my ...
4
votes
2answers
86 views
Why does Debian clean php sessions with a cron job instead of using php's built-in garbage collector?
Debian and derivatives (Ubuntu) don't use the php session garbage collector
session.gc_probability = 0
instead they use a cron /etc/cron.d/php5
09,39 * * * * root [ -x /usr/lib/php5/maxlifetime ] ...
0
votes
0answers
14 views
The UPDATE permission was denied on the object [migrated]
I'm connecting to a remove Microsoft server running MsSQL via PHP. The code looks something like:
$con = mssql_connect('0.0.0.0:123', 'user', 'pass')
or die(log_mssql_error(__FILE__, __LINE__, ...
1
vote
0answers
8 views
Oracle SQLConnect: 1033 via UnixODBC
Here is the full error:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08004] SQLConnect: 1033 [unixODBC][Oracle][ODBC][Ora]ORA-01033: ORACLE initialization or shutdown in ...
3
votes
1answer
12 views
Absolute/relative file paths affecting server load?
I was told by my hosting provider's technical people that I should be using relative file paths (/home/index.php) instead of absolute paths (http://www.example.com/index.php) to "reduce server load".
...
0
votes
0answers
12 views
403 when posting to a specific URL on an cPanel/Apache server
I'm having an issue with an cPanel/Apache server where my script gets a 403 error on a certain form being posted.
The only thing that shows up in the error log is a 404 trying to find the 403 page.
...
0
votes
0answers
19 views
eAccelerator causes the server to deliver gibberish data
I'm trying to integrate eAccelerator into my server infrastructure using the ELS script. But when I activate it, it causes the gibberish data (shown below) to appear instead of the real content. There ...
-1
votes
1answer
38 views
Patch for Suhosin for PHP 5.4.15 [closed]
I want to test if the latest dev-Suhosin Version for PHP 5.4.15 is stable and now I want to compile it along with PHP.
According to this instructions (not the latest PHP and Suhosin but installation ...
2
votes
2answers
38 views
How do I properly escape and interpolate variables in Bash?
I'm trying to write a one-liner to convert html entities present in some files (all html with UTF-8 encoding)
I've tried
recode HTML_4.0 file.htm
but that also converts non-ASCII characters (it ...
0
votes
0answers
13 views
How to solve Apache2 error “(32)Broken pipe: core_output_filter: writing data to the network”
The index.php file of our companies Wordpress(3.5.1, a handfull visitors per day) blog reacts very lame to each request. It appears after a minute. This behaviour comes out of the blue, no changes ...
0
votes
1answer
34 views
Setting up virtual host with symlink in Ubuntu 12.04
I am newbie in virtual host. I have followed this tutorial to create a virtual host to run php projects. Also, I've used symlink method described here. Steps in first tutorial like installing apache, ...
0
votes
1answer
19 views
Equivalent of PHP setlocale in an APACHE config file
I need to display a date in french locale.
A solution is to use setlocale(LC_TIME, 'fr_FR');
But I'm looking to set the locale directly in the configuration of my apache server.
In the ...
1
vote
1answer
38 views
Configure VirtualBox webserver to see visitors IP address
I finally managed to move my server to VirtualBox virtual machine.
VM is running in NAT mode. I have forwarded necessary ports, including the port 80 which I first fowarded with iptables to port ...
0
votes
2answers
35 views
Looking into AWS services. What services do I need to transfer my servers over (MySQL & PHP running on Windows 2008)?
I have two servers that I am thinking of moving to AWS (or is Azure a better option?) if it saves me money and helps reliability and scalability:
Windows Server 2008 running IIS web server with PHP. ...
1
vote
1answer
21 views
How to tell php-fpm to send php error log to the nginx error log?
When I am using apache/mod_php, the PHP error will appear in the apache's error log.
Now, I am using php-fpm with nginx via fcgi, is it possible to have the PHP error log in the nginx error log as ...
0
votes
3answers
32 views
Apache httpd offline installation on Debian
how can I install Apache HTTPD offline on a Debian Linux distribution?
On this case I have no internet access at all on this machine, so I was searching for binary distributions of Apache Httpd and ...
0
votes
0answers
28 views
Script working from test to production server
I am running the following script:
http://phprestsql.sourceforge.net/
My test environment is a WAMP server running Apache 2.2.17 and PHP 5.3.4
My production server is running Apache 2.2.14 and PHP ...
1
vote
1answer
29 views
PHP mail function can't send to att.net, MAIL FROM line is incorrect
When web apps on my VPS use the PHP built-in mail function, some domains (like att.net) bounce emails back. /var/log/mail.log reveals:
550 [PERMFAIL] att.net requires valid sender domain (in reply to ...
0
votes
1answer
11 views
Errors getting apache working with fcgi and suexec
I have a Debian 6 server and I was previously using Apache with mod_php but decided to switch to using fcgi instead since Wordpress was somehow causing Apache to crash. I have the following in my ...
0
votes
1answer
44 views
Install PHP 5.2 on CentOS 5.9: undefined symbol php_sig_jpg
I have installed PHP 5.2 from source (we're moving some sites that require 5.2, unfortunately) to a CentOS box. PHP is compiled from source, but when I try to start apache I get the following error:
...
-2
votes
0answers
21 views
Localtunnel won't work through virtualbox [closed]
I've also asked this question on StackOverflow
I'm running Ubuntu 12.04 in a virtual machine (Virtualbox, to be specific) on a Windows 7 host. I'm trying to set up a localtunnel (using ...
0
votes
1answer
37 views
safe_mode problems after upgrade from PHP 5.3 to 5.4 with Plesk 11
I just updated my server (running with Plesk 11) from PHP 5.3 to 5.4 via the dotdeb sources.
Everything was fine except a few things.
I had to disable all safe_modes in several vhosts. Plesk has the ...
0
votes
2answers
36 views
Change php error reporting to hide warnings for specific site only [Debian|Ubuntu]
Imagine a couple of sites-enabled available from /etc/apache2/sites-available. (Only Debian-based distros work like this.)
Is it possible to mute warning messages from php scripts from a specific ...
0
votes
1answer
31 views
Any possible side effect to use APC on shared host? [closed]
I'm using a shared host for a CMS site. This shared host has an option to use "APC".
I just tried this option on a test site as it can be enabled just by one click on my account page of the shared ...
-1
votes
0answers
23 views
Which file specifics the php executable for php files [duplicate]
I remember seeing a file where every preprocessed Filetype (e.g. PHP) and the matching executable was specified. I can't find that file and I also don't know what to look for when researching. Could ...
1
vote
0answers
28 views
PHP SSI with NGINX
I've got a really old website I'd like try running on NGINX instead of Apache. This site consists of many flat HTML files with sporadic PHP SSIs, such as:
<!--#include virtual="/some_file.php" ...
1
vote
0answers
32 views
How can I serve up HTML and JSON with nginx during “maintenance mode”?
I've got an nginx config for a PHP web app and I would like to make it serve an additional purpose, and I can't seem to find a way to accomplish it. My current nginx config does the following:
...
0
votes
2answers
84 views
Cron job to execute PHP command fails with “Could not open input file: php”
I have a dozen or so cron jobs running on my Ubuntu 12.04 server, and I use the Webmin interface to administer them. They all execute PHP scripts. Most I created a while back, and they all work fine.
...
0
votes
0answers
16 views
Wordpress URL String “[0,43391,49586] -> [N] POST http://example.com” Coming from Asian Hosts
My wordpress sites started seeing the URI string shown below. All of the requests are coming from middle east and Asia (mostly Chinese) hosts. These requests generate 404s in my logs.
What is this ...
0
votes
1answer
42 views
NGINX + Codeigniter doesnt work can't access controllers and send parameters to controllers
I want to run codeigniter under NGINX but it just doesnt work. I want to be able to send a parameters to controllers methods. But so far I can not even access controller using the address ...
0
votes
1answer
39 views
Can't get Codeigniter URLs working on Nginx
After successfully setting up nginx on my windows, another problem where I am stuck. Though, everything works as usual. I am able to access pages and PHP works fine but problem comes when I try to use ...
1
vote
0answers
29 views
Conflict with 3 different RewriteRules in .htaccess?
I'm using the below in my .htaccess file.
There 3 types of redirects:
redirect to directory /admin/index.php
redirect to specific .php files e.g. /about
redirect to user profile page from /John
...
0
votes
2answers
37 views
Can't get php-fpm with Nginx to work
Server: CentOs x86_64
/etc/php-fpm.d/webuser1.conf
[webuser1]
listen = 127.0.0.1:9001
listen.allowed_clients = 127.0.0.1
user = webuser1
group = webuser1
pm = dynamic
pm.max_children = 15
...
0
votes
1answer
48 views
How can I configure a Ubuntu LAMP web server with permissions like CPanel?
I know how to set up a LAMP stack on Ubuntu pretty well for a single website / single user, but I'd like to allow multiple users to host multiple sites on a single server.
This is for different ...
0
votes
1answer
23 views
PHP Not running on specific directories [closed]
Ok. This is a pretty weird error:
I made a folder named 'hello' at /etc/apache2/sites-enabled/ with hello.php. Then i created an Alias that told /hello would go to /etc/apache2/sites-enabled/hello.
...
0
votes
1answer
32 views
PHP Fatal error: Maximum execution time of 0 seconds exceeded
I have PHP application that uses pdf2htmlEX and HTMLpurifier to convert pdf documents to text format. Conversion process consist of few steps:
1. uploading book using web browser
2. conversion from ...
-1
votes
1answer
39 views
Send email from linux server through remote linux smtp server using PHP [closed]
Here's my setup
Ubuntu Database server that runs scripts that need to be able to send emails
Ubuntu Web Server that has sendmail setup on it that used to run scripts that send emails
Is what I need ...
-1
votes
2answers
68 views
Directory and files have 775/644 permissions but php says it is not writable?
I think this has something to do with ownership of the folders, but I have a php app that I am trying to get setup and I cannot install it because it tells me the permissions are not correct.
I set ...
0
votes
0answers
19 views
Apache Segfaults on OS X at random - how can I diagnose? [closed]
We have been having intermittent Apache crashes on OS X 10.7.5 (Lion Server). These crashes seem to happen at random and we've tried everything to find the cause.
The problem may be with PHP or ...
-2
votes
0answers
32 views
Cron job is occupying my server [closed]
I wrote two PHP scripts. First one is adding users to one another system calling its API functions. Another script is connecting to FTP, downloads the file, and analyze it.
Tuesday I scheduled two ...