PHP4 - Zlib Functions Not Working
I had to update my server configuration consisting of Apache2 and PHP4. I
now have installed:
apache2/apache2-prefork 2.0.54-2.1
apache-mod_php4/php4-zlib/php4 4.3.11-0.3.1
"Regular" PHP scripts work just fine, but the websvn script is acting up -
after selecting a repository the page just "hangs", i.e. the browser waits
"forever" for a response. If that happens there is no error message in the
server log and it looks like the thread just gets stuck and never returns.
Using Gubed I tracked it down to the zlib functions, i.e. whenever the
script calls a line like
$output = transArray(gzfile($cachedname));
it hangs there and I can't get control over it anymore. Does anybody have
some insight whether I miss anything or tips how i can track this down
further?
View Complete Forum Thread with Replies
Related Forum Messages:
Functions In Php4.3 Different Than 4.2?
i upload a website in php that includes files where some functions are defined. it's workin on my local box but on the remote machine the functions are not recognized. so what i get is ...unknown function blahblah in line...? on my box php4.2 i guess on the remote machine 4.3 .
View Replies !
PHP4 Functions In PHP3
An error in my configuration-file (probably) in PHP4 installed by EasyPHP makes it neccesary to use PHP3 local. And therefore, some functions are unavailable. Who knows a proper function for array_shift and in_array? Somebody gave me something, but it doesn't seem to work very good: <? function in_array($needle,$haystack) {for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++); return ($i!=count($haystack));} function array_shift($array) { $value_from_beginning=$array[0]; for($i=0;$array[$i];$i++) { $array[$i]=$array[$i+1]; } unset( $array[$i] ); return($value_from_beginning); }?>
View Replies !
[PHP4.3] Are Not-used Functions Compiled By PHP?
[concerning PHP4.3] I have an includefile that I (ahum) include in many scripts. It contains only functions I need now and then. Now I was wondering how things work behind the scenes. Is the whole file loaded and compiled/interpreted every time a php-file is used that includes this file? That would be an unwanted extra load for my server. If so, I should consider splitting up that file in some smaller files, but that is of course extra overhead for me. I have no idea how this works. Can anybody enlighten me?
View Replies !
PHP4 Network Functions
I'm pretty sure that this problem has nothing to do with PHP and a whole lot to do with my server config, but I've got no idea where to start. On my server I can't get any of the network functions to work, eg getmxrr() returns an empty array whereas on another server it will return a populated array. Sendmail functions perfectly and I can ping the remote machines, so it's not a problem with iptables stopping outgoing traffic, or with named. Is anyone able to send me in the right direction ?
View Replies !
PHP3 Or PHP4 Tag Not Working
I am setting up my own Apache web server. I downloaded PHP4 but the only php tag that works is .php and not .php3 or .php4. Is this something in the Apache conf file?
View Replies !
MySQL_connect() Working In PHP4 Not In PHP5?
I upgraded my development machine to PHP5. My pages with the subject function no longer work. I am able to do an ODBC connect to the data files from other programs. I get the error: Fatal error: Call to undefined function mysql_connect() in <file.php> on line 190. This is a W2K machine running IIS4, if that makes a difference... Still works on server running PHP4.
View Replies !
Php4+apache1.3+xp With Sessions Not Working...
I seem to have a major problem with sessions on my setup. No simple example seems to work. Example below: page1.php: <?php // page1.php session_start(); echo 'Welcome to page #1' $_SESSION['favcolor'] = 'green' $_SESSION['animal'] = 'cat' $_SESSION['time'] = time(); // Works if session cookie was accepted echo '<br /><a href="page2.php">page 2</a>' // Or maybe pass along the session id, if needed echo '<br /><a href="page2.php?' . SID . '">page 2</a>' ?> Page2.php: <?php // page2.php session_start(); echo 'Welcome to page #2<br />' echo $_SESSION['favcolor']; // green echo $_SESSION['animal']; // cat echo date('Y m d H:i:s', $_SESSION['time']); // You may want to use SID here, like we did in page1.php echo '<br /><a href="page1.php">page 1</a>' ?> Output after pressing page2 link: Welcome to page #2 1970 01 01 00:00:00 page 1
View Replies !
Ftp_connect() Stopped Working (PHP4.4.2/FC2)
I run puppyfiles.us, and I've been using php on the site for some time. Today, I noticed that my coding isn't working any more. Specifically, I'm getting the following error: Fatal error: Call to undefined function: ftp_connect() in /var/www/vhosts/puppyfiles.us/httpdocs/.VERSIONS on line 25 The offending code in .VERSIONS (an included file) is: $ftp_server = "puppyfiles.us"; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, "anonymous", "puppyfiles"); if ((!$conn_id) || (!$login_result)) { die("FTP connection has failed !"); }
View Replies !
ID3 Functions Not Working
I am trying to use the ID3 functions in PHP - id3_get_tag() in particular - but it tells me its undefined. If I check the phpinfo page it says under ID3´s enabled column the following: v1.0, v1.1, v2.2+ (partly) I have put the php_id3.dll in the extension directory and the php.ini file has a reference to this extension....
View Replies !
PKCS7 Functions Not Working ?
I would like to know if anyone has successfully used the functions openssl_pkcs7_sign, _encrypt, _decrypt, ... ? I don't manage to use them, the samples on php.net are buggy, and the "corrected" samples provided by users don't work either ! :-( For example, when I try this sample code : (...) // encrypt it if (openssl_pkcs7_encrypt($clearfile,$encfile, $key, array("To" => "you@yourdomain.com", // keyed syntax "From" => "HQ <hq@cia.com>", // indexed syntax "Subject" => "Eyes only"))) { // message encrypted - send it! exec(ini_get("sendmail_path") . " < $encfile"); }; (...) I always got a parse error on the line containing "array('To"=> ..." . I got the same kind of error with the different samples files, even with pkcs7_decrypt, _sign, ... So, can anyone provide me a functionnal code ? I precise I tried with PHP 4.2.2 and PHP 4.3.4 under Suse Linux Pro 9.0 and Suse Enterprise Server 8.2
View Replies !
Exif Functions Not Working
I am teaching myself PHP and getting along reasonable well, but have hit a brick wall with exif functions. The functions don't seem to be recognised: undefined function: exif_read_data() I gather php varies from build to build, so I am using php4.3.1, will this have an effect?
View Replies !
Session Functions Not Working With Windows XP, Php 4.3.4
i have two simple pages, test.php and test2.php test.php contains: <?php session_start(); $_SESSION['test']="blah"; ?> and test2.php contains: <?php session_start(); print $_SESSION['test']; ?> in the php.ini file, my session save path is set to /tmp. i dont even know where to look for the tmp folder. also, when i go to test2.php after accessing test.php, the page is blank and it doesnt print "blah". as i mentioned in the title, im using windows xp (home edition) with PHP 4.3.4 and apache 1.3
View Replies !
Php5 Functions Definitions Are Not Working According To Spec (?)
Program (PHP5): <?php $a='x' $b=5; foo($a,$b); echo "a=$a b=$b"; function foo($x,$y){ $x='y' $y=56; } ?> According to the php5 manual, function arguments are, by default, passed by reference. Therefore, the echo should display: a=y b=56 but, instead it displays: a=x b=5 I can get everything to work by specifying the following function definition: function foo(&$x,&$y) but I would think that if "by reference" is the default for arguments, then "by reference" should be the default for a function parameters. What's wrong with my logic?
View Replies !
Zlib
really goofy page load on initial "home page" load, after deleting all cached temp files and rebooting computer to test clean load - page takes over 2 minutes to load subsequent page loads form that slow loading page are in a blink of an eye. at the top of my php file i have this: <?php ini_set('zlib.output_compression_level', 3); ob_start('ob_gzhandler'); subsequent page loads sometimes do not load all images. suggestions?
View Replies !
Compression Without Zlib
My host doesn't provide zlib ext. to php. Is there another possibility for making compressed files on the server, which i can send in a mail() script for instance.
View Replies !
Copy Of Zlib File
I goofed up my linux beater box at home and I need to reinstall. It seems that zlib is located at http://www.zlib.net, but that site isn't working. I was wondering if someone has a recent release they could e-mail.
View Replies !
Zlib Output Compression
I'm reading on gzip stuff and notice the compression levels of 0 to 9 but the default for a few servers I've seen is -1 and I can't seem to find what this means. The compression works(page is noticeably smaller) using ob_gzhandler which I read is based on the compression level set for zlib.output_compression_level (the setting which is -1) What does -1 mean?
View Replies !
Zlib Vs. Mod_gzip Vs. Gzhandler
I currently use <?php ob_start ("ob_gzhandler");?> at the top of all of my php pages. I've learned a better solution would be to move to something like mod_gzip or zlib (http://us2.php.net/zlib); is this right? Some questions: 1.) If all my pages are php, I'm sensing that zlib would be the better solution? What exactly is the benefit to using zlib vs. gzhandler? 2.) Regarding installation of zlib; I'm assuming this is something I can ask my hosting company to do (I use a managed dedicated server). I've read that I should also manually go back and remove the gzhandler line of code on top of all my pages (<?php ob_start ("ob_gzhandler");?>), right? Thanks for your help and thoughts on how best to compress php pages.
View Replies !
Turning On Zlib / Gzip Via HTaccess
I have a site that serves static pages and PHP (a cms that doesnt have built in Gzip). My hosting has PHP 4.3.8 with Zend Optimizer and Zlib. I want to serve my files faster and I hear that Gzip is the best way to do it. I heard that if I paste: php_value zlib.output_compression On into the htaccess file of mydomain.com then it will gzip all the files (php and html) and my site will be faster. Questions: 1. Is this true? Just copy and paste? Will it be faster? 2. Will it gzip files on subdomains also? 3. Will it gzip files from a php cms that doesnt run gzip already?
View Replies !
Zlib Not Sending Proper MIME Types?
I have looked through my php.ini and httpd.conf files numerous times and cannot determine what is happening here. When I try to set zlib output compression either in my php.ini or a virtual hosts entry in my httpd.conf file, all I get is garbage characters. I am guess that apache is not properly sending out a MIME type identifying the compressed file, so my browser is rendering compressed data. I have the following in my httpd.conf: AddEncoding x-compress .Z AddEncoding x-gzip .gz .tgz AddType application/x-tar .tgz
View Replies !
Content-Encoding Is Not Set In Response When Using Zlib.output_compression
I enabled automatic gzip compression with the following lines in ..htaccess: php_value zlib.output_compression On php_value zlib.output_compression_level 5 The problem is that the Content-Encoding header does not get set at all in the response. Therefore, a browser that advertises itself as supporting gzip compression (Accept-Encoding: gzip,deflate) receives compressed content but does not know it is compressed. If I manually add the following to my script: header("Content-Encoding: gzip"); .... it then works. I'm using PHP Version 4.4.2 with the following Configure Command './configure' '--with-apache=../apache_1.3.34' '--with-openssl' '--with-gd' '--with-mysql' '--enable-trans-sid' '--enable-track-vars' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib=/usr' '--enable-mbstring' '--enable-ftp' '--enable-exif' '--with-freetype-dir=/usr/local' '--with-pspell=/usr/local' Zlib settings: ZLib Support enabled Compiled Version 1.2.2 Linked Version 1.2.2
View Replies !
Zlib Output Compression On Select Files
Is there a way to disable zlib output compression on select files? The problem I am having is IE won't load my css files when I turn on zlib.output_compression (since I'm using php to dynamically create them). What could I do to make php only compress .php files and leave the .css ones alone?
View Replies !
Compress String With Zlib Than Download It As .gz File.. How?
i`ve created a database backup script which is working fine the way it works now.. the only problem is that the backup function is returning a database backup string. so all the content of the database in a string.. that isn`t a big problem when you have a small database but it will get a problem when you have a 10MB db backup.. and that would be the raw .sql file. now to fix that issue i want to compress the string using zlib.. Code:
View Replies !
File System Functions & FTP Functions
I guess what I am really after is more of an explaination to what are the differences between the two sets. The manual really does a piss-poor job of explaining things sometimes. Some miss the 'introduction' completely Either way, I tried google and a search before I posted but here I am.
View Replies !
Working Connection... Not Working? (Advanced)
It has tons of modules, and obviously a config file which opens the db connection. But there is one, and only one, module having strange troubles. $query is just a simple INSERT INTO command. But it does not inserts anything. I only obtain... nothing. Neither an error from the server! Code:
View Replies !
Sessions Working, Then Not Working?
I wrote a login script (one that I have used on quite a few sites previously) and have found that it was working, then not working, then working again now not working - all without me changing any code. Here is the process: 1) l/p gets sent to login.php to query the db 2) if login successful, set $sid = session_id, and other session variables, register them in the session, and redirect to main.php 3) first thing on main.php is check_login function, all this does is see if $sid is set and equal to the current session_id(). If succeed continue to display data on main.php based on registered user data. If fail, redirect to error.php with the appropriate error code. this all takes place on a shared ssl server if that matters. The trouble I'm having is the check_login function is failing because no session variables are present, including $sid. I'm 99.9 percent certain it's not a code issue because 1) I have done this same script many times before with no trouble, and 2) this particular one was working before So I am really looking for php configuration issues to check on, or things like that.
View Replies !
Php4
I'm wanting to work with php4 and want to know which version of mysql to download that works great with php4 api version 3.23.x?
View Replies !
PHP4 Ignored With IIS
I am attempting to get PHP4 working with IIS but the php script is ignored. I installed Apache and it works with the Apache server so it is obviously a configuration error on my part but I can't find it. I have a test.php file that I run with each configuration.
View Replies !
Re Php4.3.4
Re previous problem Thanks to Alvaro, I solved the original problem on php version 4.3.4 However, I now have another one. I have an admin panel which requires a password to access it from a previous page. With the site live on an ISP server, everything is OK. On my local server running Apache and php 4.3.4, when the correct p/w is entered on the previous page, instead of going to the correct page (which consists of 2 frames, it simply reproduces the previous page in both frames. The script being used is: #-----REDIRECT AUTH USER---------- if($HTTP_SESSION_VARS['sessadmin']){ Header('Location:admin.index.php'); } #------AUTHENTICATE PASSWORD------- if($HTTP_POST_VARS['pass']){ if(crypt($HTTP_POST_VARS['pass'], $HTTP_POST_VARS['pass'])=='wiOgiun64DE9.'){ session_register('sessadmin'); $sessadmin='set' $done=1; } Because it works OK on an ISP, I assume it must be a setting in my local apache/php set up.
View Replies !
PHP4 XML DOM
Currently my web server supports only php4. I want to know how to parse the xml and get the element value using dom. I thought they have similar function for getting element by id or tag name, so far i haven't find anyting like that except fro PHP5 with Domdocument. $dom = domxml_open_file ('data.xml'); $e_data = $dom->document_element(); <?xml version="1.0"?> <book> <title>hhelo</title> </book>
View Replies !
GD2 And PHP4.4
It should be possible (as far as I know) to use createimagefromjpg('<urltoimage>'); In PHP4.3.11 it worked just fine, but now I use PHP4.4 and it is not working anymore! I only can do: createimagefromjpeg('blafoo.jpg') (=same dir) or createimagefromjpeg('d:/inetpub/vhosts/......../blafoo.jpg); This function is also used in a plugin (LightBox) for Nuclues and with Nucleus is isn't working also. Anybody a solution? (I *need* to load from url!).
View Replies !
PHP4 And XML
How can I pase this xml file using php. I am currently using xml_parse($xml_parser,file_get_contents($file)); but this get the php code and not the out putted xml. I can't get my head around how to parse the outputted xml using php Code:
View Replies !
XML In Php4
XML for data transfer between 2 servers. It's all working nicely - getting my "interface" object populated works like a charm - however, now that I wanted to test the application on the production server (PHP 4.4.4 - development server is 5.1), I of course, ran into a ton of issues due to php4's lack of XML support (compared to v5). After having tried multiple classes and trying to shimmy something together myself.
View Replies !
PHP4 Vs. PHP 5
I know PHP 5 is the newer (and presumably) better version, but I don't have any experience programming OOP. And I don't want to stumble learning PHP simply because I am struggling with OOP concepts. Yet at the same time, I'd rather learn a newer (more applicable) version, and I do hope to learn OOP programming some day soon.
View Replies !
PHP3 And PHP4 Together
I'm a little new to the PHP thing. I want to try to setup my server to handle PHP3 and PHP4 requests easily. e.g. I have some scripts that are PHP3 and want to start learning PHP4. Instead of doing the simple (like anything I do is simple URL ) thing, I am attempting to set up apache to support MySQL, PHP3, PHP4, SSL, ColdFusion, SteelBlue, and maybe even Frontpage. Tell me I'm insane. Now I have read the "Soothingly Seamless" setup from the website, and had it mostly working, until some unforseen circumstances caused me to have to start over. I can set up Apache to use PHP4, MySQL, and SSL, but for those PHP3 scripts, I am a bit lost. Finally, my question. Is there a simple way (using the Sootingly Seamless page as a reference) to add PHP3 into the mix. Any help on this would be great!
View Replies !
PHP3 Or PHP4
I am starting to write some scripts. Now should I wait until PHP4 documentation and tutorials arise and write in PHP4, or should I just do everything in PHP3? I have a book on PHP3 and I want to know if the language has changed enough to make this book invalid. Thanks. Any clear input is appreciated.
View Replies !
MSSQL With PHP4
I am using win98 and SQL7.0,, the problem is when i try to connect to the database using the next query : <?php $username = "bla"; $password = "bla"; $database = "bla"; $conn = mssql_connect($server, $user, $pass); $select = mssql_select_db($database, $conn); $sql = "SELECT * FROM "; $result = mssql_query($sql, $conn); ?> it gives me the next error message : Fatal error: Call to undefined function: mssql_connect() in C:Inetpubwwwrootphptestmain2.php on line 6
View Replies !
PHP4 And SSL And Raven
1) - Has anyone had intermittent "Page Not Found" or "Page Cannot Be Displayed" errors when using PHP4 over a secure connection. It's not our programming because we get the error when using phpmyadmin over SSL. Phpmyadmin is an open source utility which was programmed by someone else. We are using a RaQ4 Cobalt box running Linux, hosted with Aspre (aspre.net). Our ISP says some other customers have complained about a similar problem but they have no solutions. 2)- We talked with another dedicated server provider (Adgrafix, adgrafix.com) and they said that we would have to install "Raven" to make PHP work over SSL. Has anyone heard of Raven? Is it necessary?
View Replies !
Session In Php4
I have tested a couple functions, they work fine, but when I try the session_start() function, it just hang the browser for a long time and at the end, return me a message saying that the page is not found. Is there some configuration I have to make before I can use session-related function? or what else I should do?
View Replies !
Setting Up PHP4
I have set up PWS and PHP4 on my Windows98 computer but I am still unable to see php coding in .php files in IE. Yes I have put them in the right dir. I think the problem was that I was unable to put the file msvcrt.dll in my C:WINDOWSSYSTEM folder. When ever I try to copy that file into C:WINDOWSSYSTEM I get an error message that says "Cannot creat or replace msvcrt: The specified file is being used by Windows." Whats going on here?
View Replies !
PHP4 Beta
i installed PHP4b2 for NT4/IIS but the PHPpages just won't show - HTTP error 500. how do i troubleshoot this? I have installed the php isapi filter and also *.php is associated with the above filter as per the installation notes. The normal htm pages are OK.
View Replies !
Install Php4
I have installed php4 on my linux server,and all the process is so smooth,but when I write a php file only content a single sentence of <? phpinfo ?>,the system tells me the version of the php is 3.0.15,why?At the same time the php cann't connect ot mysql.
View Replies !
Reddhat 7.1 & Php4
Problem: the file phpinfo.php always showed the script line <? phpinfo(); ?> in redhat 7.1. But: 1. php works in window 2000 2. it also works in win98 3. it also works in a modified redhat 7.1 where I installed apache+mysql+php myself.
View Replies !
PHP LIB Works With PHP4?
I want to install phplib but found "PHP 4 is still in beta. We do not support deployment of this library with beta software." in phplib installation manual. Does it mean that I have to go back to php3? Have anyone have positive experience installing phplib on php4? After I notice this problem. I tried to look up the answer in the web, and found only one negitive answer: - - - - I did and mailed it to php4-beta. If I install a build of PHP4 and the php.ini-dist distributed with PHP4, I get the core as soon as I either define a doc_root or an auto_prepend_file, no matter what I do. Kristian - - - - But it is in php4 beta though. So, I don't dare to go any further because I'm really new to php.
View Replies !
Connecting To MS-SQL Using PHP4!
I am trying to connect to our NT based MS-SQL server from my remote linux box, i have a RH linux 6.2 plat, with PHP4.0.3, using sybase ase libs, i compiled it like the faq says, configured it, set up the interface files, but i get the following error: Fatal error: Call to undefined function: mssql_connect()in /usr/local/apache/htdocs/mssql.php on line 4 So i havent got to actually be able to connect to anything being, its saying function isnt supported.
View Replies !
|