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.





Shared Memory Between 2 Processes?


I have two running php processes (they have infinite loops) and I need them to pass some data to eachother. Writing and reading shared memory in one process works just fine but when I try to save var in process1 and read in process2 I get error: "Variable key 555 doesn't exist".

What I'm doing wrong?

//PROCESS 1 (saving var)
$key = 'My Key'
$value = 'My Value'
$app = 'lovelyapp'
$key = $key . 'a'
$segment_key = abs(crc32($app . $key));
$segment_size = 1024;
$segment_perms = 0600;
$shm_id = shm_attach($segment_key, $segment_size, $segment_perms);
shm_put_var($shm_id, 555, $value);
shm_detach($shm_id);

// PROCESS 2 (reading var)
$key = 'My Key'
$app = 'lovelyapp'
$key = $key . 'a'
$segment_key = abs(crc32($app . $key));
$segment_size = 1024;
$segment_perms = 0600;
$shm_id = shm_attach($segment_key, $segment_size, $segment_perms);
$value = shm_get_var($shm_id, 555);
shm_detach($shm_id);




View Complete Forum Thread with Replies

Related Forum Messages:
Shared Memory
i've some questions about the shared memory functionalities. first, is there a real difference between shm_* and shmop_* functions? ... the documentation says old (shm_*) and new (shmop_*) functions (called "renamed" in changelog of php).

mainproblem - our provider doesn't compile '--enable-sysvsem' '--enable-sysvshm' which i need for the shm_* functions i think ... but he has compiled '--enable-shmop' ... i can use the shmop_* functions, but they're really different from the "old?" shm_* functions ... one problem /-> i cannot use arrays (only strings) ... or is there a trick how i can manage that?

View Replies !
Shared Memory Limit?
I'm using PHP 4.2.2 on RH9 Linux (with Progeny.com updates, in case
you're wondering). I was using shared memory (shm* API) a great deal
in my web applications because I have 1GB of RAM on this system. By
using shared memory, I can optimize web pages a little by not having
to hit the database every time I want to regurgitate a somewhat-static
reference table.

You may be familiar with the API that looks like this:

$key = 'My Key'
$value = 'My Value'
$app = 'lovelyapp' //lovelyapp would be the fake name of my web app
$key = $key . Ƈ.5' //1.5 was the version of my web app, to provide
uniqueness
$segment_key = abs(crc32($app . $key));
$segment_size = 1024;
$segment_perms = 0600;
$shm_id = shm_attach($segment_key, $segment_size, $segment_perms);
shm_put_var($shm_id, $app . $key, $value);
shm_detach($shm_id);

This was working rather beautifully for me until I started messing
with the Ƈ.5' literal. The reason, I suspect, was that I had been
using the app (without a bounce of httpd or entire server) and storing
stuff in shared memory with keys of 1.3, 1.4, 1.5, and 1.51 as my app
went through various revisions. This allowed different versions of the
app to simultaneously exist on the same web server and have an
exclusive section of shared memory.

I didn't think I was storing a tremendous amount of stuff there --
perhaps no more than 1MB per shared memory section (determined by
$segment_key).

Finally, *KABOOM* my web app died with the error "Not enough space on
device" and pointed out the error was on the line where I used
shm_attach().

So, I thought -- no problem -- no one using the app this late, so I'll
just bounce the web server (httpd). I did and the error still occured.
I thought, okay, clear my local browser cache and try again. Nope --
still occurred. I tried to bounce httpd again and even go straight to
the web server itself and see if a web page would have the same error.
Yep -- it had the same error no matter what I did.

I had no choice but TO REBOOT THE ENTIRE LINUX WEB SERVER. This
definitely cleared up the problem and I've now hammered on that server
for awhile now with the web app and all looks well.

What's your diagnosis? And, why didn't bouncing httpd clear it up
since Apache spawns PHP as a child process and PHP spawns shared
memory as a child process --

View Replies !
Shared Memory Confusion
I'm using the shmop_* functions to create and access shared memory. I've
never used shared memory before, so I apologize if my reasoning is
completely off...

$shm_id = shmop_open(ftok(__FILE__, 'a'), "c", 0600, 32);

That works for the first process, but if I try to launch a second process it
gives me the warning "Unable to create or attach shared memory" and fails.

According to the PHP manual, the 'c' flag will create shared memory, or if
one with the same key already exists, then it will open it for read/write
access - so I'm not sure why doesn't work (should it?). The manual page
mentions the last two args should be zero if I'm opening an existing memory
segment, but I don't know if I'm opening an existing segment when I execute
that line.

