473,569 Members | 2,872 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 2744
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
1658
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....
9
2540
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...
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...
0
1055
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...
1
1705
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...
2
1967
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...
0
4077
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...
1
2102
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
1207
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....
5
2021
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...
0
7703
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...
0
7619
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...
0
7930
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. ...
1
7681
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...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
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...

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.