473,890 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

extension loading works in command-line, but not Apache browser

Hi, all I'm trying to do is load the php_mapscript.s o library into php.

Here's the php file:
Code:

dl("php_mapscri ot.so")
if (extension_load ed("MapScript") )
echo "works!";
else
echo "doesn't work!";
print_r(get_loa ded_extensions( ));

Here's from the command line:
Code:

[edfialk@niceguy mapserver]$ php phpinfo.php
<HTML>
works!
<br>Array
(
[0] =yp [1] =xml [2] =wddx [3] =tokenizer [4]
=sysvshm [5] =sysvsem [6] =>standard [7] =sockets [8]
=shmop [9] =session [10] =pspell [11] =posix [12]
=>pcre [13] =pcntl [14] =overload [15] =mime_magic
[16] =iconv [17] =gmp [18] =gettext [19] =ftp [20]
=exif [21] =dio [22] =dbx [23] =dba [24] =curl
[25] =ctype [26] =calendar [27] =bz2 [28] =bcmath
[29] =zlib [30] =openssl [31] =MapScript [32] =gd
[33] =ldap
)
<br>
Config file:/etc/php.ini
Here's from the browser:
(http://niceguy.wustl.edu/mapserver/phpinfo.php):
Code:

Warning: dl(): Unable to load dynamic library
'/usr/lib64/php4/php_mapscript.s o' - /usr/lib64/php4/php_mapscript.s o:
cannot open shared object file: Permission denied in
/var/www/html/mapserver/phpinfo.php on line 22
doesn't work!
Array ( [0] =yp [1] =xml [2] =wddx [3] =tokenizer [4] =>
sysvshm [5] =sysvsem [6] =standard [7] =sockets [8] =shmop [9]
=session [10] =pspell [11] =posix [12] =pcre [13] =overload
[14] =mime_magic [15] =iconv [16] =gmp [17] =gettext [18] =>
ftp [19] =exif [20] =dio [21] =dbx [22] =dba [23] =curl [24]
=ctype [25] =calendar [26] =bz2 [27] =bcmath [28] =zlib [29]
=openssl [30] =apache2handler [31] =gd [32] =ldap )
RAWR Permission denied?! Apache is run as 'nobody', the
php_mapscript.s o has 777 permissions, user/group root/root.

I'm pretty desperate about this.
Anyone have any ideas?

Thanks in advance!
-Ed

Jan 19 '07 #1
3 2761
oeb
edfialk wrote:
Hi, all I'm trying to do is load the php_mapscript.s o library into php.

Here's the php file:
Code:

dl("php_mapscri ot.so")
if (extension_load ed("MapScript") )
echo "works!";
else
echo "doesn't work!";
print_r(get_loa ded_extensions( ));

Here's from the command line:
Code:

[edfialk@niceguy mapserver]$ php phpinfo.php
<HTML>
works!
<br>Array
(
[0] =yp [1] =xml [2] =wddx [3] =tokenizer [4]
=sysvshm [5] =sysvsem [6] =>standard [7] =sockets [8]
=shmop [9] =session [10] =pspell [11] =posix [12]
=>pcre [13] =pcntl [14] =overload [15] =mime_magic
[16] =iconv [17] =gmp [18] =gettext [19] =ftp [20]
=exif [21] =dio [22] =dbx [23] =dba [24] =curl
[25] =ctype [26] =calendar [27] =bz2 [28] =bcmath
[29] =zlib [30] =openssl [31] =MapScript [32] =gd
[33] =ldap
)
<br>
Config file:/etc/php.ini
Here's from the browser:
(http://niceguy.wustl.edu/mapserver/phpinfo.php):
Code:

Warning: dl(): Unable to load dynamic library
'/usr/lib64/php4/php_mapscript.s o' - /usr/lib64/php4/php_mapscript.s o:
cannot open shared object file: Permission denied in
/var/www/html/mapserver/phpinfo.php on line 22
doesn't work!
Array ( [0] =yp [1] =xml [2] =wddx [3] =tokenizer [4] =>
sysvshm [5] =sysvsem [6] =standard [7] =sockets [8] =shmop [9]
=session [10] =pspell [11] =posix [12] =pcre [13] =overload
[14] =mime_magic [15] =iconv [16] =gmp [17] =gettext [18] =>
ftp [19] =exif [20] =dio [21] =dbx [22] =dba [23] =curl [24]
=ctype [25] =calendar [26] =bz2 [27] =bcmath [28] =zlib [29]
=openssl [30] =apache2handler [31] =gd [32] =ldap )
RAWR Permission denied?! Apache is run as 'nobody', the
php_mapscript.s o has 777 permissions, user/group root/root.

I'm pretty desperate about this.
Anyone have any ideas?

Thanks in advance!
-Ed
I don't know if it is relevant, but from
http://ie.php.net/dl

"As of PHP 5, the dl() function is deprecated in every SAPI except CLI.
Use Extension Loading Directives method instead."

oeb
Jan 19 '07 #2
Thanks oeb, but I'm actually using 4.3.9

Jan 19 '07 #3
On 19 Jan 2007 08:54:00 -0800, "edfialk" <ed*****@gmail. comwrote:
>Here's from the browser:
(http://niceguy.wustl.edu/mapserver/phpinfo.php):
I just had a look, and you appear to have the extension loaded twice now -
lots of warnings about it not being able to re-register functions and
constants, but MapScript appears later in the phpinfo output...

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1668
by: Lee Stewart | last post by:
I've got an extension that I coded as a DLL in Windows and can use the dl() function to load it with no problem. This makes my test functions available and everything works fine. I'd like to keep the DLL resident in memory and tried adding it to PHP.INI (and don't call dl() ), but the functions in my DLL aren't available to my PHP script. Is there something special I need to do? I don't want to recompile PHP with my code - I can't...
9
2557
by: timothy.williams | last post by:
Hi. I trying to write an extension module to call some C libraries so I can use them in Python. Several of the library functions pass pointers to structures as arguments. I was thinking that I could create a class for each structure, but I'm not sure how to get the data back and forth. The example the "Extending and Embedding the Python Interpreter" manual has examples of passing strings and ints using PyArg_ParseTupleAndKeywords(), but...
0
606
by: phpnube | last post by:
I used this php package to install on my system... PHP 5.0.0 installer - 26 July 2004 (CGI only, packaged as Windows installer to install and configure PHP, and automatically configure IIS, PWS and Xitami, with manual configuration for other servers. N.B. no external extensions included It works fine... as the test page outputs the correct php page. I installed PHP to make use of the mysql database thrue phpmyadmin. When i
0
1080
by: neilgg | last post by:
I'm trying to write an IAS Extension DLL using some managed code to do the authentication. I've created a mixed-mode DLL, as IAS need standard DLL export functions called RadiusExtensionInit, RadiusExtensionProcessEx and RadiusExtensionFreeAttributes. Everything works OK on Windows 2000, but when I use Windows Server 2003, it gets into a deadlock immediately after loading MSCOREE.DLL. This seems 100% repeatable on both machines I've...
1
1712
by: Andy G | last post by:
I hate to post just a general error like this but one of my clients that coded this system is getting an error when loading a page. I know that you can't point out the specific problem so forget about what is behind this error. Just wondering is someone can read into this error and point me the right way. Error Loading 'DesktopModules/HRSReports/HRSReports.ascx ' Message: User control source files must have a .ascx file extension.
2
1983
by: Rob | last post by:
I was working on a project and everything was going fine, then all of a sudden the form set as my startup object stopped loading. I tried setting some others as the startup object, and some of my forms will load and others won't. Those that won't load at startup don't load with the Show or ShowDialog command either. Can anyone give me a hint as to what went wrong?
0
4097
by: lushdog | last post by:
Hi, i'm writing a shell extension in c# that will add two menu's to the right-click menu of explorer if any file is selected, i.e. it's registered in the * section of Classes in the registry. Here is the problem. If i select one file and use the standard OPEN context menu, for a .txt file let's say, all is well, but if i select two or more files and use the standard OPEN context menu it seems to want to run through the code snippet for...
1
2120
by: tyler | last post by:
I've written a small python extension but I'm having difficulty loading it at runtime. The source for my extension is a module which is a member of a package is organized as follows. test/setup.py test/myutils/__init__.py test/myutils/netmodule.c my setup.py file for building / installing looks like this
0
1218
by: anujseth76 | last post by:
Hi, This might be slightly off topic and but i am hoping someone here can help. I am trying to build a python wrapper for some C++ classes that access oracle. when i try loading the module i get the following errors Python 2.4.2 (#1, Nov 9 2005, 09:37:25) on hp-ux11 Type "help", "copyright", "credits" or "license" for more information. # DbConnectionParams.pyc matches DbConnectionParams.py
5
2030
by: malkarouri | last post by:
Hi everyone, Is it possible to write a Python extension that uses the Boehm garbage collector? I have a C library written that makes use of boehm-gc for memory management. To use that, I have to call GC_INIT() at the start of the program that uses the library. Now I want to encapsulate the library as a CPython extension. The question is really is that possible? And will there be conflicts between the boehm-gc and Python memory...
0
9976
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9815
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8008
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4665
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4259
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.