According to one of the manual comments, I can determine whether the memory
segment has been allocated already using the 'ac' flag:

1) $shm_id = shmop_open(ftok(__FILE__, 'a'), 'ac', 0, 0);
2) if(!$shm_id){
3) $shm_id = shmop_open(ftok(__FILE__, 'a'), 'c', 0600, 32);
4) }

But what happens if there is a context switch immediately after line 2 has
finished executing? Then two processes could both end up executing line 3,
and I'll get that warning again. Should I just use a semaphore to make
this atomic?

( linux 2.6, php 4.3.8)

View Replies !
Shared Memory Functions..
has anyone here had experience with shared memory functions? Does anyone know how you can use it for say a caching type thing?

I am not very familiar with linux stuff and would love some sample code. I want to use it to cache most common database queries that do not change, but when the records are updated or deleted, I also want a way to remove it from the cache.

View Replies !
Shared Memory Between Scripts ?
I am trying to develop a very basic but portable chat engine with php.
I would like to develop it without any database or filesystem stuff,
because I want it very portable and easy to install. So I was looking
for a way to make scripts communicate, or keep a kind of state . So
someone told me to look for shared memory operations... shmop_open and
all this things.... but I cant seem to find a script that uses this,
or something that works... Code:

View Replies !
Semaphore And Shared Memory Functions
I was wondering if there was anyone out there that has used Semaphore and Shared Memory Functions? I wanted to tear apart phpChat and there are functions belonging to this class... My server admin is weary of security risks... Is there any risks of memeory leaks?

View Replies !
100KB Image That Takes Up 2mb Of Memory Uses Up All 8mb Of Memory - Help!
I have an image that's only 100K in size, and I am working with 8mb of
memory. If I do this:

Code: ( php )

View Replies !
PHP Processes
I have a cronjob triggering a php script that takes several minutes to accomplish. I need to prevent multiple triggering by the cronjob mulfunctioning. So I would like a clean way to know how many instances of a certain php are currently working on the server.

is there a server variable for that? if not, how do I know (via php) how many concurrent accesses are there to a certain php page? for example in mysql (the "SHOW PROCESSLIST" command), but I need a similar function for the php page iself.

View Replies !
Background Processes
I'd like to know how to send an external process to the background, so that I can run multiple instances of the same process at one time. Any tips, links.. etc?

View Replies !
Listing Processes In PHP
Using PHP, is it possible to return and display a list of currently running processes on the client's machine? In fact, is it possible to run a system command on a client's machine?

View Replies !
Automated Processes
Customers post 'projects' to my site. These 'projects' are closed after 10 days. I could run a script on the default.php page that detects this, but it seems a waste of resources to run it everytime someone visits the site. Is there a way around this, for example the first visitor to the site in any, say, 3 hour period, runs the script & switches the most recently outdated projects from open to closed?


View Replies !
Max Number Of Processes
how can i determine what the maximum number of processes i should open
with popen (or proc_open) is? i assume it'd depend on the hardware of
the computer in question, but if that were teh case, then is there a
way to get info. about it, and some general method to determine a good
number of processes to open from that info?

View Replies !
Stranded PHP Processes And ProcessExplorer
Does anyone know what it means if I see PHP processes in the process
tree at the base level, instead of under the IIS worker process?

I do nothing but web serving off of the box.

These processes that are not under the IIS worker process seem to be
stranded/hung. They are never cleaned up by any garbage collection and
I have to kill them manually. They also always have a fairly low memory
usage, potentially indicating that they fail before loading completely.

Could it be that the execution of the process fails early enough that
ProcessExplorer doesn't see them as being executed by IIS?

View Replies !
Handling Long Processes
I am building web app, that will run a long processs (image processing) that can porbably take 15-30 minutes to complete) in respond to a user request (the user clicks a "process" button on a php web form). The ideal situation that I see is once the user's request was recevied, a reply that says "you request is being processed.

we will send you email once finished", will be sent to the user, while the other process will take place. When it's finished, a callback function will be called that sends email to the user notifying him the process outcome. What are the options to implement that?
multithreading?

View Replies !
List Processes Running In A Computer
I want to list all processes running on a computer by PHP language. Could you help me?

View Replies !
External Processes Without Waiting For Return
In php how do I call an external script or program without having php
waiting for the return?

exec and system both seem to wait for the return, I don't want this.

