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


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





PHP Slow On Solaris


Does anybody knows why php runs so damm slow on solaris. PHP works fine, but if you use the array function it get really slow. everyone could try it on different platforms.

fill a array with 100.000 elements in a loop and you will see what i mean. debugger output shows that php ist trying to get memory for each element. --> anybody know how to tune this in solaris or php? Code:




View Complete Forum Thread with Replies

Related Forum Messages:
PHP 5 On Solaris 5.9
All seems to have installed OK but when I add the lines to Apache as below
it gives errors.

LoadModule php5_module libexec/libphp5.so
AddModule mod_php5.c


Syntax error on line 241 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp5.so into server: ld.so.1:
/usr/local/apache/bin/httpd: fatal: /usr/local/apache/libexec/libphp5.so:
open failed: No such file or directory
/usr/local/apache/bin/apachectl start: httpd could not be started

AND

Syntax error on line 247 of /usr/local/apache/conf/httpd.conf:
Cannot add module via name 'mod_php5.c': not in list of loaded modules
/usr/local/apache/bin/apachectl start: httpd could not be started


PHP seemed to install OK and I search for these modules but they cannot be
found. Apache is 1.3.27

View Replies !
Solaris IDE
im kicking around the idea of purchasing a sparc workstation because:

1) they are really cheap on ebay.
2) i always wanted to give one a shot.
3) they are really cheap on ebay.

Since i do php development, is there any decent IDE for php development out there that will run on sparc sunos?

anyone doing development on a sparc? I'm looking at something like a dual CPU sparc 1000 (dual 750's), and im also curious as to the performance compared to a windoz pc.

View Replies !
Compiling PHP On Solaris
Not sure if this is the best place to ask this,

I am trying to compile PHP 5.2 on a Solaris 9 system. I need Oracle DB
support so can't use the pre compiled packages on blastwave as I don't
think anyof them include Oracle.

The configure script is:
../configure --prefix=/usr/local/php-5.2.0
--with-apxs2=/usr/local/apache-2.0.55/bin/apxs
--with-mysql=/opt/sfw/mysql
--with-pear
--with-libxml-dir=/opt/csw/
--with-config-file-path=/etc/php5
--with-curl
--with-dom
--with-zlib
--with-oci8=instantclient,/usr/local/oracle/instantclient_10_2
--with-gd
--with-jpeg-dir=/usr/sfw/lib

And I get the error:
checking for the location of libjpeg... /usr/sfw/lib
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... no
checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... no
checking for floorf... no
configure: error: libjpeg.(a|so) not found.

BUT

[/usr/local/src/php-5.2.0]# ls /usr/sfw/lib
<snip>
libjpeg.so libjpeg.so.62

So why is it complaining? Does anyone know? I am puzzled why it bales
out after the "checking for floorf... no" line and not straight after
the libjpeg line 9 lines above.

I am using gnu gcc and ld.

View Replies !
Where Can I Get The Sun OS (Solaris) PHP Installation ?
Where can i get the installation files for Sun OS?

View Replies !
Trouble On Solaris 8
I'm installing Apache 2.2, PHP 5.04, and mySQL 4.0.21 on a Solaris 8
machine using prebuilt binaries from sunfreeware.com.

My apache install went smoothly - the only thing I'm having to work
around is an inability to use /usr/local - it's an NFS mount to a
central image, so I'm installing in /opt/local.

After installing PHP and modifying httpd.conf, I get the following
error on startup:

httpd: Syntax error on line 110 of /opt/local/apache2/conf/httpd.conf:
API module structure `php5_module' in file
/opt/local/apache2/modules/libphp5.so is garbled - perhaps this is not
an Apache module DSO?

Now, I have to confess that I don't have mysql installed yet, but I
would think that simply loading the php module wouldn't require this,
would it?

A search for this message shows one other user has seen it recently,
but no resolution online.

No hint in /var/apache/logs - no mention of php at all in any of the
logs.

Any clues as to what could be causing this?

View Replies !
With Java On Solaris
This is my system configuration

OS Sun Solaris SPARC 8
Apache version 1.3.26(Unix)
PHP version php-4.1.0
java version j2sdk1.4.2_14 for soalris

i am trying to build php with java support but when i try to configure it with follwing command:

./configure --with-apxs=/usr/apache/bin.paxs --with-java=/usr/j2se --with-config-file-path=/etc --with-openssl=/usr/local/ssl

then make
and then make install

everything goes well without any error. but at the end i dont find any php.ini file in /etc and if i copy it from the distribution of php and edit the file with java class path and library path tha php page using java class doesnt work. can anybody provide me detailed step on how to do java integration in php on solaris.

View Replies !
Installing PHP 5.2.1 On Solaris
I've been following the install guide on the PHP website and everything has gone fine up until where I'm stuck now. I've got Apache installed and running, and I've ran ./configure in the PHP directory with the necessary flags. However, the next step in the process listed in the guide is to do a make. BUt when I do that, this is what I get:
Code:

make: *** No targets specified and no makefile found. Stop.

There's nothing in the install guide that says I have to specify a makefile, and it isn't covered in the FAQ either.

View Replies !
SPARC And Solaris 10
I'm being moved from a windows platform to a Unix platform due to some corporate restructuring. I've been coding .asp pages and was about to move from .asp to .php on windows.

Can you tell me: i know that PHP runs on the platform SPARC and Solaris 10, but does it require Apache or can it run on the native Solaris web server?

View Replies !
'rsh' To Solaris 8
When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS' CMD window popped up and stayed there until CGI timeout. I had to kill the window by clicking on 'x'. After that it displayed CGI timeout error. What was going on? PHP script on Windows 2K:

<? php
/* Call a script on a remote unix box to display the name */
system <"rsh remoteunix -l thisuser "/mybin/test.sh $firstName
$lastName"">;
?>

Shell script on Unix box:

#!/bin/sh
firstName=$1
lastName=$2
echo Your name is: $firstName $lastName
exit 0

View Replies !
This Script Is Just A Wrapper For Php (solaris!)
Hi there.

Had a look around google and found one post from someone with almost the
same error and no reply.

SunOS webdb 5.8

I have been trying to install PHP to work with Apache and it all works fine
apart from trying to run php from bash.

../configure --with-sybase=/usr/local/freetds --with-tdsver=7.0 --with-apxs=/
usr/apache/bin/apxs --with-mysql=/opt/sfw/mysql --enable-sockets

All fine...

/opt/sfw/bin/gmake install

# echo $LD_RUN_PATH
/usr/local/ssl/lib:/opt/sfw/mysql/lib/mysql


This all works fine with PHP and Apache but when trying from bash I get the
error..

# /usr/local/bin/php
/usr/local/bin/php: error: /usr/local/bin/.libs/php does not exist
This script is just a wrapper for php.
See the libtool documentation for more information.


I tried a few more things without success and even tried creating `.libs`
incase it was a permission problem when it was compiling - still zilch.

View Replies !
Compiling Php 4.3.4 On Solaris 8 Mysql
Exact output is:
ld: fatal: file /opt/sfw/mysql/lib/mysql/.libs/libmysqlclient.so: open
failed: No such file or directory
ld: fatal: File processing errors. No output written to
..libs/libphp4.so

Again, why is it lokking for the MySQL client library in ".libs" ?

View Replies !
PHP On Solaris (2.6) And Integer Overflow
I have PHP version 4.4 installed on a Soaris 2.6 system and I'm getting
strange results doing math/boolean operators. I have a hashing
algorithm that does multiplication, bitwise operations and mod() calls
interatively on the characters of a filename. On a linux platform the
multiplications start to overflow (as I expect) and the overflow is
just dropped. The lower three bytes are masked off like this:

$result = $result & 0x00FFFFFF;

and the loop continues. On the Solaris platform the multiplication
fails very quickly in the loop, and it looks like the overflow bits are
wrapped around onto the lower order bytes, eventually I end up with an
interger value of 0x00FFFFFF because of the masking above. To solve the
problem I had to compile the gmp_* function support into PHP and work
with the gmp_* family of functions.

View Replies !
Install PHP On Solaris Sparc 2.6
Anyone who has instruction on how to install PHP, mysql, apache on Solaris Sparc 2.6 using DSO module, please let me know. I can make it work, but not with DSO.

View Replies !
PHP N Apache Installation On Solaris
Can anyone guide me how to install and configure PHP with Apache on Sun's Solaris 2.7
The details of my Solaris are as follows...

Sun Ultra 5/10
System v Release 4.0
Solaris 2.7
SunOS Release 5.7
Generic_106541_06

View Replies !
Connecting To Sql Server From Php (solaris)
I have be assigned to find a way to connect to a SQL server from PHP installed on Solaris 9. It would be very helpfull if someone could guide me on this or give me any useful links. I have read about connecting to sql server from PHP (unix) - will the same work for Solaris version.

View Replies !
Installation Problem (Solaris 8)
i want to compiled PHP 4.3.3 under Solaris 8.

My Configuration:
Solaris Version 5.8
gcc Version 3.2
PHP 4.3.3

The compile prozess stopped by the compiling
the "dns.c"

Volker

Here is my error log:

make
/bin/sh /export/home/vpn/src/phprojekt/php-4.3.3/libtool --silent
--preserve-dup-deps --mode=compile gcc -Iext/standard/
-I/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/ -DPHP_ATOM_INC
-I/export/home/vpn/src/phprojekt/php-4.3.3/include
-I/export/home/vpn/src/phprojekt/php-4.3.3/main
-I/export/home/vpn/src/phprojekt/php-4.3.3
-I/export/home/vpn/src/phprojekt/php-4.3.3/Zend
-I/export/home/vpn/src/phprojekt/mysql-standard-4.0.14-sun-solaris2.8-sparc/
include
-I/export/home/vpn/src/phprojekt/php-4.3.3/ext/xml/expat
-D_POSIX_PTHREAD_SEMANTICS -I/export/home/vpn/src/phprojekt/php-4.3.3/TSRM
-g -O2 -prefer-pic -c
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c -o
ext/standard/dns.lo
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c: In function
`zif_gethostbynamel':
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:186: warning:
passing arg 2 of `add_next_index_string' makes pointer from integer
without a cast
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c: In function
`php_gethostbyname':
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:206: warning:
passing arg 1 of `_estrdup' makes pointer from integer without a cast
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c: In function
`zif_checkdnsrr':
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:228: `T_MX'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:228: (Each
undeclared identifier is reported only once
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:228: for each
function it appears in.)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:239: `T_A'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:240: `T_NS'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:242: `T_PTR'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:243: `T_ANY'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:244: `T_SOA'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:245: `T_CNAME'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:256: `C_IN'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c: In function
`zif_getmxrr':
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:288: `HEADER'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:288: `hp'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:317: `C_IN'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:317: `T_MX'
undeclared (first use in this function)
/export/home/vpn/src/phprojekt/php-4.3.3/ext/standard/dns.c:324: parse
error before ')' token
make: *** [ext/standard/dns.lo] Error 1

