Skip to content

Commit bfdd22a

Browse files
committed
Remove old references to SAPIs and extensions no longer in the core
1 parent 21d5636 commit bfdd22a

File tree

8 files changed

+16
-444
lines changed

8 files changed

+16
-444
lines changed

Diff for: INSTALL

+5-209
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,10 @@ General Installation Considerations
6363
set up anything on your own, only write your PHP scripts, upload it to
6464
the server you rent, and see the results in your browser.
6565

66-
In case of setting up the server and PHP on your own, you have two
67-
choices for the method of connecting PHP to the server. For many
68-
servers PHP has a direct module interface (also called SAPI). These
69-
servers include Apache, Microsoft Internet Information Server, Netscape
70-
and iPlanet servers. Many other servers have support for ISAPI, the
71-
Microsoft module interface (OmniHTTPd for example). If PHP has no
72-
module support for your web server, you can always use it as a CGI or
73-
FastCGI processor. This means you set up your server to use the CGI
74-
executable of PHP to process all PHP file requests on the server.
66+
If PHP has no module support for your web server, ´you can always use
67+
it as a CGI or FastCGI processor. This means you set up your server
68+
to use the CGI executable of PHP to process all PHP file requests on
69+
the server.
7570

7671
If you are also interested to use PHP for command line scripting (e.g.
7772
write scripts autogenerating some images for you offline, or processing
@@ -409,205 +404,7 @@ fastcgi.server = ( ".php" =>
409404
(( "host" => "10.0.0.2", "port" => 1030 ),
410405
( "host" => "10.0.0.3", "port" => 1030 ))
411406
)
412-
__________________________________________________________________
413-
__________________________________________________________________
414-
415-
Sun, iPlanet and Netscape servers on Sun Solaris
416-
417-
This section contains notes and hints specific to Sun Java System Web
418-
Server, Sun ONE Web Server, iPlanet and Netscape server installs of PHP
419-
on Sun Solaris.
420-
421-
From PHP 4.3.3 on you can use PHP scripts with the NSAPI module to
422-
generate custom directory listings and error pages. Additional
423-
functions for Apache compatibility are also available. For support in
424-
current web servers read the note about subrequests.
425-
426-
You can find more information about setting up PHP for the Netscape
427-
Enterprise Server (NES) here:
428-
» http://benoit.noss.free.fr/php/install-php4.html
429-
430-
To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape web servers,
431-
enter the proper install directory for the --with-nsapi=[DIR] option.
432-
The default directory is usually /opt/netscape/suitespot/. Please also
433-
read /php-xxx-version/sapi/nsapi/nsapi-readme.txt.
434-
435-
1. Install the following packages from » http://www.sunfreeware.com/
436-
or another download site:
437-
+ autoconf-2.13
438-
+ automake-1.4
439-
+ bison-1_25-sol26-sparc-local
440-
+ flex-2_5_4a-sol26-sparc-local
441-
+ gcc-2_95_2-sol26-sparc-local
442-
+ gzip-1.2.4-sol26-sparc-local
443-
+ m4-1_4-sol26-sparc-local
444-
+ make-3_76_1-sol26-sparc-local
445-
+ mysql-3.23.24-beta (if you want mysql support)
446-
+ perl-5_005_03-sol26-sparc-local
447-
+ tar-1.13 (GNU tar)
448-
2. Make sure your path includes the proper directories
449-
PATH=.:/usr/local/bin:/usr/sbin:/usr/bin:/usr/ccs/bin and make it
450-
available to your system export PATH.
451-
3. gunzip php-x.x.x.tar.gz (if you have a .gz dist, otherwise go to
452-
4).
453-
4. tar xvf php-x.x.x.tar
454-
5. Change to your extracted PHP directory: cd ../php-x.x.x
455-
6. For the following step, make sure /opt/netscape/suitespot/ is where
456-
your netscape server is installed. Otherwise, change to the correct
457-
path and run:
458-
./configure --with-mysql=/usr/local/mysql \
459-
--with-nsapi=/opt/netscape/suitespot/ \
460-
--enable-libgcc
461-
7. Run make followed by make install.
462-
463-
After performing the base install and reading the appropriate readme
464-
file, you may need to perform some additional configuration steps.
465-
466-
Configuration Instructions for Sun/iPlanet/Netscape
467-
468-
Firstly you may need to add some paths to the LD_LIBRARY_PATH
469-
environment for the server to find all the shared libs. This can best
470-
done in the start script for your web server. The start script is often
471-
located in: /path/to/server/https-servername/start. You may also need
472-
to edit the configuration files that are located in:
473-
/path/to/server/https-servername/config/.
474-
1. Add the following line to mime.types (you can do that by the
475-
administration server):
476-
type=magnus-internal/x-httpd-php exts=php
477-
478-
2. Edit magnus.conf (for servers >= 6) or obj.conf (for servers < 6)
479-
and add the following, shlib will vary depending on your system, it
480-
will be something like /opt/netscape/suitespot/bin/libphp4.so. You
481-
should place the following lines after mime types init.
482-
Init fn="load-modules" funcs="php4_init,php4_execute,php4_auth_trans" shlib="/op
483-
t/netscape/suitespot/bin/libphp4.so"
484-
Init fn="php4_init" LateInit="yes" errorString="Failed to initialize PHP!" [php_
485-
ini="/path/to/php.ini"]
486-
487-
(PHP >= 4.3.3) The php_ini parameter is optional but with it you
488-
can place your php.ini in your web server config directory.
489-
3. Configure the default object in obj.conf (for virtual server
490-
classes [version 6.0+] in their vserver.obj.conf):
491-
<Object name="default">
492-
.
493-
.
494-
.
495-
.#NOTE this next line should happen after all 'ObjectType' and before all 'AddLo
496-
g' lines
497-
Service fn="php4_execute" type="magnus-internal/x-httpd-php" [inikey=value inike
498-
y=value ...]
499-
.
500-
.
501-
</Object>
502-
503-
(PHP >= 4.3.3) As additional parameters you can add some special
504-
php.ini-values, for example you can set a
505-
docroot="/path/to/docroot" specific to the context php4_execute is
506-
called. For boolean ini-keys please use 0/1 as value, not
507-
"On","Off",... (this will not work correctly), e.g.
508-
zlib.output_compression=1 instead of zlib.output_compression="On"
509-
4. This is only needed if you want to configure a directory that only
510-
consists of PHP scripts (same like a cgi-bin directory):
511-
<Object name="x-httpd-php">
512-
ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
513-
Service fn=php4_execute [inikey=value inikey=value ...]
514-
</Object>
515-
516-
After that you can configure a directory in the Administration
517-
server and assign it the style x-httpd-php. All files in it will
518-
get executed as PHP. This is nice to hide PHP usage by renaming
519-
files to .html.
520-
5. Setup of authentication: PHP authentication cannot be used with any
521-
other authentication. ALL AUTHENTICATION IS PASSED TO YOUR PHP
522-
SCRIPT. To configure PHP Authentication for the entire server, add
523-
the following line to your default object:
524-
<Object name="default">
525-
AuthTrans fn=php4_auth_trans
526-
.
527-
.
528-
.
529-
</Object>
530-
531-
6. To use PHP Authentication on a single directory, add the following:
532-
<Object ppath="d:\path\to\authenticated\dir\*">
533-
AuthTrans fn=php4_auth_trans
534-
</Object>
535-
536-
Note:
537-
538-
The stacksize that PHP uses depends on the configuration of the web
539-
server. If you get crashes with very large PHP scripts, it is
540-
recommended to raise it with the Admin Server (in the section
541-
"MAGNUS EDITOR").
542-
543-
CGI environment and recommended modifications in php.ini
544-
545-
Important when writing PHP scripts is the fact that Sun JSWS/Sun ONE
546-
WS/iPlanet/Netscape is a multithreaded web server. Because of that all
547-
requests are running in the same process space (the space of the web
548-
server itself) and this space has only one environment. If you want to
549-
get CGI variables like PATH_INFO, HTTP_HOST etc. it is not the correct
550-
way to try this in the old PHP way with getenv() or a similar way
551-
(register globals to environment, $_ENV). You would only get the
552-
environment of the running web server without any valid CGI variables!
553-
554-
Note:
555-
556-
Why are there (invalid) CGI variables in the environment?
557-
558-
Answer: This is because you started the web server process from the
559-
admin server which runs the startup script of the web server, you
560-
wanted to start, as a CGI script (a CGI script inside of the admin
561-
server!). This is why the environment of the started web server has
562-
some CGI environment variables in it. You can test this by starting
563-
the web server not from the administration server. Use the command
564-
line as root user and start it manually - you will see there are no
565-
CGI-like environment variables.
566-
567-
Simply change your scripts to get CGI variables in the correct way for
568-
PHP 4.x by using the superglobal $_SERVER. If you have older scripts
569-
which use $HTTP_HOST, etc., you should turn on register_globals in
570-
php.ini and change the variable order too (important: remove "E" from
571-
it, because you do not need the environment here):
572-
variables_order = "GPCS"
573-
register_globals = On
574-
575-
Special use for error pages or self-made directory listings (PHP >= 4.3.3)
576-
577-
You can use PHP to generate the error pages for "404 Not Found" or
578-
similar. Add the following line to the object in obj.conf for every
579-
error page you want to overwrite:
580-
Error fn="php4_execute" code=XXX script="/path/to/script.php" [inikey=value inik
581-
ey=value...]
582-
583-
where XXX is the HTTP error code. Please delete any other Error
584-
directives which could interfere with yours. If you want to place a
585-
page for all errors that could exist, leave the code parameter out.
586-
Your script can get the HTTP status code with $_SERVER['ERROR_TYPE'].
587-
588-
Another possibility is to generate self-made directory listings. Just
589-
create a PHP script which displays a directory listing and replace the
590-
corresponding default Service line for type="magnus-internal/directory"
591-
in obj.conf with the following:
592-
Service fn="php4_execute" type="magnus-internal/directory" script="/path/to/scri
593-
pt.php" [inikey=value inikey=value...]
594-
595-
For both error and directory listing pages the original URI and
596-
translated URI are in the variables $_SERVER['PATH_INFO'] and
597-
$_SERVER['PATH_TRANSLATED'].
598-
599-
Note about nsapi_virtual() and subrequests (PHP >= 4.3.3)
600-
601-
The NSAPI module now supports the nsapi_virtual() function (alias:
602-
virtual()) to make subrequests on the web server and insert the result
603-
in the web page. This function uses some undocumented features from the
604-
NSAPI library. On Unix the module automatically looks for the needed
605-
functions and uses them if available. If not, nsapi_virtual() is
606-
disabled.
607-
608-
Note:
609407

610-
But be warned: Support for nsapi_virtual() is EXPERIMENTAL!!!
611408
__________________________________________________________________
612409
__________________________________________________________________
613410

@@ -1386,8 +1183,7 @@ The configuration file
13861183

13871184
php.ini is searched for in these locations (in order):
13881185
* SAPI module specific location (PHPIniDir directive in Apache 2, -c
1389-
command line option in CGI and CLI, php_ini parameter in NSAPI,
1390-
PHP_INI_PATH environment variable in THTTPD)
1186+
command line option in CGI and CLI)
13911187
* The PHPRC environment variable. Before PHP 5.2.0, this was checked
13921188
after the registry key mentioned below.
13931189
* As of PHP 5.2.0, the location of the php.ini file can be set for