View Replies !
Insert Processes Before Form Is Submitted
I am trying to stop using Macromedia as my crutch and you guys have been a big help.  I need some assistance with submitting a form.  I have a form on my page and need to do an insert.  I have the action posting it back to the same page I am on versus sending it to an insert page.  The problem I am having is it trys to do the insert as soon as I pull up the page instead of waiting till the form is submitted.  I believe I need to do something with isset, but can't really find a tutorial that goes over it really well. Code:

View Replies !
Forking Multiple Processes At A Time
i have a php script that needs to execute an external php script (call this
script 2) when the user clicks a link, however I don't want the user to have
to wait until script 2 finishes executing before he sees the output of
script one... i know I can use the exec() command to do this, and use the &
to run the command in the background....

but say i want to run 100 instances of script 2 when the user clicks the
link (with different arguments)... i dont want to have all 100 processes
running at the same time... what I would like to do is run 10 or so at once,
and once those 10 are completed, run another 10...

View Replies !
Large Data Transfer Between 2 Processes
fist the context: I have a web server which query a mySql database. but
as the number of parralel queries increase, the server slows down too
much.

I got 2 ideas, one of which is to run N deamons which effectively
execute requests. the PHP uses message queuing(1) to queue queries
request to the daemons. but the answer may be quite large, larger than
messages the message queueing service can handle.

I thought to open back a communication link between the current daemon
and the waiting PHP to tranfer/process the result, using the message
queueing service to send back info regarding the opened link.

I thought to open a pipe between the current daemon and the PHP. is
this possible? and if so, how? if not, is an IP link to localhost be as
fast as a pipe?

View Replies !
Keeping Users Informed In Lengthy PHP Processes
Often PHP processes take a long time, such as wildcard searching a PostgreSQL database, or generating thumbnails.

The PHP host page does not display until the script is complete, so you can not effectively use code such as

echo "Converting file ".$Infile;
exec(convert $Infile $O8utfile);

for realtime feedback to the user.

How have others implemented a "progress meter" in PHP processes , one thought I had was to use Javascript redirection to call a PHP page with differing parameters each time .

View Replies !
Sending Signals To Processes As A Different User Than Owner Using Php
i know, it seems more to be a problem according to unix but i got it while
developing software with php:
i have 2 different users on a hp-ux machine that execute php scripts. they
are both in the same group.
these php scripts start background processes, i can communicate with using
signals (sending with posix_kill, starting background processes via
pcntl_fork).
so i got severel background processes owned by my 2 users.
the problem is i want to send signals as one of my 2 users to all my php
background processes no matter who of my 2 users is the owner. is it
possible other than using external tools like sudo?
i'm using:
PHP 4.3.4 (cgi) (built: Aug 18 2004 15:37:46)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies

compiled with:
../configure' '--prefix=/usr/local/php-cgi-saprfc' '--enable-calendar'
'--enable-filepro' '--with-gd' '--with-jpeg-dir=/usr/local'
'--with-zlib-dir=/usr/local' '--without-mysql' '--enable-sysvsem'
'--enable-sysvshm' '--with-pgsql=/usr/local/pgsql' '--enable-trans-sid'
'--with-cpdflib=/usr/local' '--enable-sockets' '--with-ncurses=/usr/local'
'--disable-shared' '--with-tsrm-pthreads' '--with-saprfc=/usr/local/rfcsdk'
'--enable-pcntl

View Replies !
Max_execution_time Ignored, Multiple Apache Processes Spawned
I have an app that is going berzerk on its own; without any code or environmental changes of any kind, for some bizarre reason it will randomly just hang, spawn multiple Apache processes and completely ignore max_execution_time, literally running infinitely.

Using PHP 5.2.0, Apache 1.3 and Win XP

Is this normal "bizarre" behavior that can occur within this setup; if so, what workarounds have you found to combat this, other than the obvious (try to debug and fix code)?

View Replies !
Limiting The Number Of Spawned MySQL Child Processes
Need to know if there is any way to limit the number of spawned MySQL child processes in linux ?

I have done my research at http://www.mysql.com and have not been able to find my answer. Have also looked at the source code (what i can understand of it).

Using MySQL v.4.0.25-max. Using an older system and the 14 childern are just bogging the system down. I am the only one with access to the server so 14 childern is overkill.

View Replies !
Checkboxes - Loop That Takes The Values And Processes And Writes The Changes To The Database.
I generate a form page from my MySQL database. let's say the table structure is:

