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.







Php Cli Keeps Timing Out


I have a php cli shell script that I want to be running continuously without ever stopping. However, I noticed that it would stop executing after a while on its own.

Is there a way to keep a script running forever without timing out, or daemonize it?


View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Php Passthru() Works From PHP CLI But Not Web
php passthru() works from PHP CLI but not web

I have a script which I use to restart processes and I am trying to make it work by clicking a button on the word. It works from running it from php command line but I can never seem to get it to work through the click of a button. Does anyone know what may be the cause of this?

here is some other observations:

old php version 4 seems to work fine, but ever since around 4.3+ it just won't work from the web.

View Replies!   View Related
Php Cli
After a couple of years with php and now starting to explore servers and Linux more I've come across running php from the command line. From what i've seen, when you run a php script through the executable, you can specify a path to the php.ini file. Assuming I am running php as a module with apache, can I create a separate php.ini file for the executable, thereby enabling features for myself to make server administration easier through exec, and keep the php.ini for the apache module separate with more restritcted functions for clients?

View Replies!   View Related
PHP CLI
I am looking for PHP CLI location in plesk

View Replies!   View Related
Diffrence Between Cli & Cgi
what is diffrence between them and which of them is better in securety?

i have cent os and direct admin.

View Replies!   View Related
Websites Timing Out
I'm not sure why my brand new dual proc quad core xeon 2.5ghz harpertown gets time out when the server load is under .5

Like it'll be running ultra fast and suddenly, I can't get into ssh, whm, my websites or anything. When I ping it, no reponse. Is it because it restarted itself?

View Replies!   View Related
Apache Timing Out
I have recently tweaked my server (AMD 3000+ 1gb Ram 10mbps port) by configuring the httpd.conf, my.cnf and php.ini.

I am pleased to say that the server is now responding well and the load is always below 1.00.

However, sometimes a user will experience a time-out through their browser. Once they refresh the server will then react as it should and carry out the command which is being asked of it.

tweaking apache so that timeouts do not occur....here are the changes I have made...

php.ini