View Replies !
Problems Compiling PHP 4.3 On Solaris 8
I'm having trouble compiling PHP 4.3.4 on Solaris 8. This is the error
message it is showing:

-- start --
Undefined first referenced
symbol in file
php_parse_date ext/standard/datetime.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `sapi/cli/php'
-- end --

The most common suggestiong I found while searching google was to
upgrade GCC from 2.95 to the latest. I upgraded both the GCC and the
libgcc packages and the error still continues. I also tried rolling back
to an earlier version (4.3.3) unsuccessfully.

View Replies !
Install Problem Of 5.2.4 On Solaris 8
when I try to ./configure ...

I get error about xml2-config is to old, and its pointing to a /usr/local/bin.

but I have libxml2 and xml2-config install in /opt/csw/bin

So how do I tell php ./configure to use the xml2-config thats in /opt/csw/bin?

View Replies !
Adding Negative Numbers On Solaris
I get an unexpected result when I add two negative numbers in PHP on
SPARC/Solaris 8. The same program works fine on Intel/Linux. I'm using
PHP 4.3.1 on both systems.

Here is my program, test.php.

<?php
$a = 0x81234567;
$b = 0xF0000002;
printx($a, $b);
printx($a, intval($b));
printx(intval($a), $b);
printx(intval($a), intval($b));

function printx($a, $b) {
$c = $a + $b;
printf("%08X (%u) %7s + %7s = %7s
", $c, $c,
gettype($a), gettype($b), gettype($c));
}
?>

I run it from the shell prompt like this:
php -f test.php

Output on Intel/Linux, PHP 4.3.1

71234569 (1898136937) double + double = double
71234569 (1898136937) double + integer = double
71234569 (1898136937) integer + double = double
71234569 (1898136937) integer + integer = double

This is the answer that I expect. I am adding two 32-bit integers, and the
value overflows.

Here is what happens when I run it on
SPARC/Solaris 8, PHP 4.3.1

FFFFFFFF (4294967295) double + double = double
71234569 (1898136937) double + integer = double
71234569 (1898136937) integer + double = double
80000000 (2147483648) integer + integer = double

When both arguments are negative doubles or both are
negative integers, then it gives the wrong answer.

What is causing this, and how do I avoid this strange behavior?

View Replies !
Can't Build Apache/PHP/MSSQL On Solaris
Having read everything I can, and compiled apache/php 30/40 times, I cannot seem to get a static version of PHP working with FreeTDS. I know the FreeTDS drivers for MSSQL are working, cos it took minutes to install the Perl Drivers.

However, the PHP drivers just will not work ! The BBs/Forums all seem to complain about exactly the same problem, and the only success stories are for Linux. Is this because PHP isn't supported as well as Perl ? Has anyone out there got PHP running on Sparc to talk to an MSSQL server ?

View Replies !
PHP 5.0.1, Solaris 5.9, Sablotron 1.0.2, Config Problems
Can run sabcmd with no problems.
But when running a simple php script, it cannot find the sablotron
functions. So it does not appear to be linking the Sablotron stuff.
Probably just something simple I am missing.

Built with:
configure --with-xml --with-expat=/usr/local --enable-xslt
--with-xslt-sablot=/usr/local

Simple PHP script:
<?php
$parser = xslt_create();
$html= xslt_process($parser, "test.xml", "test.xsl");
xslt_free($parser);

echo $html;
?>

Returns:
Fatal error: Call to undefined function xslt_create() in /tmp/xsl.php on
line 2

View Replies !
Xampp For Solaris X86, Need Zipped File
trying to get xampp....0.8.1.sh for
solaris 9 x86.
I only have access to the web via a windows box to download the .sh
file. Windows corrupts the file so can not get it to the unix box tied
up behind a firewall.

Can anyone do a gzipped version of the xampp file for me?

View Replies !
Installing Php With Curl On Solaris 8 Problem
I want to install php (4.1.2 4.2.1 4.3.1 whatever) on solaris 8 i gave up instaling curl 7.9 so i managed to install curl 7.8.1 from sunfreeware and then tried to install php ,i had to install a couple of packages like gd ,gdbm and etc and then i could pass the configure phase! but during make i got this error:

curl.c: In function `zm_startup_curl`:
curl.c:176: `CURLPOT_COOKIRJAR` undeclared (first use in this function)

<and a few similar errors>

on google i found a posting which said my curl version is low but i already have this version of curl and php running on linux ....any idea?

View Replies !
Decimal Parts On Solaris (PHP+ZendOptimizer)
I have problem with decimal parts on Solaris (PHP+ZendOptimizer). When I
get value from MySQL (or from text file - I have had the same), it is
loosing decimal parts.

For example, let say, that from MySQL I have $line[myvalue]=123.45
Then if I will do this: Code:

View Replies !
Compile PHP 5.x With Oracle 9i For Sparc Solaris
I've been scouring for information about this for quite some time now and so far I'm at a loss to the proper/correct way to compile PHP 5.x with Oracle 9i for Sparc Solaris. Does anyone have the straight dope on the definitive method?

View Replies !
Php Lacks Mbstring Extension On My Solaris 10 Sparc
I downloaded and installed php 5.1.6 from www.sunfreeware.com but it
lacks both the php_mbstring.so extension and php_gd2.so extension.

How can I enable those extensions? Where do I download them?
Or do I have to download php source code and recompile all php?

View Replies !
SunONE 6.1 / 4.3.8 / Solaris 8 -> _db_return_ Errors In Log Files
we have a server which has lots of errors of this type:

[09/Nov/2004:15:19:21] info (25982): CORE3261: Crash occurred in NSAPI SAF
php4_execute
[09/Nov/2004:15:19:21] info (25982): CORE3262: Crash occurred in function
_db_return_ from module /sunone/bin/libphp4.so
[09/Nov/2004:15:19:21] failure ( 1091): CORE3107: Child process closed admin
channel

We are running SunONE 6.1 (formely iPlanet) on a Solaris 8 server with PHP
4.3.8 (but this problem was appearing from 4.3.3). We can't seem to find a
pattern to make these lines appear in the logs..

View Replies !
Solaris 9: Can't Build Libjpeg Shared Object
I realize this is the php group, but I have a question that recurses back to my php install.

My objective is a pure 64 bit shared object installation of php 5.0 on UltraSparc Solaris 9 compiled with the Sun Compiler version 8.

My problem is that EVERYTHING builds great EXCEPT that the 6b distribution of JPEG will NOT build a shared object, thus gd cannot include support for JPEG, thus php loses that functionality.

** Configuration summary for gd 2.0.28:

Support for PNG library: yes
Support for JPEG library: no
Support for Freetype 2.x library: yes
Support for Xpm library: yes
Support for pthreads: yes

Yes, I've seen the install.doc from jpeg-6b:

"* If you want to build libjpeg as a shared library, say
./configure --enable-shared"

Here's that output:

1 [gis 9] ~/jpeg-6b > ./configure --enable-shared
2 checking for gcc... /opt/SUNWspro/bin/cc
3 checking whether the C compiler (/opt/SUNWspro/bin/cc -fast
-xarch=v9a -xO5 ) works... yes
4 checking whether the C compiler (/opt/SUNWspro/bin/cc -fast
-xarch=v9a -xO5 ) is a cross-compiler... no
5 checking whether we are using GNU C... no
6 checking how to run the C preprocessor... /opt/SUNWspro/bin/cc
-E
7 checking for function prototypes... yes
8 checking for stddef.h... yes
9 checking for stdlib.h... yes
10 checking for string.h... yes
11 checking for size_t... yes
12 checking for type unsigned char... yes
13 checking for type unsigned short... yes
14 checking for type void... yes
15 checking for working const... yes
16 checking for inline... inline
17 checking for broken incomplete types... ok
18 checking for short external names... ok
19 checking to see if char is signed... yes
20 checking to see if right shift is signed... yes
21 checking to see if fopen accepts b spec... yes
22 checking for a BSD compatible install...
/usr/local/bin/install -c
23 checking for ranlib... ranlib
24 LTSHARED is yes
25 ------------> I am using libtool in /usr/local/bin/libtool
26 checking host system type... sparc-sun-solaris2.9
27 checking for ranlib... ranlib
28 checking whether we are using GNU C... no
29 checking for /opt/SUNWspro/bin/cc option to produce PIC...
-KPIC
30 checking if /opt/SUNWspro/bin/cc PIC flag -KPIC works... no
31 checking if /opt/SUNWspro/bin/cc static flag -Bstatic works...
none
32 checking whether ln -s works... yes
33 checking for non-GNU ld... /usr/ccs/bin/ld
34 checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
35 checking whether the linker (/usr/ccs/bin/ld) supports shared
libraries... yes
36 checking for BSD-compatible nm... /usr/ccs/bin/nm -p
37 checking command to parse /usr/ccs/bin/nm -p output... yes
38 checking how to hardcode library paths into programs...
immediate
39 checking for /usr/ccs/bin/ld option to reload object files...
-r
40 checking dynamic linker characteristics... solaris2.9 ld.so
41 checking if libtool supports shared libraries... no
42 checking whether to build shared libraries... no
43 checking whether to build static libraries... yes
44 checking for objdir... .libs
45 creating libtool
46 checking libjpeg version number... 62
47 creating ./config.status
48 creating Makefile
49 creating jconfig.h
50 jconfig.h is unchanged
51 [03:35 - 0.21]

As you can see from line 41 above, configure is convinced libtool cannot support shared libraries. I modified the configure script to output the location of the libtool being used (line 25) and the value of LTSHARED (line 24).

Has ANYONE out there successfully milked out a shared object from the 6b distribution of libjpeg ?? This is the only thing holding up my build.

View Replies !
Solaris/Apache, Child Pid 3383 Exit Signal Segmentation
I cant get php to work on soalaris 8

when I start apache:

[Mon Mar 8 11:39:59 2004] [notice] Apache/1.3.27 (Unix) PHP/4.3.2
configured -- resuming normal operations

but when I got to my test.php page:

which is <?php phpinfo(); ?>

Then I get a page cannot be displayed page.

then in the apache error logs:

Mon Mar 8 11:40:32 2004] [notice] child pid 3383 exit signal Segmentation
Fault (11)
[Mon Mar 8 11:40:32 2004] [notice] child pid 3382 exit signal Segmentation
Fault (11)
[Mon Mar 8 11:41:31 2004] [notice] child pid 3384 exit signal Segmentation
Fault (11)

What do I need to do?

I installed the SFWmphp package from soalris 9 which I installed on solaris 8.

View Replies !
Slow Down
I have written this script, which connects to a mysql data base.. and receives results from it..but for some reason, it has become very slow when loading... any ideas on how to pin point why such things happen?

View Replies !
Slow PHP On IIS 6
I have PHP 4.3.1 running under IIS 6, when i access my website PHP is
verly slow
but when i access my website on my server using
http://localhost/mysite/ php is very fast.

View Replies !
PHP 5 - XSL Slow?
I've just installed PHP 5 under Fedora Core 2 and I've been having
speed problems with xsl and the dom functions. Previously I used
the sablotron extension functions under PHP 4 with script execution
times of under 5 seconds ( max of 0,2M xml files, with a fair
number of xsl:key statements). Under PHP 5 execution times almost
seem random and never seem to use the full system resources
(memory-limit wasn't included as a compile option) -- script
execution times are often ten times longer that under PHP 4. Has
anybody else encountered problems with these functions and/or is
there a way to tell PHP to stop pussy-footing around and use the
system resources available to it (this isn't a shared environment)?

View Replies !
Cli Seems Very Slow
Anyone else have this issue? Even if I write a simple hello world! script with a shebang and run it, there seems to be a half a second or so delay before I get my response. Code:

View Replies !
Slow Code. Could I Do This Better?
I have a page that serves as a calendar for an object.
On this page theres a section that automaticaly generats every day in the selected year, in a month by month fassion.

What I'm trying to acomplish is to set bgcolor to green if the object is vacant, and red if not.

I get this to work, but it's paintaking slow the way I do it.
wich is: PHP Code:

View Replies !
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?

View Replies !
Slow Loading
I recently moved to a new server. I've noticed that index.php (first page anyone sees) is extremely slow to load. On the old server it loaded fast. The servers have the same specs. What could the issue be?

View Replies !
File() Too Slow
I am trying to process a CSV file but am having trouble with my hosts
maximum execution time of 30 seconds.

This is how the script works at the moment.
User uploads their CSV file
The script goes through the file() and writes smaller chunk files.
The script then goes through processing the smaller files, populating the
database, deleting the processed file and refreshing itself, thus starting
again.

This system works for files up to 15000 rows, but I need to be able to
process larger files.

The bottleneck is with the initial splitting, since I use the file()
function to read the entire uploaded file.

Does anyone know a quicker way to split a file into smaller chunks.

View Replies !
PHP And Ajax - Very Very Slow
PHP and Ajax - very very slow

How do you people use PHP with Ajax?

I have been using this code, but there must be something wrong because
it takes too long to get the answer from the server. I really need,
somehow, to check if the IE version is 5.

The main point is: where there more than 500 people connected to the DB
it becomes really slow.

Ajax code:
var agt = navigator.userAgent.toLowerCase();
var isIe = (agt.indexOf('msie') != -1);
var isIe5 = (agt.indexOf('msie 5') != -1);
var uniqueCounter = (new Date).getTime();

function createXmlHttpReq(handler) {
if (isIe) {
var control = (isIe5) ? "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP";
try {
xmlhttp = new ActiveXObject(control);
xmlhttp.onreadystatechange = handler;
} catch (e) {}
} else {
xmlhttp = new XMLHttpRequest();
xmlhttp.onload = handler;
xmlhttp.onerror = handler;
}
return xmlhttp;
}

function xmlHttpGET(xmlhttp, url) {
xmlhttp.open('GET', url, true);
xmlhttp.send(null);
}

function xmlHttpPOST(xmlhttp, url, arg) {
xmlhttp.open('POST', url, true);
xmlhttp.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-Length", arg.length);
xmlhttp.setRequestHeader('Connection','close');
xmlhttp.send(arg);
}

function sendRequestGET(url) {
xmlhttp = createXmlHttpReq(function() {});
xmlHttpGET(xmlhttp, url);
}

function sendRequestPOST(url, arg) {
xmlhttp = createXmlHttpReq(function() {});
xmlHttpPOST(xmlhttp, url, arg);
}
========================================================================
My JavaScript in .php file (example):
...
function GetPerfilIndividual(id){
var arg = 'SOMETHING=1&SOME_ID=4343";
var xmlhttp = createXmlHttpReq(function() {
if(xmlhttp.readyState == 4) {
if(xmlhttp.status == 200) {
document.getElementById("DIV_DEST").innerHTML =
xmlhttp.responseText;
} else {
document.getElementById("DIV_DEST").innerHTML = "<font
color='red'>"+xmlhttp.status+" - "+xmlhttp.statusText+"</font>";
}
}
});
xmlHttpPOST(xmlhttp, 'my_php_file.php', arg);
}
...

my_php_file.php
- Access the database
- make about 8 SELECTs
- create some TABLEs
- closes database
- return

View Replies !
Php::xml_parse Really Really Slow
I have a website that is generated on the fly from XML templates. I've
been having some performance issues (pages taking 6 seconds or more to
be generated) and profiled the php code. (This is an embedded system
with a slow CPU.)

It turns out that php::xml_parse is very, very slow. My XML stuff isn't
that complex, but only 4 calls to xml_parse account for 1/2 of the time
it takes to generate the page.

Anyone know of a way to improve XML performance? I don't need ereg/preg
support, or anyting like that, but I have to get the xml_parser to run
faster....
This is my configure script:

../configure
--host=arm-linux
--target=arm-linux
--build=i686-pc-linux-gnu
--with-zlib-dir=$ROOTDIR/$PLATFORM/lib
--with-ming=$ROOTDIR/../src/ming-0.3.0
--disable-all
--enable-session
--enable-xml
--enable-sockets
--enable-fastcgi
--enable-ming
--enable-xdebug
--enable-force-cgi-redirect
--with-config-file-path=/etc
--prefix=/
--exec-prefix=/bin

View Replies !
Why Is This Script So Slow?
This script runs fine, but I'd like to know why it's so slow.. Thanks
for any help out there on how i can make it faster (it might take up
to 5 min to write these 3 export files whith 15 records each!!!)

====================
<style>
body, table, tr, td {
font-family: 'verdana'
font-size: 12px;
}
td.header {
font-weight: bold;
background-color: #cccccc;
}
</style>
</head>
<body>
<br><br><br><br><center>Creating Export Files<br><br>Please be
patient.</center><br><Center>
<?
flush();
$db = mysql_connect("localhost", "stickerguy", "PASWORDHERE!");
mysql_select_db("stickerguy",$db);

// Create contact.tab which is a tab delimated list of customer
numbers names, address, email
// order write old file

// Open contact.tab
$file_name = "/home/biz/stickerguy/WWW/stickerguyadmin/contact.tab";
$logfile = fopen($file_name, "w+") or die("Couldn't create new
file");
echo "<br>contact.tab ";
flush();

// Get all customer numbers
$results = mysql_query("SELECT DISTINCT custnumber.ID AS
customer_number, orders.custid FROM orders, custnumber WHERE
orders.custid = custnumber.scratch AND imported = 0 AND (STATUS =
'payment received' OR STATUS = 'paypal billing complete') ORDER BY
custnumber.ID", $db);

while ($custnumber = mysql_fetch_array($results)) {

$results2 = mysql_query("SELECT * from customer where custid =
".$custnumber["custid"]);
$customer = mysql_fetch_array($results2);

fwrite($logfile, $custnumber["customer_number"]." ".$customer["name"]." ".$customer["company"]." ".$customer["address"]." ".$customer["state"]." ".$customer["zip"]." ".$customer["email"]."
");

echo ".";
flush();

}
fclose($logfile);

// Create phone.tab which is a tab delimated list of customer numbers
and phone numbers
// over write old file

// Open phone.tab
$file_name = "/home/biz/stickerguy/WWW/stickerguyadmin/phone.tab";
$logfile = fopen($file_name, "w+") or die("Couldn't create new
file");

echo "<br>phone.tab .";
flush();

// Get all customer numbers
$results = mysql_query("SELECT DISTINCT custnumber.ID AS
customer_number, orders.custid FROM orders, custnumber WHERE
orders.custid = custnumber.scratch AND imported = 0 AND (STATUS =
'payment received' OR STATUS = 'paypal billing complete') ORDER BY
custnumber.ID", $db);

while ($custnumber = mysql_fetch_array($results)) {

$results2 = mysql_query("SELECT * from customer where custid =
".$custnumber["custid"]);
$customer = mysql_fetch_array($results2);

if ($customer["phone"] != "") {
fwrite($logfile,
$custnumber["customer_number"]." ".$customer["phone"]." HOME
");
}
if ($customer["fax"] != "") {
fwrite($logfile,
$custnumber["customer_number"]." ".$customer["fax"]." FAX
");
}

echo ".";
flush();

}
fclose($logfile);

// Create order list HTML file

// Open orderlist.html
$file_name = "/home/biz/stickerguy/WWW/stickerguyadmin/orderlist.html";
$logfile = fopen($file_name, "w+") or die("Couldn't create new
file");

echo "<br>orderlist.html .";
flush();

fwrite($logfile, "<html>
<head>
<title>Order List</title>
");
fwrite($logfile, "<style>
");
fwrite($logfile, "td {font-family: Verdana; font-size: 10px;}
");
fwrite($logfile, "td.leftbox { font-family: Verdana; font-size:
10px; background-color: #E8E8E8; }
");
fwrite($logfile, "td.box1 { font-family: Verdana; font-size: 10px;
background-color: #CCCCCC }
");
fwrite($logfile, "td.box2 { font-family: Verdana; font-size: 10px;
background-color: #EEEEEE; }
");
fwrite($logfile, "</style></head><body>
");

// Get list of all needed customer numbers for order list
$results = mysql_query("SELECT DISTINCT custnumber.ID AS
customer_number, custnumber.grandtotal, orders.custid FROM orders,
custnumber WHERE orders.custid = custnumber.scratch AND imported = 0
AND (STATUS = 'payment received' OR STATUS = 'paypal billing
complete') ORDER BY custnumber.ID", $db);

// Loop thru customer number building table each time
while ($custnumber = mysql_fetch_array($results)) {

$results2 = mysql_query("SELECT * from customer where custid =
".$custnumber["custid"]);
$customer = mysql_fetch_array($results2);

$results3 = mysql_query("select * from orders where custid =
".$custnumber["custid"]);
$order = mysql_fetch_array($results3);

fwrite($logfile, "<table cellspacing=2 cellpadding=2 width=750
height=185 border=0>
");
fwrite($logfile, "<tr>");

fwrite($logfile, "<td rowspan=3 class=leftbox
valign=top><b>Customer
#".$custnumber["customer_number"]."</b><br><br>".$order["orderdate"]."<BR><BR>".$customer["name"]."<br>".$customer["address"]."<br>".$customer["city"].",
".$customer["state"]."<BR>".$customer["zip"]."<BR><BR>".$customer["email"]."<BR>ph:
".$customer["phone"]."<br>fx: ".$customer["fax"]."</td>
");

fwrite($logfile, "<td class=box1>
");

fwrite($logfile, "<table cellpadding=2 border=0 width=100%>
");

fwrite($logfile, "<tr>
");
fwrite($logfile, "<td><b>Payment Method:</b></td>
");
if ($order["status"] == "paypal billing complete") {
fwrite($logfile, "<td>Pay Pal</td>
");
}
if ($order["status"] == "payment received") {
fwrite($logfile, "<td>Check/Mail</td>
");
}
fwrite($logfile, "<td><b>Payment Amount:</b></td>
");
fwrite($logfile, "<td>$".$custnumber["grandtotal"]."</td>
");
fwrite($logfile, "</tr>
");

fwrite($logfile, "<tr>
");
fwrite($logfile, "<td><b>Requested Deadline:</b></td>
");
fwrite($logfile, "<td colspan=3>".$order["deadline"]."</td>
");
fwrite($logfile, "</tr>
");

fwrite($logfile, "</table>
");

fwrite($logfile, "</td>
");

fwrite($logfile, "<tr><td class=box2>
");

fwrite($logfile, "<table cellpadding=2 border=0 width=100%>
");

$results4 = mysql_query("select * from orders where custid =
".$custnumber["custid"]);
while($orders = mysql_fetch_array($results4)) {

fwrite($logfile, "<tr>
");
fwrite($logfile, "<td><b>".$orders["project"]."</b></td>
");
fwrite($logfile, "<td>".$orders["quantity"]."
".$orders["ordertype"]." ".$orders["size"]."</td>
");
fwrite($logfile, "<td>
");
if ($orders["vinyl"] != "") {
fwrite($logfile, "Vinyl: ".$orders["vinyl"] . " "); }
if ($orders["color1"] != "") {
fwrite($logfile, "Color1: ".$orders["color1"] . " "); }
if ($orders["color2"] != "") {
fwrite($logfile, "Color2: ".$orders["color2"] . " "); }
if ($orders["color3"] != "") {
fwrite($logfile, "Color3: ".$orders["color3"] . " "); }
if ($orders["color4"] != "") {
fwrite($logfile, "Color4: ".$orders["color4"] . " "); }
fwrite($logfile, "</td>
");
fwrite($logfile, "<td>Artwork ".$orders["os"]."
".$orders["software"] . " " . $orders["filename"] . "</td>
");
fwrite($logfile, "</tr>
");
}
mysql_query("update orders set imported = 1 where custid =
".$custnumber["custid"]);

fwrite($logfile, "</table>
");

fwrite($logfile, "</td></tr>
");

fwrite($logfile, "<Tr><td class=box1>" . $customer["notes"] .
"</td></tr>
");
fwrite($logfile, "</table>
");

fwrite($logfile, "<hr color=black width=750>
");

echo ".";
flush();

}

fwrite($logfile, "</body></html>");

// Output links to each of the above 3 files.
?>
</center>
<Br><br>
<center>
<a target="new" href="contact.tab">contact.tab</a><br>
<a target="new" href="phone.tab">phone.tab</a><br>
<a target="new" href="orderlist.html">orderlist.html</a><br>
<Br><br>
Right click the above links and click "save as" or "save target as" to
save the files. <Br><Br>
Orders have been marked as processed.

</center>
</body>
</html>

View Replies !
PHP Slow To Execute
I have some PHP pages at.. which is exhibiting
some strange slowness. It is hosted by secureserver.net (bad?).

When I time how long it takes to load the main web page from the
server
it averages 7 seconds, but often goes to 15.

When I store the main page on my hard drive, the load time is 1
second.

I've tried removing PHP code that might slow things down
but that only brings the load time down to 5.5 seconds best case.

I have other PHP pages on the same server that seem to execute
faster. The key difference between the slow main page and the faster
pages is the faster pages do not use "include" to execute code in
other
PHP files.

However with out "include" and the modularity it affords, my PHP code
would be harder to maintain. What to do?

View Replies !
MSSQL Slow On IIS 6
I built a PHP website on Windows 2000 (using IIS) that connects to a
SQL Server 2000 database using the mssql functions. I migrated the
website and the database onto a Windows 2003 machine, and now the mssql
functions are significantly slower. On the Windows 2000 machine, the
mssql_connect takes .03 seconds to run, and the odbc_connect takes the
same amount of time. On Windows 2003, the mssql_connect takes a full
second to run, but odbc_connect only takes .017 seconds. I have tried
both ISAPI and CGI for the php configuration in IIS, and I have
experimented with different values for the output_buffering parameter
in php.ini, but neither of these seem to make a difference. Why would
the mssql commands be so much slower on IIS 6? I would rather not have
to change all the database calls to be odbc instead of mssql

View Replies !
Is_null Very Slow
I recently loaded a binary copy (5.0.3) onto my PC
running win2k and Apache 2.0.52.
It seems to work fine except that it is very slow running the function
is_null e.g. the dummy program below -
<?php
for($i=0; $i<1000; $i++) {
if(is_null($x)) $y=0;
}
echo 'done'
?>

View Replies !
Website Too Slow
I'm re-programming my Website (www.coaster.ch) in PHP and I find it too
slow (although I have ADSL).
That's more or less how it functions:
Here my tables:
'COASTERS' (code of coaster, code of country, etc...)
'COUNTRIES' (code of country, names of countries in different
languages, code of continent)
'CONTINENTS' (code of continent, names of continents in different
languages)

In my index.php (start site) I use a "while":
I look for the first continent.
I look for the first country
I count all the coasters from 1st country
echo country - number of coasters
I look for the second country
I count all the coasters from 2nd country
....
....
I look for last continent....

The search and presentation in tables (I use 5 tables, 1 for each
continent) is rapid.
The problem is when I go the the sub-site of a country and want to come
back to the index site: it takes too much time.
Could it be that it is slow because it has to make the whole search
again?
Can I solve that by making the first search (at the begin of the
session with something like requireOnce "search data) and charge all
the information in an array and them when returning from a sub site
only showing the array?
I also thought that perhaps the reason could be that I use tables for
continents and countries but otherwise I should have to include all
these texts in .inc files...


View Replies !
Fread Is Slow, Is There A Better Way?
I have been trying to stream a 19mb quicktime file through PHP. While this script does work i find it to be really slow. Is there any way i can make it faster? I have tried using fpassthru and using a smaller buffer and neither seemed to have much effect. Code:

View Replies !
Getimagesize Too Slow
getimagesize function work so slow, is there a fast way to get the image size ?

View Replies !
Slow Mail()
I have a script with a mail() command to send an email to myself to inform user's ip and referrer. I've been using it without any problems for the last three years. Big changes I had to make in many scripts when I turned register_globals off. After this, access to that page (script) is very slow (1-2 minutes) unless I comment mail() out. I cannot figure out what should I set to fix it ....

View Replies !
Apache2 W2K Slow
I do PHP programming on a Windows 98 computer, (why 98 - well I want to run VBDOS on this computer). I then transfer PHP files to a W2K computer. I recently moved to Apache2 and PHP 4.3.11 (from 4.1.3). One page in particular has some fairly intensive work to do, accessing MySQL a lot and creating two large tables. This page takes 2 1/2 times longer to load on the W2K server than the W98 server.

I have done timings for various parts of the page using mictotime. All parts are slower on W2K. Both servers are using the same PHP.INI file. Globals has to be on as some of the programs still need it, not yet converted. Anyone has similar experience?

View Replies !
Fsockopen Slow
I'm having an issue with speed at the moment. Basically I have a database with a list of websites on it. I only want to display the sites that are actually 'live'. I've used fsockopen and it does work. Only problem is it takes quite a while.

I seem to be waiting at least 10 seconds for it to tell me the site is not responding. It is very quick when the site does exist though. I've played with the optional timeout from fsockopen but I see no difference. Any suggestions? Is there another faster way to check a site is online using php?

View Replies !
Gethostbyname Slow
using the gethostbyname function seems to noticeably slow down pages. some of the comments in php.net's gethostbyname entry suggest using a version that caches the result, but those versions also only speedup subsequent calls to gethostbyname - the first call is still as slow as ever. so is there anything i can do to speed this up? perhapes i can just implement a function equivalent to gethostbyname using fsockopen, or something?

View Replies !
Database Slow
A reporting script is run from the command line that takes about 45 minutes to run against the production database. Towards the end of run of the script, the database becomes heavily loaded and starts to affect other applications using that databaes.

How to approch debugging that script?

View Replies !
PHP Running Way To Slow T_T
About an hour ago my pages were taking around 0.01 seconds to load. Now those same pages are taking like 5.00 seconds to load. CPU usage is 1%

Why are they going so slow all of a sudden? Even pages that I have not edited at all whatsoever in any way are suddenly slow as poop when they used to be loading instantly an hour ago! Code:

View Replies !

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