Table A
> ID, title, active

the number of rows generated by the query is dynamic. If a field's value is 1, then the form output appears as

<input type=checkbox name=$ID checked> $title

and if not

<input type=checkbox name=$ID> $title

At the bottom of the form there is a submit button. The visitor can check/uncheck rows and then submit the form. I need to write a loop (possibly foreach) that takes the values and processes them and writes the changes to the database.

View Replies !
Shared IP And Other IPs
When I sign up for a hosting server, I was given 6 IP. One shared IP and a bunch of other IP. Usually, the other IP are series of numbers after the shared IP. If the shared IP is 55.55.55.51, then the other IPs are 55.55.55.52, 55.55.55.53, etc. Code:

View Replies !
Build A Page That Takes Form Data, Processes It In A Second Page
I'm trying to build a page that takes form data, processes it in a second page, then sends the user to a third,depending on data processing.

On the second page, I am trying to get the page to have some sort of "Loading" message while the backend processes the data, but I can't seem to get anything to work. Does anyone know how I can get that Loading message to display?

View Replies !
Can Cookies Be Shared?
I have to sites and want to interlink them with the same cookie user id but the have diferent domail names eg: shopwebsite.com and sportwebsite.com

How can i se a cookie to be read by both sites?

setcookie("user_id","$user_id",time()+31536000,"/");

View Replies !
Shared Logins
I've built an application the uses a default login that a new user is given ahead of time, and they login using this to register. Once they register thet are given a new generated password and they use the username that they create at registration.

Right after I generate the unique password, I start the session and then I give the user the new password. I have a situation where two new users register at the same time, two passwords are created but both of the users see one shared set of user information. If the user who sees the other persons login info uses the back button, and then uses the forward button his unique password and the username he created is shown, as it is supposed to be.

We've tried to get effect while inputing data once the session has been started but we can't do it. So far it's only just before the session is started.

View Replies !
Shared Script
One script to rule them all I have a cms script that I use on several sites all located with the same host. I finally got around to making some huge organizational changes, and as a result I now can use the exact same set of files barring a config file and a simple controller - to run all of the sites. Here is what I was thinking:

Set up all of the application files outside of public_html, and then have the one config file and one simple controller in the root for each site that runs with the CMS. This works (locally it's running fine and I've tested it live), and I'm loving the hole "easy to maintain" aspect, but what I am wondering is, would there be a performance hit because I have ten sites being run by the same set of files?

View Replies !
Shared Network
I just discovered that if a person has logged in,another person who opens up index.php gets to view the first persons page. I dont know if this is because of the shared net connection or whether its a flaw in the script.

Also, if one person has logged in, another person having access to the u/n and p/w can log in to the account at the same time. Clearly, my login.php and index.php are flawed.

View Replies !
Variable Shared By Users
Is there anyway to share a variable between many web users?

I've got an array, updated by users's actions.
i do want this same array be available to all web users in their sessions.

This without putting the content of the array in DB or file.

View Replies !
PHP CLI - Can It Worked As Shared Application ?
I have an a couple of utilities I would like to create for a customers that convert data from a CSV file to an ODBC datasource.

I have a protoype working on my laptop, but when I install these at the client's site, I was wondering if I could install PHP on their server and have selected workstations "share" access to the PHP interpreter or does each workstation need there own copy/installation of PHP ? BTW, I will be using the Windows version in all cases.

In other words from the workstation, I would like to execute a script with a command like "J:phpcliphp.exe myscript.php"

View Replies !
PHP Shared Server Security
I have a client that brought to my attention a very interesting problem. If he has a website (www.domain.com) and he has a php page on it (order.php) that connects to the database. He has the user and pass in the page.

This is a linux server. It seems that another person on the server could just figure out what directory he is in. Then just do "vi order.php" so they could read the user and pass and then connect to the database and steal information.

View Replies !
Can Variables Be Shared Across Sessions?
I have a small website working via php and all is
fine, but I wanted to add some new features and was wondering if php allows
for variables to be seen by multiple sessions, ie a user viewing the web
site on one machine can see variables created by another users session. Is
that what $_SERVER[] is for, or am I going to be better of creating a single
entry table in mySQL that has a field for each global variable?

View Replies !
Windows Shared Host - Is It Possible?
Can PHP emulate this behavior under windows without creating more windows logons? I'm thinking along the lines of file access from inside the scripts: I don't want anyone being able to root the box or subnet shares thru the php.

