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.





[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 Complete Forum Thread with Replies

Related Forum Messages:
Uninstalling Compiled Php4 Install...
An old pet peeve of mine with *nix has reared its ugly head - the total
lack of uninstall on compiled apps. After compiling php4 on debian,
I've had some problems and would like to completely remove it. Make
uninstall doesn't work, and I can't just go around removing the files
as the various db's (locate, whereis, etc) won't be updates - and
should I install a packaged version, it would be a disaster.

View Replies !
Functions "compiled" Each Time?
I have an index.php file that has a lot of functions that I wrote.
Let's say for the sake of argument that there are 1000 functions of
100 lines each. The index.php file is invoked with a "state" a la
"index.php?state=L1-2L3C4-47". Different functions are called
according to what the state is, and then user actions can cause
index.php to be invoked again with a different state. For instance,
you can click an "erase this part" button, and the page will display
again with that part missing.

I don't mind if it takes even a second or two to "compile" (parse?
condense?) the functions the first time through, but a change of state
should take only 1/10 of a second or less. Apart from the compiling,
that goal is achievable, the processing isn't that complicated, but if
the php engine starts from scratch each time I pass through the file,
I will have a problem.

Or maybe, since it is a server-side process, rather than compiling the
functions once for each contact with the page, the functions are
compiled once when the first person contacts the page.

I just have no idea how it works, and I need to know so I can plan my
code accordingly.

View Replies !
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 !
Can't Use Imap Functions In Php4?
I tried many times in different systems , and find Can't use imap functions in php4? (linux or win32) Is it really?

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 !
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 Replies !
Iso PHP 5.0 Compiled On Mac OSX 10.2.8
I'm looking for a binary version of PHP 5.0 (official release)
compiled on Mac OSX Jaguar 10.2.8.

View Replies !
Compiled Var Name
I've got a massive grid of checkboxes being submitted into a script, they are in the form of name[id] where there are lots of names and lots of id's. In my receiving script, I have every variable being created and assigned to a var, such as..

$var = "_POST['auth_read[52]']";

My question is, how can I revert this around to get the value of $_POST['auth_read[52]'].

View Replies !
Compiled GDLib....
anybody had a compiled gdlib for windows. curently i'm using php 4.2.0 and run at personal web server and using windows 98.

View Replies !
As Cgi With Php 4.4.2 Compiled From Source
I am trying to use php 4.4.2 as a cgi scripting language. I am running
a self-built linux distribution, with php 4.4.2 compiled from source.
I am using the busybox web server, which doesn't have the ability to
incorporate php as a module.

The problem I am having is that php is insistent about sending

X-Powered-By: PHP/4.4.2
Content-type: text/html

at the start instead of

HTTP/1.0 200 OK
Content-type: text/plain

Any way I can get php to quit doing what it's doing and do what I think
it should be doing?

View Replies !
Compiled Php Programs
Is it possible to compile php source to create a binary? I am thinking along the lines of building an application for folks, but do not want them to have access to the source code. I like php and perl, but am not sure if there is a way to "secure" my programs if I
use them.

View Replies !
PHP Compiled To Use MSSQL Required
I have a requirement where my database is in MSSQL and i have to use PHP and apache to generate reports from it. I am good at PHP thats why want to go ahead with it.

Will there be any problems if i use php with mssql and apache?

I have learnt that PHP has to be compiled with MSSQL support to use the mssql functions. Where can i get a compiled version of php for the same. Will the normal php available for download work with mssql as well?

View Replies !
Encryption Using With Nothing Special Compiled In
I have plain vanilla PHP (bcmath is the only thing special I'm aware of). I
don't have mcrypt compiled in.

Are there any functions that can be used for reversible encryption?

(I have thought about how I would choose the key -- that isn't an issue.)

I'm only interested in [reversibly] encrypting a 192-bit AES key that will
be stored in a database. I'm not interested in encrypting large amounts of
data.

View Replies !
Does Php.exe HAVE To Be Compiled To Support LDAP?
After reading what php.net has say about enabling LDAP functionality, I'm a bit leary of trying to enable this w/o a few answers. I've uncommented the php.ini line for enabling LDAP extensions but phpinfo() still reports nothing about LDAP.

Setup:
Win2K3 Server
SQL Version     MYSQL (5.0.37-community-nt)
PHP Version    5.2.1 (apache2handler)

1) Does php.exe HAVE to be compiled to support LDAP or do I just need an extension enabled?

2) If indeed it does have to be compiled is there an easy way to acquire PHP with LDAP already compiled?

View Replies !
Passing Arguments To PHP Compiled As A CGI Binary?
I searched for the answer to this, but found nothing.

Lets say I have a file called test.php, and in it:
PHP Code:
#!/usr/bin/php

View Replies !
Compiled C-language CGI-BIN Programming With MySql
Because I have some heavy number-crunching scientific applications, I'd like
to program using the C language, CGI-BIN, and with MySQL (using its
C-language interface).

Is there anything I should know? For example, when Apache runs a CGI-BIN,
is there anything special about the environment (memory limits, etc.)?

Is the paradigm I proposed workable?

View Replies !
Rotate Info Compiled From Mysql
I can collect up to date info from mysql tables and display them without any troubles on my page. However, it takes up a lot of space, so I would instead like to rotate the information, say 10 seconds for each section.

Now, I'm able to use a javascript/scrolling script that I found to do this job for plain text and it parses php as well, but I can't seem to get it working when I'm querying the database.