Diff for: Makefile.global

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ clean:
115115
find . -name \*.la -o -name \*.a | xargs rm -f
116116
find . -name \*.so | xargs rm -f
117117
find . -name .libs -a -type d|xargs rm -rf
118-
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
118+
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
119119

120120
distclean: clean
121121
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c stamp-h sapi/apache/libphp$(PHP_MAJOR_VERSION).module sapi/apache_hooks/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
@@ -137,7 +137,7 @@ prof-clean:
137137
find . -name \*.lo -o -name \*.o | xargs rm -f
138138
find . -name \*.la -o -name \*.a | xargs rm -f
139139
find . -name \*.so | xargs rm -f
140-
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_MILTER_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
140+
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
141141

142142
prof-use:
143143
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all

Diff for: TSRM/TSRM.c

-22
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,6 @@ TSRM_API THREAD_T tsrm_thread_id(void)
585585
return pth_self();
586586
#elif defined(PTHREADS)
587587
return pthread_self();
588-
#elif defined(NSAPI)
589-
return systhread_current();
590-
#elif defined(PI3WEB)
591-
return PIThread_getCurrent();
592588
#elif defined(TSRM_ST)
593589
return st_thread_self();
594590
#elif defined(BETHREADS)
@@ -610,10 +606,6 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
610606
#elif defined(PTHREADS)
611607
mutexp = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
612608
pthread_mutex_init(mutexp,NULL);
613-
#elif defined(NSAPI)
614-
mutexp = crit_init();
615-
#elif defined(PI3WEB)
616-
mutexp = PIPlatform_allocLocalMutex();
617609
#elif defined(TSRM_ST)
618610
mutexp = st_mutex_new();
619611
#elif defined(BETHREADS)
@@ -640,10 +632,6 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
640632
#elif defined(PTHREADS)
641633
pthread_mutex_destroy(mutexp);
642634
free(mutexp);
643-
#elif defined(NSAPI)
644-
crit_terminate(mutexp);
645-
#elif defined(PI3WEB)
646-
PISync_delete(mutexp);
647635
#elif defined(TSRM_ST)
648636
st_mutex_destroy(mutexp);
649637
#elif defined(BETHREADS)
@@ -674,11 +662,6 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
674662
return -1;
675663
#elif defined(PTHREADS)
676664
return pthread_mutex_lock(mutexp);
677-
#elif defined(NSAPI)
678-
crit_enter(mutexp);
679-
return 0;
680-
#elif defined(PI3WEB)
681-
return PISync_lock(mutexp);
682665
#elif defined(TSRM_ST)
683666
return st_mutex_lock(mutexp);
684667
#elif defined(BETHREADS)
@@ -706,11 +689,6 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
706689
return -1;
707690
#elif defined(PTHREADS)
708691
return pthread_mutex_unlock(mutexp);
709-
#elif defined(NSAPI)
710-
crit_exit(mutexp);
711-
return 0;
712-
#elif defined(PI3WEB)
713-
return PISync_unlock(mutexp);
714692
#elif defined(TSRM_ST)
715693
return st_mutex_unlock(mutexp);
716694
#elif defined(BETHREADS)