View Replies !
PEAR On Shared Hosts
If your site is on a shared host and you don't have shell access so you
have to just kind of use whatever they got, you can't install PEAR
modules, right? This is one thing that confuses me about PEAR. Is part
of PEAR build into PHP, so you can assume it will be available? or if
you want to use ANY of it, you have to install it by issuing UNIX
commands on the console?

View Replies !
PHP Libraries On Shared Server
I'm currently using a shared web server for projects, and only have FTP access to it.

I'd like to take advantage of PHP libraries like PEAR, and I was wondering if theres a way to install them on a shared server?

View Replies !
Shared DB Connection + Classes
I've got a small web interface, basically a link index with different categories.I use different classes for HTML rendering, category managing, link managing etcetera.

Now, most of these classes need DB access, but it's best to limit the DB connections per requested page (no?). So I've got two ideas here:

- I create a DB connection $maindbconn (object of class DBConnection) in the main script, and make sure every class has its own $dbconn class variable. In the class constructors, the main DB connection is passed by reference to the class, so every class has access to that one db connection.

- I create a DB connection $maindbconn in the main script, and in every class function that needs it, I use "global $maindbconn;".

Now, which approach seems best to you experts out there? And why?

View Replies !
Drupal On A Shared Server
I recently installed the Drupal CMS on my shared server. My problem is with "clean urls". When I run the clean urls test it seems to pass ok, but when I then enable clean urls the page loses all of its design (ie. logo, color, links do not work, etc.). I know there are some server things that need to be done and my host is telling me I cant do them because this is a shared server. They then told me that Drupal was not going to work for me. Will Drupal work on my shared server? Why is the site having this clean url problem? If Drupal will not work is there another CMS that already has clean urls?

View Replies !
.htaccess On Shared Hosts
I asked this question in the php5 area, but it makes more sense to be here.
I am on a shared host at the moment, and I am using .htaccess to override the php.ini file so that I am runnin php v5 (according to my hosting company, even though it says v4.4.2)....

Newayz, they set it up for me and they said it IS running v5. So, I want to include the "soapclient" functionality, and I have seen online that to do this, I need to include this in the ".ini" file:
"extension=php_soap.dll"

BUT, php_soap.dll is for WINDOWS, and i am on a LINUX server...

so:
1) what file do I include instead?
2) what exactly do I type into "htaccess.txt"?

View Replies !
Shared File Explorer
I am trying to build a php component that can access file from a shared drive on the web server. For example on my web server I have a shared drive, on this share I have a lot of content that will be changing on a daily basis. I need the file server to have rights to this information for publishing purposes. I have tried to access the files from the mapped drive, and the share path, example servercontent. Is there a way I can achieve this?

View Replies !
Compiling New Shared Extensions
If I recompile PHP to add a shared extension, will the actual PHP binary change? Or can I just copy the resultant library for the new extension? For example, suppose I last compiled php 5.2.3 with the following configuration: Code:

./configure --with-apxs --with-gd --with-mysqli

And now, I want to add xml and expat support, but I don't want to risk breaking the PHP installation that already exists. If I simply recompile from the same source tree, with the new extensions as shared libraries: Code:

./configure --with-apxs --with-gd --with-mysqli --with-libxml=shared --with-expat=shared

Is it safe to simply copy the resulting .so files for libxml and expat into the existing installation, along with the necessary entries in php.ini?

View Replies !
Shared Vs Static Performance
Does anyone have a general idea of the difference in performance when compiling PHP with primarily shared extensions rather than static? A recent Yahoo presentation "PHP at Yahoo" highlighted that they built PHP with the "disable-all" option, which implies that they load all of their extensions dynamically.

I'd be curious if anyone has any experience in the performance difference bewteen the two, i.e. 5% performance loss, not just "it's only a little bit slower".

View Replies !
Login Being Shared Across Network
I have a login script which I use on a large popular website. Just recently a MAJOR security flaw has been detected.

Over a large internal network if a user logs in on one machine, other machines are automatically logged in to that account. So if an admin logs in, every machine on the network can access that account!

Any ideas why?

View Replies !
Pages Shared Between Domains
I've created a content management control panel in php for some mass produced websites. I've been setting this up to where each domain has it's own copy of these php pages. So, each time I change the code I'm going to have to copy it over to every domain and upload it...and keep straight who has what.

Seems like I should be able to only have one copy of these php pages and each domain reference it using their individual config files. But, I don't think it's possible for the php code to be pulled and then executed at a different domain. (it always executes and then pulls...right?) Code:

View Replies !
'--with-pfpro=shared,/usr/local'
I'm trying to get payflow working with php5 as a loadable extension. My configure line has:

'--with-pfpro=shared,/usr/local'

and php5 installed fine via FreeBSD ports. I then installed Payflow pro also via FreeBSd ports. I'm getting an error with payflow_init which tells me payflow and php are not talking.

View Replies !
Libmysqlclient.so.6: Cannot Open Shared Obj. File
i have installed mysql, apache and php4 on my system.
Mysql 3.22.32-1
Apache 1.3.12
PHP 4.0.1 pl2

MySQL instalation has been fine and working. The problem is with Apache and PHP4.
I installed Apache first and then PHP (without starting Apache). Only after i succesfully installed php, i tried giving the following command:
[root@localhost bin]# ./apachectl start

But it gave me the following error........
Syntax error on line 211 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: libmysqlclient.so.6: cannot open shared object file: No such file or directory
./apachectl start: httpd could not be started.

View Replies !
Pear CLI Install On Shared Host
I've installed PEAR in my local area, on my shared host, under htdocs
but I'm anticipating a number of issues.

I'm forcing use of PHP5 with an .htaccess file, but by default the
host runs PHP4
That could mean that pear is installed under the php4/ area, but not
php5 ?

go-pear prompted me to install a number of packages, including DB,
which my webhost already has made available. If I do install DB using
go-pear, which DB will take precedence?

go-pear and pear have worked well on my local machine,
but after using browser to run go-pear on my webhost, and also
WebInstaller.php I got:

Fatal error: Class 'PEAR_Frontend_CLI' not found in
/usr/local/php5/PEAR/Command.php on line 144

I have FTP access, but not shell access....

View Replies !
Enable Php Extensions On Shared Server?
I have a very cheap php-enabled linux hosting account.

Unfortunately, this host does not have some extensions enabled which I
need, namely, the dom-xml and xslt extensions.

Assuming that the server admins ignore my pleas, is there a way to
locally
enable these extensions for my account, with a local copy of php.ini,
or
local copies of the proper *.so files, or some magic in the .htaccess
file?

View Replies !
Sending Login/Pwd Through Shared SSL To PHP/MySQL
I'm adding secure login to a PHP 3 web application on Linux/Apache. I
can't afford my own SSL certificate, so I'm using the shared SSL
provided by my web hosting company.

I tried this back in 2001, and I remember running into a snag. I was
able to get the login/pwd to the PHP script on the web server, via the
shared SSL connection with no problems. I was also able to connect my
script to the database using a regular connection. When I put the two
partial solutions together, it wouldn't work. Going though the shared
SSL connection, I lost whatever permissions I needed to connect to the
MySQL database. I kept getting errors about not being able to
(something) the MySQL server. I couldn't get any help from my hosting
company at the time (a freebie), so I ended up using a less-secure
login :-P

Has anyone else run into this or a similar problem? If so, how did you
get around it (or did you get around it)?

View Replies !
Have You Ever Tried To Build Pdflib As A Shared Object?
I have freebsd4.2 and php4.04pl1. I need to build the pdflib as a shared object to be used into php.ini with the extension directive. Actually I use php as a module for apache.
I followed the instructions for build pdflib for php, but I have some difficult to compile pdflib as a shared object for PHP. The pdflib documentation does not mention how to "compile" php.

I tried to "compile" php with:

./configure --with-pdflib=/usr/local --enable-shared-pdflib --with-zlib
make
make install

but I still do not found the .so for php. Have you ever did it before? I'm missing something.

Grazie!

View Replies !
Turn Off Register_globals On A Shared Server
My shared server provider has register_globals on. I checked by running
php_info(); from within a file. I would like to turn this off, but
asking them to turn it off just for me will not work.

I tried adding the following lines to the .htaccess file:
<IfModule mod_php4.c>
php_flag register_globals off
</IfModule>
but that did not work. I thought that maybe the file is called
something else, and I could not find any file containing mod_php
anywhere on the server. Also, I can see that the addmodule line for
mod_php4.c is commented out in the httpd.conf file for the shared
server.

I do not know how the server can serve php if that line is commented
out?

Bottom line is: is the .htaccess approach the correct one? and does
anyone know how I can find out if I am using the correct filename?

phpinfo() says that I have PHP Version 4.3.11

I will leave phpinfo() running on the main page so that if someone
needs more information,

View Replies !

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