View Replies !
Can PHP Code Be Compiled Or Secured From Human Reading?
In the case we have to put our code on a laptop (now done with PHP-MySQL-Apache) it still is readable by anyone, also if stolen (for example). Now client wants to have an executable (exe / compiled) version (ie Delphi). What are options to use same code?

View Replies !
Securing Data Between PHP Script And Exec'd Compiled 'C' Program
I'm using RSA Securid Tokens, and I'm going to write a little 'C' program that takes as input the userid (i.e. "jsmith") and the number displayed on the token (i.e. "123456") and returns a result code indicating whether authentication is successful.

The compiled 'C' program will be called from a PHP script.

I know that if I pass the parameters on the command line, i.e.

authenticator jsmith 123456

the parameters are world-visible (via "ps -Af", for example) and this is an
information leak.

<BEGIN QUESTION>
How can I pass things securely between the PHP script and the exec'd program?
<END QUESTION>

One way I suppose I could always use is to create a file from the PHP script and then just pass the filename to the program (assuming permissions and UID/GID were all set up correctly).

But is there a more elegant way that doesn't create files, such as pipes or shared memory?

View Replies !
Compiled Apache With Some Feature, Like "suexec"?
Directly from command line on the server,I execute a bash script, that is called from
a Php script, with no problem. But when the Php script is called from Apache, I have some permission denied during the executin of the bash script, called from Php:

sh: bbx_txt: permission denied.

Do I have to compiled Apache with some feature, like "suexec"?

View Replies !
DBM Functions:: Undefined Functions Error
I have been trying to use the DBM Functions (dbmopen etc) in php but always get an undefined funtion error. Do I need to load something or change something in the .ini file to get it to work?

thanks
MIke

View Replies !
File System Functions &amp; 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 !
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 !
OOP In PHP4
Q. What OOP construct <B>unavailable</B> in PHP 4 does the following script approximate? 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 !
Does Anyone Use The PHP4 Dl() Function?
does anyone use the PHP4 dl() function using a UNIX server?
to dynamically load modules at run time?

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 !
PHP4.0 On Unix
Can anybody see why the following code wouldn't work on a Unix /Apache platform when it works fine in IIS5.0 on windows? Is there a problem with reading the querystring and passing it to the HTTP variable?

<?
session_start();
$strPage = $HTTP_GET_VARS["page"];
if (isset($logged) == true && $logged == 1){
header("Location : ".$strPage.".php");}
else{
header("Location : passwordcheck.php?page=".$strPage);}?>

View Replies !
PHP4 And This Function
function query($query, $return = false)
{
$fetch = mysql_query($query, $this->connection) or
die2(mysql_error($this->connection));
if($return)
return $fetch;
}

mysql_error(): supplied argument is not a valid MySQL-Link resource

the line that begins with $fetch is my problem. This was originally a
PHP5 script that I am retrofitting.
The $query is used all over, and it is really gumming things up.

View Replies !
Php4 And Linux
I'm running Red Hat linux 5.2 on my server. I'm able to run php3 fine on it. I was told that i couldn't run php4 on red hat linux 5.2. I dont think this is true, but would like to know. I don't think the person knew what i was talking about, but i wanted to make sure since i want to upgrade to php4.

View Replies !
Php4.3.1-installer
im not sure what my SMTP server would be, i think i would something like this www.geocities.com/user-name but im still not sure.

View Replies !
Parsing XML In Php4
I did the parsing XML and it works on my computer (PHP5), but as usual
it doesn't on the clients server (PHP4):

<?php
error_reporting(E_ALL);

$doc = DOMDocument::loadHTML("playlist.xml");
var_dump($doc);

$aSongID = array();
$aSongName = array();
$aSongPath = array();

$songs = $doc->getElementsByTagName("Song");

foreach($songs as $song){
array_push($aSongID, $song->getAttribute("ID"));
array_push($aSongName, $song->$song->nodeValue);
array_push($aSongPath, $song->getAttribute("URL"));
}
var_dump($aSongID);
?>

It just displays the blank page with no errors, so i can't figure out
what is it.

View Replies !
PHP4 Installation
I have installed PHP4 many times with no problems, but this time im stuck. The system is Windows XP Pro SP1, it was just installed fresh. Web server software is Visnetic WebSite Pro, Latest build. PHP v4.3.2. Everything installs fine as far as i can tell and I setup all the needed settings in the web server.

When ever I try to use PHP files on my server all I get is internet explorer saying the page cannot be displayed. I dont understand what I have done wrong, its the same setup I always use, same for the settings.

View Replies !
Use PHP4 Dom XML In PHP5?
Is it just me... Or is PHP5 XML very limited?
Or am I missing something very obvious?
Any way to use PHP4 Dom XML in PHP5?
Does anyone know why support for it was dropped?

I have following code I need to have replaced:

PHP4
$eir_dom = domxml_open_mem($eir_padfile_content);
$eir_root_node = $eir_dom->document_element(); // = root element

PHP5
$eir_dom = new DOMDocument;
$eir_dom->loadXml($eir_padfile_content);
// how do I set $eir_root_node ?

PHP4
.... $nodes = $cur_root_node->child_nodes();
.... if ($test_node->node_name() == $next_node_name_to_find) {
PHP5
// child_nodes(); node_name()

PHP4
.... if ($node_child->node_type() == XML_TEXT_NODE) {
$node_child->set_content($new_content);
break;
}
PHP5
// set_content, node_type()

View Replies !
PHP4.3.4,IIS,MySQL ...
Is it possible to run PHP with IIS and MySQL instead of with Apache? If it
does, how do I make IIS recoqnize PHP modules etc...?

View Replies !

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