Code:
[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = Off
httpd.conf

Code:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3
MinSpareServers 16
MaxSpareServers 32
StartServers 20
MaxClients 150
MaxRequestsPerChild 5
and finally here is my.cnf file

Code:
[mysqld]
skip-locking
skip-innodb
max_connections = 400
key_buffer = 200M
myisam_sort_buffer_size = 64M
join_buffer=2M
read_buffer_size = 5M
sort_buffer_size = 5M
read_rnd_buffer_size = 5M
table_cache = 1536
thread_cache_size = 128
interactive_timeout=100
wait_timeout=10
connect_timeout=10
tmp_table_size = 48M
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 3M
query_cache_size = 64M
query_cache_type = 1
thread_concurrency=4
log-slow-queries = /var/log/mysql/mysql-slow.log
old-passwords = 1

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

View Replies!   View Related
CRON Job Timing Out
i have had a problem for some time now, regarding my CRON jobs. I am trying to download a large amount of data from ebay (through their API, totally legal and aboveboard) using php, but my CRONjob times out.

I have tried resetting the timeout variable, but then it exceeds the maximum filesize
SO, my question: is there any way to have a script run as a CRON job, and wen it is complete, call another script?

View Replies!   View Related
Httpd Running But Timing Out
I had a strange error this morning, httpd was running fine but nothing was loading. All the other services worked fine but I checked the error log and couldn't find anything. I restarted httpd and it's running fine now.

Quote:

[Sat Feb 10 11:48:01 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Feb 10 11:48:01 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Feb 10 13:06:02 2007] [notice] caught SIGTERM, shutting down
[Sat Feb 10 13:06:03 2007] [notice] Apache configured -- resuming normal operations
[Sat Feb 10 13:06:03 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Feb 10 13:06:03 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Sat Feb 10 20:42:26 2007] [notice] caught SIGTERM, shutting down
[Sat Feb 10 20:42:28 2007] [notice] Apache configured -- resuming normal operations
[Sat Feb 10 20:42:28 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Feb 10 20:42:28 2007] [notice] Accept mutex: sysvsem (Default: sysvsem)

Looks just like normal operations... I checked the access log and nothing looked out of the ordinary either.

Anyway the only suspicious thing I saw was the daily scan by spammers to see if I had anything exploitable.

Quote:

[Sat Feb 10 00:16:32 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/a1b2c3d4e5f6g7h8i9/nonexistentfile.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/adxmlrpc.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/adserver/adxmlrpc.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/phpAdsNew/adxmlrpc.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/phpadsnew/adxmlrpc.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/phpads/adxmlrpc.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/Ads/adxmlrpc.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/ads/adxmlrpc.php
[Sat Feb 10 00:16:33 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/xmlrpc/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/xmlsrv/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/blog/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/drupal/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/community/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/blogs/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/blogs/xmlsrv/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/blog/xmlsrv/xmlrpc.php
[Sat Feb 10 00:16:34 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/blogtest/xmlsrv/xmlrpc.php
[Sat Feb 10 00:16:35 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/b2/xmlsrv/xmlrpc.php
[Sat Feb 10 00:16:35 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/b2evo/xmlsrv/xmlrpc.php
[Sat Feb 10 00:16:35 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/wordpress/xmlrpc.php
[Sat Feb 10 00:16:35 2007] [error] [client 69.13.76.82] File does not exist: /var/www/html/phpgroupware/xmlrpc.php

I have nothing to be exploited so I'm thinking that wasn't the cause either.

I checked user_beancounters and there are also 0 fail counts.

Quote:

Version: 2.5
uid resource held maxheld barrier limit failcnt
509: kmemsize 4679572 9150217 50000000 50000000 0
lockedpages 0 0 256 256 0
privvmpages 51822 84271 262140 524280 0
shmpages 10913 10929 21504 21504 0
dummy 0 0 0 0 0
numproc 52 91 400 400 0
physpages 14273 24587 0 2147483647 0
vmguarpages 0 0 131070 2147483647 0
oomguarpages 14912 33040 26112 2147483647 0
numtcpsock 16 146 360 360 0
numflock 1 6 188 206 0
numpty 2 2 16 16 0
numsiginfo 0 25 256 256 0
tcpsndbuf 154284 371176 1720320 2703360 0
tcprcvbuf 197308 539932 1720320 2703360 0
othersockbuf 13416 239892 1126080 2097152 0
dgramrcvbuf 0 2800 262144 262144 0
numothersock 13 27 360 360 0
dcachesize 0 0 2273280 2416640 0
numfile 1199 2022 5820 5820 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 89 89 128 128 0

View Replies!   View Related
CLI For Rebuilding Raid Mirror In Adaptec 2410
Anyone knows the CLI command for rebuilding a mirror raid for Adaptec 2410?

View Replies!   View Related
Trying To Import Mysql Database Via CLI In Ubuntu Linux
I have ubuntu 6 server version running.

I am trying to import a database I have however I cannot get it working for the last 2 hours!

I have tried various commands like logging into mysql entering the "use" command to use a database and then variations of the "source" command but my db.sql file doesn't run.

Also tried the full command

mysql -uroot -pMYPASS MYDBNAME < /var/www/site/db.sql

Neither seem to do anything.

PHPMYADMIN shows no database tables at all.

Running mySQL 5.

View Replies!   View Related
A Tale Of Woe And Bad Timing
I decided to merge 2 old dedicated servers into 1 colocated machine with better specs the old machines have a combined number of about 280 accounts.

I purchased a Broadberry Server and requested a specific setup and OS (CentOS) after some delays they finally got it working and shipped it to the Datacentre

I chose 49pence/RapidSwitch for colocation in the UK

I received a email from 49pence on how they wanted it setup and Broadberry did this as well which was good.

Unfortunately I got the email it had been received and installed from RapidSwtich before I received the email regarding server admin and password info

Broadberry set a very weak password up a bit of an oversight this

As within 12 hours of it being installed it was hacked!

Being a UK bank holiday we were unable to do anything till today

And now we are having to retrieve the server to reinstall everything and start again!

I hope the companys involved will be cooperative so we can get this up and running asap.

My severs at Coreix end later this month.

A lesson to be learned for us and I hope anyone reading

Next time we have a check list to make sure nothing gets overlooked!

Luckly no data on the server and no harm done other than cost and time.

View Replies!   View Related
Geo Load Balancing Via Timing Connections
I'm working on a script to help users get routed to the nearest, fastest server for the best ping. I'm in 2 datacenters, one on the east and one one the west coast of the US.

I've looked at some of the geo lookup programs based on IP, but they either seem inaccurate or expensive.. and just downright difficult to use.

I found out that some geo load balancers use the connection speed to figure out the best route. So, I'm trying to think of a way of timing the users connection from multiple server locations.

Has anyone here done that sort of thing before? Any suggestions on how to best do that?

Two completely different methods I've considered:

1. putting 2 images on a web page, and using javascript to time the loading of them.
2. pinging the user IP from each coast and seeing which is fastest. (Is there a lighter way than ping? )

View Replies!   View Related
FTP Timing Out When Uploading Small Files
There is a behavour with my server FTP when uploading a whole directory with many files in many sub-directories

Very often, the server disconnect itself when actively uploading files and the log simply says 'timeout'

It is as if the file got 'stuck' half way, and the FTP consider them as idle, therefore it disconnect you with a 'timeout' before reconnecting you.

But i have no problem uploading a single 200mb file to the server via FTP. I suppose no problem with 'keep alive'

So what is this behavior and how to solve it?

View Replies!   View Related
Browser Timing Out/ftp Issues Asia Pacific/Australia/Oceania To US
I have a VPS located in LA, USA.

For over a week now I have had the following network issues:

- browser timing out (for me and visitors to my site)

- ftp connection issues

The server load is low so it's not server related.

Traceroute TO the server appears fine.

Traceroute FROM the server to users IP's appears to have issues over the SingTel/Optus network.

My webhost says it's an issue for SingTel/Optus.

SingTel/Optus Engineer say:
"Our testings point to a problem either within Cogent's network or on a peering link between Cogent and Singtel in LA.

I'd suggest that the owner of the domain (me!) approach his hosting provider and have them escalate to Cogent. We can't escalate to Cogent as we have no peering with them."

So I've been the meat in the sandwich for over a week with no sign of a fix.

My options appear to be to either move the VPS away from the webhost and host it locally (Australia) or to somehow wait for someone to step up and take responsiblity and get this resolved.

My heart says wait as it's not *my* responsibility but it's costing me financially and professionally.

Anyone else experiencing similiar/same issues from the Asia Pacific region to the US?

View Replies!   View Related
Windows- PHP Exploit Being Used To Render All PHP Sites Useless
This has been happening for about 6 months, someone has been exploiting my windows server and causing 300 php.exe processes to run, therefore making the CPU usage go to 100% and cause all php sites to not function. It is a perl script, and I had gotten ahold of the explot, but am unsure how to block it,

what the following is doing, and how to block it.. once I find the script again I will add it to the post..

I am using Plesk on my box.

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
Update Php And Website Showing Php Code
I have update php successfully 5.2.6 to 5.2.9.

-bash-3.2# php -v
PHP 5.2.9 (cli) (built: Apr 10 2009 00:53:01)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

i already restart the httpd but everytime I go to my website, php page is now showing my php page as php code. :/

View Replies!   View Related
Strange PHP File On My VPS. (oxb.php)
I found a strange PHP file in a strange folder on a VPS I am using to host a few sites. I've looked through the logs but can't figure out how it got there and I've look at the code and can't make any sense of it. Can somebody take a look at the code and tell me what they think of it: .....

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
PHP Bug- PHP Can't Resolve Domains, Server Can
My VPS was a clean build 2 weeks ago and so far i have installed cpanel and configured everything and added accounts. I began that one of my scripts that uses gethostbyaddr($ip) was failing to resolve any of the ip's it received. I made another PHP file to test this, with this code:

PHP Code:

 <?phpecho file_get_contents[url];?>

Resulting in:

Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known

The thing is, the VPS is resolving domains just fine

I can ping, send emails, even dig:

Code:
[root@server etc]# dig google.com

; <<>> DiG 9.2.4 <<>> google.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34548
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 300 IN A 64.233.167.99
google.com. 300 IN A 64.233.187.99
google.com. 300 IN A 72.14.207.99

;; AUTHORITY SECTION:
google.com. 343652 IN NS ns2.google.com.
google.com. 343652 IN NS ns3.google.com.
google.com. 343652 IN NS ns4.google.com.
google.com. 343652 IN NS ns1.google.com.

;; ADDITIONAL SECTION:
ns1.google.com. 343143 IN A 216.239.32.10
ns2.google.com. 343143 IN A 216.239.34.10
ns3.google.com. 343143 IN A 216.239.36.10
ns4.google.com. 343143 IN A 216.239.38.10

;; Query time: 62 msec
;; SERVER: 83.149.80.123#53(83.149.80.123)
;; WHEN: Tue Jul 24 04:49:35 2007
;; MSG SIZE rcvd: 212

I have no clue what's up, and i think there must be a guru here that has an idea of what is going on?

View Replies!   View Related
Alias To A Php Script (php Suexec Installed)
i install roundcube webmail (php)

i want to add an alias like /mail for all domain to /usr/src/roundcube

i add this command in httpd.conf:

Quote:

Alias /mail /usr/src/webmail

but because suphp installed , apache run it under root user (or user assigned to it) and suphp produce "500 Internal server Error"

View Replies!   View Related
Php Not Updating After Php Update On Centos
im trying to update my php version to 5.2+ so i can run phpmyadmin on my server. Ive tried two different methods both produced same results. First method was to download libxml2-2.7.3 and then do ./configure, make,etc then i download php, ./configure, make install, etc. At first i had to yum install make, then a c complier cause make and ./configure didnt work before that. After everything seemed to work fine until the end when it said you may have found a bug on php would you like to submit it? So obviously the php version didnt update at all.

Next i tried adding a repo that already contained php-5.2.5 and then yum install php since centos only seems to support regular yum install up to php version 5.1.6. i did rpm and installed php and thought sweet ive updated php. Ran php -v and i am still running php version 5.1.6.

View Replies!   View Related
Phpinfo.php.gif Executing Php
Having this problem on chroot'ed sites in Ensim.

This is what I have in my php.conf:

Code:
[root@ns1 conf.d]# cat /etc/httpd/conf.d/php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php5_module modules/libphp5.so

SetOutputFilter PHP
SetInputFilter PHP

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
This prevents file.php.gif from executing in a non-chrooted site, but in my chrooted sites, file.php.gif will execute as a PHP file. Any idea why? Some other config I have to change?

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
1.com/file.php, 2.com/file.php Where File.php Is Hosted On Main.com/file.php
Say I have 2 websites and they all use file.php which is located on mainserver.com/file.php.

I want to use the file like this:
website1.com/file.php
website2.com/file.php

View Replies!   View Related
Fast CGI PHP And Normal CGI PHP In Windows 2003
I have these two options when installing PHP 5.2.6 in Windows 2003, is there any problem or advantages/disadvantages if I use fast CGI PHP rather than CGI PHP?

View Replies!   View Related
Php 4 Automatically Becomes Php 5
we compile a php 4 with all the modules that we require. However, after a day or so, it automatically becomes a fresh compilation of php 5. We then recompile to php 4, but same thing, after a day or so it become php 5 again. We've checked cron, and there's nothing to do with recompiling php.

View Replies!   View Related
Installing Php 5 Together With Php 4
my server running freebsd 6.2

i want to installing PHP 5 so my server can run 2 version of PHP (4 and 5)

im following the step here [url]

installing was successful

[root@s1 /usr/local/apache/logs]# /usr/local/cpanel/cgi-sys/php5 -v
PHP 5.2.1 (cgi) (built: Mar 30 2007 17:07:11)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

but when i try to running phpinfo for it, its show me an error

i grep the error from error.log and got this

[Fri Mar 30 17:42:47 2007] [error] [client 202.65.236.10] Premature end of script headers: /home/uletbulu/public_html/info.php
[Fri Mar 30 17:42:47 2007] [error] [client 202.65.236.10] File does not exist: /home/uletbulu/public_html/500.shtml
[Fri Mar 30 17:44:07 2007] [error] [client 202.65.236.10] Premature end of script headers: /usr/local/cpanel/cgi-sys/php5
[Fri Mar 30 17:44:07 2007] [error] [client 202.65.236.10] File does not exist: /home/uletbulu/public_html/500.shtml

but for php 4 there is no problem at all
or the syntax for php 5 not using phpinfo(); anymore?

[url]
[url]

View Replies!   View Related
PHP 5.2.2 And PHP 4.4.7 Released
Quote:

Security Enhancements and Fixes in PHP 5.2.2 and PHP 4.4.7:

* Fixed CVE-2007-1001, GD wbmp used with invalid image size (by Ivan Fratric)
* Fixed asciiz byte truncation inside mail() (MOPB-33 by Stefan Esser)
* Fixed a bug in mb_parse_str() that can be used to activate register_globals (MOPB-26 by Stefan Esser)
* Fixed unallocated memory access/double free in in array_user_key_compare() (MOPB-24 by Stefan Esser)
* Fixed a double free inside session_regenerate_id() (MOPB-22 by Stefan Esser)
* Added missing open_basedir & safe_mode checks to zip:// and bzip:// wrappers. (MOPB-21 by Stefan Esser).
* Limit nesting level of input variables with max_input_nesting_level as fix for (MOPB-03 by Stefan Esser)
* Fixed CRLF injection inside ftp_putcmd(). (by loveshell[at]Bug.Center.Team)
* Fixed a possible super-global overwrite inside import_request_variables(). (by Stefano Di Paola, Stefan Esser)
* Fixed a remotely trigger-able buffer overflow inside bundled libxmlrpc library. (by Stanislav Malyshev)

Security Enhancements and Fixes in PHP 5.2.2 only:

* Fixed a header injection via Subject and To parameters to the mail() function (MOPB-34 by Stefan Esser)
* Fixed wrong length calculation in unserialize S type (MOPB-29 by Stefan Esser)
* Fixed substr_compare and substr_count information leak (MOPB-14 by Stefan Esser) (Stas, Ilia)
* Fixed a remotely trigger-able buffer overflow inside make_http_soap_request(). (by Ilia Alshanetsky)
* Fixed a buffer overflow inside user_filter_factory_create(). (by Ilia Alshanetsky)

Security Enhancements and Fixes in PHP 4.4.7 only:

* XSS in phpinfo() (MOPB-8 by Stefan Esser)

As always get the source code from php.net and compile away.Or wait for your distro to put out an updated package.

View Replies!   View Related
Yum Install Php Or Manually Install Php
What difference between yum install php or manually install php from scrach (build, make and install)?

I know manually install could configure lots of parameters and paths, like --iconv, --mbsting, etc. I don't know anything behind yum install php. If I want to install php everything in the following:

./configure --prefix=/usr/local/webserver/php --with-config-file-path=/usr/local/webserver/php/etc --with-mysql=/usr/local/webserver/mysql --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-debug --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-sendmail=/usr/sbin/sendmail

View Replies!   View Related
PHP As Apache Module Vs. PHP As CGI Module
What are the advantages/disadvantages of running PHP as Apache module vs. running PHP as CGI module on your server?

View Replies!   View Related
Index.php Is Not Working But Index.php? Is Ok
I recompiled apache and php due to some problems. Now apache and php is running and I have a VB forum running fine. However, one folder has a PHP page named index.php when I type its URL I get it downloaded and it is not executed directly from the server.

when I add "?" to the end of the URL[url]" it runs with no problems!

Is it something wrong with httpd.conf or what?

View Replies!   View Related
PHP
Go to: [url]

Quote:

File Line Command Message
common_functions.php 372 file_exists(/proc/swaps) the file does not exist on your machine

This is a CentOS VPS.

View Replies!   View Related
PHP
I'm currently coding a new PHP script, which is more or less just emailing me a form back from a HTML page.

My simple (first hehe) question is, when the email is actually delivered to my inbox, it appears as from "nobody"

How can I change this so it comes from the $email variable i.e. $email = $_POST['Email']; but inserting that into the mail function?

View Replies!   View Related
PHP 5.2.3
I'm having some issues with PHP 5.2.3 that I need some help with.

I have been attempting to upgrade PHP on a server that, as of right now, has PHP 5.2.1.

When I configure/make/make install PHP 5.2.3, every PHP page on the server gives an HTTP 500 error. In Apache's error_log I see these errors:

Code:
[Sat Jun 16 18:10:28 2007] [error] [client x.x.x.x] malformed header from script. Bad header=<?xml version="1.0" encoding=": /home/juan/public_html/radioblog/BelindaStyle/playlist.php
[Sat Jun 16 18:10:28 2007] [error] [client x.x.x.x] File15] malformed header from script. Bad header=<table width="400px" border="0: /home/samurais/public_html/pruebas/crear_noticia.php
[Sat Jun 16 18:10:29 2007] [error] [client x.x.x.x] malformed header from script. Bad header=<head>: /home/webera/public_html/index.php
[Sat Jun 16 18:10:30 2007] [error] [client x.x.x.x] malformed header from script. Bad header= <head>: /home/itech/public_html/index.php
[Sat Jun 16 18:10:30 2007] [error] [client x.x.x.x] malformed header from script. Bad header= <head>: /home/enoyx/public_html/deathnote/index.php
[Sat Jun 16 18:10:31 2007] [error] [client x.x.x.x] malformed header from script. Bad header= <head>: /home/enoyx/public_html/deathnote/index.php
The configure line I use for PHP (Which works fine with 5.2.1) is:

Code:
./configure --prefix=/usr --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gettext --enable-magic-quotes --with-mysqli --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --with-zlib
I've this noticed in PHP 5.2.3's changelog:
Quote:

Changed CGI install target to php-cgi and 'make install' to install CLI when CGI is selected.

PHP is installed as CGI. (It's a server with cPanel) The only thing I can think of is something with that change to php-cgi, but I do not know. When I revert back to 5.2.1 from 5.2.3 the 500 errors stop.

Does anyone have any ideas as to what is wrong?

Server's OS is CentOS 4.5 and is using Apache version 1.3.37.

View Replies!   View Related
PHP 4.4.7 To 5.2.4
I want to upgrade PHP from 4.4.7 to 5.2.4

View Replies!   View Related
Php 4.4.7
I'm running a cpanel server on CentOS 4.5 32-bit with eAccelerator installed. How do I ugprade PHP 4.4.6 to version 4.4.7 ? Do I need to recompile Apache and/or eAccelerator?

View Replies!   View Related
PHP
I have a PHP script that need's to execute some critical commands such as reboot, halt, start some services, stop another ones etc. I was planning to do this with shell_exec() command, but is there any config to Apache or PHP config files that I need to make before this?

View Replies!   View Related
Re-Compiling PHP
I was recently faced with a problem, i had to install some extensions which were not included by default with php (libcurl being one of them). I didn't have a clue what to do, but because my dedicated server is running debian, i had to force myself to learn.

Anyway, back to the point. I already have php5 running (but it needs to be re-compiled) and i have downloaded libcurl. I used apt-get install php5-curl and that took care of it. The questions are:

To recompile do i need to remove the old installation of PHP before compiling it again to add the extensions?

Do i need enable the extensions like mysql and stuff or do they install as default if not specified, im guessing i would need to specify everything?

Im used to downloading a pre compiled package, running the installer and away we go, actually its MAMP on OSX. I remember in windows you could just add the extension in the .ini i later learned in OSX and Linux its not as easy.

View Replies!   View Related
Ffmpeg - Php
I had is running it on my php4.. I upgraded to php5 using easyapache but now its not working.. Its has the ffmpeg.So in the extenuion folder and php.ini has the extension folder and the extension defined.. Any solution

View Replies!   View Related
Php Imagecreatefrompng
I'm in the process of cloning a feature from a text based game. They have what you call userbars with info on them, but I can't figure out how they did it... I tried just using an iframe on the link to the userbar but its crappy. Then I tried using the iframe in the php imagecreatefrompng to create an image from it, but it doesnt read <font>'s <iframe>'s etc... only plain text. Now I know KNOW there using php imagecreatefrompng but I have NO clue how there processing the colors and custom stuff for names and stuff.

Here's my code.

Code:
<?php
require "global_func.php";
include "config.php";
global $_CONFIG;
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
if(isset($_GET['id']) AND ctype_digit($_GET['id'])) {
$id = mysql_escape(trim($_GET['id']));
}
else {echo" Invalid Action";}
if($id) {


$query = sprintf("select level, username,money from users where userid = %u",$id);
$result = mysql_query($query);

$data = mysql_fetch_array($result);
$info ="<iframe src='http://www.evilpirates.com/userbar.php?id=1'></iframe>";

// Create a 400x18 image
$im = imagecreatetruecolor(400, 18);
$image = imagecreatefrompng("images/isonline.png"); // Get a background for jpg it is imagecreatefromjpg()
imagealphablending($image, true); // setting alpha blending on ~~~ remove if not using png
imagesavealpha($image, true); // save alphablending setting (important) ~~~ remove if not using png
$black = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);

// Path to our ttf font file
$font_file = 'arial.ttf'; // Any type of TTF font can take place as it is defining it to an image.

imagefttext($image, 7, 0, 2, 10, $black, $font_file, $info);
// I S R L T C F TX
/*************************
I= Background image
S= Font Size
R= Right Border
L= Left Border
T= Top Border
C Font Color* Colour
F File to load eg.. arial.ttf
TX Text Info
*/
// Output image to the browser
header('Content-Type: image/png');

imagepng($image);
imagedestroy($image);
}
else{echo"<br /> die";}
?>
And here is the code to make the userbar.

Code:
<?
require "global_func.php";
//if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
//require "header.php";
//include "who.php";
include "config.php";
global $_CONFIG;
define("MONO_ON", 1);
require "class/class_db_{$_CONFIG['driver']}.php";
$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$result=$db->query("SELECT u.*,c.* FROM users u LEFT JOIN cities c ON u.location=c.cityid WHERE u.userid={$_GET['id']}");
$worked= $db->fetch_row($result);
$hpperc=(int) ($worked['hp']/$worked['maxhp']*100);

print "
<style>
#bar{
font-size: 12px;
font-family: 'Tahoma';
padding: 4px;
}
</style>
<table style='width: 100%;' height='10' id='bar'>
<tr>
<td bgcolor='black' style='border: 1px solid #1d4e80;'>".nameformat($worked['userid'])."</td>
<td bgcolor='black' style='border: 1px solid #1d4e80;'><font color=white>Lvl: {$worked['level']}</font></td>
<td bgcolor='black' style='border: 1px solid #1d4e80;'><font color=white>HP:</font> <font color=#00ff00>{$hpperc}%</font></td>
<td bgcolor='black' style='border: 1px solid #1d4e80;'><font color=white>{$worked['cityname']}</font></td>
</tr>
</table>";
?>

View Replies!   View Related
Zend And PHP
I currently have Suhosin/eAcc installed. Can I get Zend installed as well?

View Replies!   View Related
Nginx And Php
i dunno if any one here can help (im hoping some one can) but basically i have installed nginx onto a freebsd server, added 2 domains to this webserver.

the first domain works correctly and loads up all php files etc how ever the second domain wont.

its pretty confusing as both configs are the same, if i comment out the working config the non working one will work perfect.

i have uploaded a copy of the configs onto

www f1colo com / config.txt

View Replies!   View Related
How To Upgrade To PHP 6
I have a test VPS set-up, and I wish to upgrade to PHP 6 to test out my pre-existing websites (and make any necessary changes pro-actively).

Can anyone point me in the direction of how to upgrade it (and then configure Apache 2.2, MySQL 5 etc as needed)?

View Replies!   View Related
Server Can't Use/see What's After The .php
I just moved my oscommerce installation and now it seams like it can't see what's after the .php. If I write index.php I get to that page, but regardless of if I write anything after (or click on any link) I get to the same page. Please help, what do you think it could be?

The adress is [url]

The server is a linux server with HTTPD/MySQL installed.

View Replies!   View Related
PHP 5.2.8 Update
Did anyone have this problem when upgrade to PHP 5.2.8?

This is the error that i got when i upgrade from PHP 5.2.6 to 5.2.8.

"Failed loading C:PHP5ioncubeioncube_loader_win_5.2.dll PHP Warning: PHP Startup: Unable to load dynamic library './ext/php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './ext/php_msql.dll' - The specified module could not be found. in Unknown on line 0 "

I don't have Ioncube install and when i upgrade from PHP 5.2.5 to 5.2.6. I didn't have the above problem. Is Ioncube a included .dll in for the Windows package? How do i fix the above error? Is there any problem with PHP 5.2.8? Is it stable?

My server is Win2003 Standard/IIS6.

View Replies!   View Related
How To Allow PHP.ini
how I can allow customers to place a PHP.ini in certain directories to override some basic settings like "upload_max_filesize" and what not.

I have seen this done before but not sure how to get it working.

View Replies!   View Related
Why Do I Keep Getting Parking.php
i keep on getting parking.php on and off on my site.

i use www.name.com as registrar

and cirtexhosting.com for host.

who is causing this ?

View Replies!   View Related
Php 4 Faster Than 5
I've read that php 4 is faster than 5, is this true? I'm not sure which one I should use to host my invision powerboard. It's the only php/mysql site on the server.

View Replies!   View Related
LJHost.com And PHP
I have to switch hosts and have been doing research on the boards to find a good host.

I have decided on LJhost, but was wondering if anyone who uses them knows if their PHP is installed as the (normal) mod_PHP environment or do they have php installed as a CGI library?

View Replies!   View Related
PHP Extensions
We had our servers PHPsuexec enabled for both PHP 4 and 5. Clients using htaccess to enable PHP extensions are now not working.

I once read on a forum that you can make use of a custom PHP.INI in order for those extensions to work. How can we obtain or create a custom PHP.INI that we can use?

View Replies!   View Related
How To Upgrade To PHP 5
I have a linux VPS server.My trouble started when I bought a script that required me to install PHP5. Currently my server have 4.3.9.

Being a linux noob, it took me 2 days to install PHP 5 but now the problem is everything is still using PHP 4.3.9. When i do a phpinfo(); it shows php4.3.9.So, can someone please tell me how to tell the system to use PHP 5.

I used the exact same ./configure command as i see in the PHPINFO(); for PHP4.3.9 i.e

#'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd=shared' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses=shared' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-xml' '--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' '--with-kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mbstring=shared' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mime-magic=/usr/share/file/magic.mime' '--with-apxs2=/usr/sbin/apxs'

#make
#make install
Even the installed PHP seems not be working after the upgrade, when i type "php" i see this now:

# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/domxml.so' - /usr/lib/php4/domxml.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: UåWVSè?ò: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/ldap.so' - /usr/lib/php4/ldap.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mbstring.so' - /usr/lib/php4/mbstring.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: UåVSè
: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/odbc.so' - /usr/lib/php4/odbc.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/pgsql.so' - /usr/lib/php4/pgsql.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: UåVSèé): Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: UåSèÝ": Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP 5.2.5 (cli) (built: May 5 2008 23:38:38)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
[root@ip-68-178-166-214 php-5.2.5]# php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/domxml.so' - /usr/lib/php4/domxml.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: UåWVSè?ò: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/ldap.so' - /usr/lib/php4/ldap.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mbstring.so' - /usr/lib/php4/mbstring.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: UåVSè
: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/odbc.so' - /usr/lib/php4/odbc.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/pgsql.so' - /usr/lib/php4/pgsql.so: undefined symbol: empty_string in Unknown on line 0
PHP Warning: PHP Startup: UåVSèé): Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: UåSèÝ": Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0

View Replies!   View Related
.html Instead .php
I want my server looking and open index.html first and after index.php, I mean if have both index.html and index.php in a folder, the index.html will be open by default .

I know it name: DirectoryIndex directive ..

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