Diff for: TSRM/TSRM.h

-6
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,6 @@ typedef int ts_rsrc_id;
6969
#elif defined(PTHREADS)
7070
# define THREAD_T pthread_t
7171
# define MUTEX_T pthread_mutex_t *
72-
#elif defined(NSAPI)
73-
# define THREAD_T SYS_THREAD
74-
# define MUTEX_T CRITICAL
75-
#elif defined(PI3WEB)
76-
# define THREAD_T PIThread *
77-
# define MUTEX_T PISync *
7872
#elif defined(TSRM_ST)
7973
# define THREAD_T st_thread_t
8074
# define MUTEX_T st_mutex_t

Diff for: ext/opcache/ZendAccelerator.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -2319,7 +2319,6 @@ static inline int accel_find_sapi(void)
23192319
"cli-server",
23202320
"cgi-fcgi",
23212321
"fpm-fcgi",
2322-
"isapi",
23232322
"apache2filter",
23242323
"apache2handler",
23252324
"litespeed",
@@ -2598,7 +2597,7 @@ static int accel_startup(zend_extension *extension)
25982597
strcmp(sapi_module.name, "cli") == 0) {
25992598
zps_startup_failure("Opcode Caching is disabled for CLI", NULL, accelerator_remove_cb);
26002599
} else {
2601-
zps_startup_failure("Opcode Caching is only supported in Apache, ISAPI, FPM, FastCGI and LiteSpeed SAPIs", NULL, accelerator_remove_cb);
2600+
zps_startup_failure("Opcode Caching is only supported in Apache, FPM, FastCGI and LiteSpeed SAPIs", NULL, accelerator_remove_cb);
26022601
}
26032602
return SUCCESS;
26042603
}

Diff for: main/php.h

-2
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ typedef int gid_t;
101101
typedef char * caddr_t;
102102
typedef unsigned int uint;
103103
typedef unsigned long ulong;
104-
# if !NSAPI
105104
typedef int pid_t;
106-
# endif
107105

108106
# ifndef PHP_DEBUG
109107
# ifdef inline

Diff for: win32/build/mkdist.php

-6
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ function get_depends($module)
4545
/* apache 2 */
4646
'libhttpd.dll', 'libapr.dll', 'libaprutil.dll','libapr-1.dll', 'libaprutil-1.dll',
4747

48-
/* pi3web */
49-
'piapi.dll', 'pi3api.dll',
50-
51-
/* nsapi */
52-
'ns-httpd30.dll', 'ns-httpd35.dll', 'ns-httpd36.dll', 'ns-httpd40.dll',
53-
5448
/* oracle */
5549
'oci.dll', 'ociw32.dll',
5650

0 commit comments

Comments
 (0)