Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.35
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
standard /
Delete
Unzip
Name
Size
Permission
Date
Action
.libs
[ DIR ]
drwxr-xr-x
2024-03-12 14:32
html_tables
[ DIR ]
drwxrwxr-x
2022-10-31 11:36
tests
[ DIR ]
drwxrwxr-x
2022-10-31 11:36
Makefile.frag
518
B
-rw-rw-r--
2022-10-31 11:36
Makefile.frag.w32
484
B
-rw-rw-r--
2022-10-31 11:36
array.c
180.31
KB
-rw-rw-r--
2022-10-31 11:36
array.lo
319
B
-rw-r--r--
2024-03-12 14:30
array.o
899.66
KB
-rw-r--r--
2024-03-12 14:30
assert.c
11.06
KB
-rw-rw-r--
2022-10-31 11:36
assert.lo
322
B
-rw-r--r--
2024-03-12 14:31
assert.o
160.11
KB
-rw-r--r--
2024-03-12 14:31
base64.c
30.69
KB
-rw-rw-r--
2022-10-31 11:36
base64.h
3.8
KB
-rw-rw-r--
2022-10-31 11:36
base64.lo
322
B
-rw-r--r--
2024-03-12 14:30
base64.o
87.38
KB
-rw-r--r--
2024-03-12 14:30
basic_functions.c
169.92
KB
-rw-rw-r--
2022-10-31 11:36
basic_functions.h
7.71
KB
-rw-rw-r--
2022-10-31 11:36
basic_functions.lo
349
B
-rw-r--r--
2024-03-12 14:30
basic_functions.o
928.72
KB
-rw-r--r--
2024-03-12 14:30
browscap.c
20.87
KB
-rw-rw-r--
2022-10-31 11:36
browscap.lo
328
B
-rw-r--r--
2024-03-12 14:30
browscap.o
144.24
KB
-rw-r--r--
2024-03-12 14:30
config.m4
12.06
KB
-rw-rw-r--
2022-10-31 11:36
config.w32
1.79
KB
-rw-rw-r--
2022-10-31 11:36
crc32.c
2.78
KB
-rw-rw-r--
2022-10-31 11:36
crc32.h
4.64
KB
-rw-rw-r--
2022-10-31 11:36
crc32.lo
319
B
-rw-r--r--
2024-03-12 14:30
crc32.o
78.52
KB
-rw-r--r--
2024-03-12 14:30
credits.c
5.86
KB
-rw-rw-r--
2022-10-31 11:36
credits.h
1.67
KB
-rw-rw-r--
2022-10-31 11:36
credits.lo
325
B
-rw-r--r--
2024-03-12 14:31
credits.o
112.09
KB
-rw-r--r--
2024-03-12 14:31
credits_ext.h
5.25
KB
-rw-rw-r--
2022-10-31 11:36
credits_sapi.h
835
B
-rw-rw-r--
2022-10-31 11:36
crypt.c
8.2
KB
-rw-rw-r--
2022-10-31 11:36
crypt.lo
319
B
-rw-r--r--
2024-03-12 14:30
crypt.o
94.56
KB
-rw-r--r--
2024-03-12 14:30
crypt_blowfish.c
31.67
KB
-rw-rw-r--
2022-10-31 11:36
crypt_blowfish.h
1.01
KB
-rw-rw-r--
2022-10-31 11:36
crypt_blowfish.lo
346
B
-rw-r--r--
2024-03-12 14:30
crypt_blowfish.o
70.52
KB
-rw-r--r--
2024-03-12 14:30
crypt_freesec.c
21.67
KB
-rw-rw-r--
2022-10-31 11:36
crypt_freesec.h
662
B
-rw-rw-r--
2022-10-31 11:36
crypt_freesec.lo
343
B
-rw-r--r--
2024-03-12 14:30
crypt_freesec.o
30.79
KB
-rw-r--r--
2024-03-12 14:30
crypt_sha256.c
21.56
KB
-rw-rw-r--
2022-10-31 11:36
crypt_sha256.lo
340
B
-rw-r--r--
2024-03-12 14:30
crypt_sha256.o
105.59
KB
-rw-r--r--
2024-03-12 14:30
crypt_sha512.c
26.21
KB
-rw-rw-r--
2022-10-31 11:36
crypt_sha512.lo
340
B
-rw-r--r--
2024-03-12 14:30
crypt_sha512.o
109.91
KB
-rw-r--r--
2024-03-12 14:30
css.c
2.39
KB
-rw-rw-r--
2022-10-31 11:36
css.h
1.19
KB
-rw-rw-r--
2022-10-31 11:36
css.lo
313
B
-rw-r--r--
2024-03-12 14:31
css.o
74.53
KB
-rw-r--r--
2024-03-12 14:31
cyr_convert.c
11.42
KB
-rw-rw-r--
2022-10-31 11:36
cyr_convert.h
1.22
KB
-rw-rw-r--
2022-10-31 11:36
cyr_convert.lo
337
B
-rw-r--r--
2024-03-12 14:30
cyr_convert.o
85.68
KB
-rw-r--r--
2024-03-12 14:30
datetime.c
3.48
KB
-rw-rw-r--
2022-10-31 11:36
datetime.h
1.34
KB
-rw-rw-r--
2022-10-31 11:36
datetime.lo
328
B
-rw-r--r--
2024-03-12 14:30
datetime.o
81.48
KB
-rw-r--r--
2024-03-12 14:30
dir.c
14.9
KB
-rw-rw-r--
2022-10-31 11:36
dir.lo
313
B
-rw-r--r--
2024-03-12 14:30
dir.o
147.7
KB
-rw-r--r--
2024-03-12 14:30
dl.c
8.11
KB
-rw-rw-r--
2022-10-31 11:36
dl.h
1.59
KB
-rw-rw-r--
2022-10-31 11:36
dl.lo
310
B
-rw-r--r--
2024-03-12 14:30
dl.o
106.3
KB
-rw-r--r--
2024-03-12 14:30
dns.c
28.95
KB
-rw-rw-r--
2022-10-31 11:36
dns.lo
313
B
-rw-r--r--
2024-03-12 14:30
dns.o
186.35
KB
-rw-r--r--
2024-03-12 14:30
dns_win32.c
15.22
KB
-rw-rw-r--
2022-10-31 11:36
exec.c
13.49
KB
-rw-rw-r--
2022-10-31 11:36
exec.h
1.68
KB
-rw-rw-r--
2022-10-31 11:36
exec.lo
316
B
-rw-r--r--
2024-03-12 14:30
exec.o
147.67
KB
-rw-r--r--
2024-03-12 14:30
file.c
68.02
KB
-rw-rw-r--
2022-10-31 11:36
file.h
4.63
KB
-rw-rw-r--
2022-10-31 11:36
file.lo
316
B
-rw-r--r--
2024-03-12 14:30
file.o
448.2
KB
-rw-r--r--
2024-03-12 14:30
filestat.c
30.34
KB
-rw-rw-r--
2022-10-31 11:36
filestat.lo
328
B
-rw-r--r--
2024-03-12 14:30
filestat.o
263.89
KB
-rw-r--r--
2024-03-12 14:30
filters.c
53.65
KB
-rw-rw-r--
2022-10-31 11:36
filters.lo
325
B
-rw-r--r--
2024-03-12 14:31
filters.o
190.89
KB
-rw-r--r--
2024-03-12 14:31
flock_compat.c
6.73
KB
-rw-rw-r--
2022-10-31 11:36
flock_compat.h
2.06
KB
-rw-rw-r--
2022-10-31 11:36
flock_compat.lo
340
B
-rw-r--r--
2024-03-12 14:30
flock_compat.o
69.09
KB
-rw-r--r--
2024-03-12 14:30
formatted_print.c
20.84
KB
-rw-rw-r--
2022-10-31 11:36
formatted_print.lo
349
B
-rw-r--r--
2024-03-12 14:30
formatted_print.o
180.03
KB
-rw-r--r--
2024-03-12 14:30
fsock.c
3.95
KB
-rw-rw-r--
2022-10-31 11:36
fsock.h
1.42
KB
-rw-rw-r--
2022-10-31 11:36
fsock.lo
319
B
-rw-r--r--
2024-03-12 14:30
fsock.o
89.59
KB
-rw-r--r--
2024-03-12 14:30
ftok.c
2.05
KB
-rw-rw-r--
2022-10-31 11:36
ftok.lo
316
B
-rw-r--r--
2024-03-12 14:31
ftok.o
78.41
KB
-rw-r--r--
2024-03-12 14:31
ftp_fopen_wrapper.c
31.75
KB
-rw-rw-r--
2022-10-31 11:36
ftp_fopen_wrapper.lo
355
B
-rw-r--r--
2024-03-12 14:31
ftp_fopen_wrapper.o
157.71
KB
-rw-r--r--
2024-03-12 14:31
head.c
12.54
KB
-rw-rw-r--
2022-10-31 11:36
head.h
1.85
KB
-rw-rw-r--
2022-10-31 11:36
head.lo
316
B
-rw-r--r--
2024-03-12 14:30
head.o
186.44
KB
-rw-r--r--
2024-03-12 14:30
hrtime.c
5.06
KB
-rw-rw-r--
2022-10-31 11:36
hrtime.h
2.48
KB
-rw-rw-r--
2022-10-31 11:36
hrtime.lo
322
B
-rw-r--r--
2024-03-12 14:32
hrtime.o
86.02
KB
-rw-r--r--
2024-03-12 14:32
html.c
47
KB
-rw-rw-r--
2022-10-31 11:36
html.h
2.62
KB
-rw-rw-r--
2022-10-31 11:36
html.lo
316
B
-rw-r--r--
2024-03-12 14:31
html.o
1.03
MB
-rw-r--r--
2024-03-12 14:31
html_tables.h
472.41
KB
-rw-rw-r--
2022-10-31 11:36
http.c
7.46
KB
-rw-rw-r--
2022-10-31 11:36
http.lo
316
B
-rw-r--r--
2024-03-12 14:32
http.o
118.94
KB
-rw-r--r--
2024-03-12 14:32
http_fopen_wrapper.c
32.52
KB
-rw-rw-r--
2022-10-31 11:36
http_fopen_wrapper.lo
358
B
-rw-r--r--
2024-03-12 14:31
http_fopen_wrapper.o
248.67
KB
-rw-r--r--
2024-03-12 14:31
image.c
42.17
KB
-rw-rw-r--
2022-10-31 11:36
image.lo
319
B
-rw-r--r--
2024-03-12 14:31
image.o
166.95
KB
-rw-r--r--
2024-03-12 14:31
incomplete_class.c
5.04
KB
-rw-rw-r--
2022-10-31 11:36
incomplete_class.lo
352
B
-rw-r--r--
2024-03-12 14:31
incomplete_class.o
85.84
KB
-rw-r--r--
2024-03-12 14:31
info.c
40.22
KB
-rw-rw-r--
2022-10-31 11:36
info.h
22.6
KB
-rw-rw-r--
2022-10-31 11:36
info.lo
316
B
-rw-r--r--
2024-03-12 14:31
info.o
249.2
KB
-rw-r--r--
2024-03-12 14:31
iptc.c
9.57
KB
-rw-rw-r--
2022-10-31 11:36
iptc.lo
316
B
-rw-r--r--
2024-03-12 14:31
iptc.o
106.11
KB
-rw-r--r--
2024-03-12 14:31
lcg.c
3
KB
-rw-rw-r--
2022-10-31 11:36
lcg.lo
313
B
-rw-r--r--
2024-03-12 14:31
lcg.o
75.09
KB
-rw-r--r--
2024-03-12 14:31
levenshtein.c
3.92
KB
-rw-rw-r--
2022-10-31 11:36
levenshtein.lo
337
B
-rw-r--r--
2024-03-12 14:31
levenshtein.o
76.74
KB
-rw-r--r--
2024-03-12 14:31
link.c
5.84
KB
-rw-rw-r--
2022-10-31 11:36
link.lo
316
B
-rw-r--r--
2024-03-12 14:31
link.o
101.48
KB
-rw-r--r--
2024-03-12 14:31
mail.c
17.34
KB
-rw-rw-r--
2022-10-31 11:36
mail.lo
316
B
-rw-r--r--
2024-03-12 14:31
mail.o
170.32
KB
-rw-r--r--
2024-03-12 14:31
math.c
30.06
KB
-rw-rw-r--
2022-10-31 11:36
math.lo
316
B
-rw-r--r--
2024-03-12 14:31
math.o
263.9
KB
-rw-r--r--
2024-03-12 14:31
md5.c
10.91
KB
-rw-rw-r--
2022-10-31 11:36
md5.h
2.1
KB
-rw-rw-r--
2022-10-31 11:36
md5.lo
313
B
-rw-r--r--
2024-03-12 14:31
md5.o
104.06
KB
-rw-r--r--
2024-03-12 14:31
metaphone.c
11.96
KB
-rw-rw-r--
2022-10-31 11:36
metaphone.lo
331
B
-rw-r--r--
2024-03-12 14:31
metaphone.o
170.27
KB
-rw-r--r--
2024-03-12 14:31
microtime.c
4.29
KB
-rw-rw-r--
2022-10-31 11:36
microtime.h
1.32
KB
-rw-rw-r--
2022-10-31 11:36
microtime.lo
331
B
-rw-r--r--
2024-03-12 14:31
microtime.o
87.61
KB
-rw-r--r--
2024-03-12 14:31
mt_rand.c
10.84
KB
-rw-rw-r--
2022-10-31 11:36
mt_rand.lo
325
B
-rw-r--r--
2024-03-12 14:31
mt_rand.o
94.95
KB
-rw-r--r--
2024-03-12 14:31
net.c
8.97
KB
-rw-rw-r--
2022-10-31 11:36
net.lo
313
B
-rw-r--r--
2024-03-12 14:32
net.o
85.18
KB
-rw-r--r--
2024-03-12 14:32
pack.c
31.5
KB
-rw-rw-r--
2022-10-31 11:36
pack.h
1.24
KB
-rw-rw-r--
2022-10-31 11:36
pack.lo
316
B
-rw-r--r--
2024-03-12 14:31
pack.o
149.25
KB
-rw-r--r--
2024-03-12 14:31
pageinfo.c
3.72
KB
-rw-rw-r--
2022-10-31 11:36
pageinfo.h
1.42
KB
-rw-rw-r--
2022-10-31 11:36
pageinfo.lo
328
B
-rw-r--r--
2024-03-12 14:31
pageinfo.o
84.04
KB
-rw-r--r--
2024-03-12 14:31
password.c
21.94
KB
-rw-rw-r--
2022-10-31 11:36
password.lo
328
B
-rw-r--r--
2024-03-12 14:32
password.o
142.6
KB
-rw-r--r--
2024-03-12 14:32
php_array.h
4.41
KB
-rw-rw-r--
2022-10-31 11:36
php_assert.h
1.38
KB
-rw-rw-r--
2022-10-31 11:36
php_browscap.h
1.28
KB
-rw-rw-r--
2022-10-31 11:36
php_crypt.h
1.54
KB
-rw-rw-r--
2022-10-31 11:36
php_crypt_r.c
10.76
KB
-rw-rw-r--
2022-10-31 11:36
php_crypt_r.h
1.99
KB
-rw-rw-r--
2022-10-31 11:36
php_crypt_r.lo
337
B
-rw-r--r--
2024-03-12 14:30
php_crypt_r.o
80.88
KB
-rw-r--r--
2024-03-12 14:30
php_dir.h
1.66
KB
-rw-rw-r--
2022-10-31 11:36
php_dns.h
2.96
KB
-rw-rw-r--
2022-10-31 11:36
php_ext_syslog.h
1.46
KB
-rw-rw-r--
2022-10-31 11:36
php_filestat.h
3.1
KB
-rw-rw-r--
2022-10-31 11:36
php_fopen_wrapper.c
11.6
KB
-rw-rw-r--
2022-10-31 11:36
php_fopen_wrapper.lo
355
B
-rw-r--r--
2024-03-12 14:31
php_fopen_wrapper.o
114.31
KB
-rw-r--r--
2024-03-12 14:31
php_fopen_wrappers.h
1.94
KB
-rw-rw-r--
2022-10-31 11:36
php_ftok.h
1.22
KB
-rw-rw-r--
2022-10-31 11:36
php_http.h
1.62
KB
-rw-rw-r--
2022-10-31 11:36
php_image.h
2.37
KB
-rw-rw-r--
2022-10-31 11:36
php_incomplete_class.h
2.24
KB
-rw-rw-r--
2022-10-31 11:36
php_iptc.h
1.23
KB
-rw-rw-r--
2022-10-31 11:36
php_lcg.h
1.48
KB
-rw-rw-r--
2022-10-31 11:36
php_link.h
1.33
KB
-rw-rw-r--
2022-10-31 11:36
php_mail.h
2.37
KB
-rw-rw-r--
2022-10-31 11:36
php_math.h
4.65
KB
-rw-rw-r--
2022-10-31 11:36
php_metaphone.h
1.2
KB
-rw-rw-r--
2022-10-31 11:36
php_mt_rand.h
1.96
KB
-rw-rw-r--
2022-10-31 11:36
php_net.h
1.32
KB
-rw-rw-r--
2022-10-31 11:36
php_password.h
3.07
KB
-rw-rw-r--
2022-10-31 11:36
php_rand.h
3.14
KB
-rw-rw-r--
2022-10-31 11:36
php_random.h
2.07
KB
-rw-rw-r--
2022-10-31 11:36
php_smart_string.h
1.28
KB
-rw-rw-r--
2022-10-31 11:36
php_smart_string_public.h
1.29
KB
-rw-rw-r--
2022-10-31 11:36
php_standard.h
2.24
KB
-rw-rw-r--
2022-10-31 11:36
php_string.h
5.94
KB
-rw-rw-r--
2022-10-31 11:36
php_type.h
1.62
KB
-rw-rw-r--
2022-10-31 11:36
php_uuencode.h
1.38
KB
-rw-rw-r--
2022-10-31 11:36
php_var.h
3.61
KB
-rw-rw-r--
2022-10-31 11:36
php_versioning.h
1.36
KB
-rw-rw-r--
2022-10-31 11:36
proc_open.c
31.34
KB
-rw-rw-r--
2022-10-31 11:36
proc_open.h
1.74
KB
-rw-rw-r--
2022-10-31 11:36
proc_open.lo
331
B
-rw-r--r--
2024-03-12 14:32
proc_open.o
159.39
KB
-rw-r--r--
2024-03-12 14:32
quot_print.c
7.29
KB
-rw-rw-r--
2022-10-31 11:36
quot_print.h
1.45
KB
-rw-rw-r--
2022-10-31 11:36
quot_print.lo
334
B
-rw-r--r--
2024-03-12 14:31
quot_print.o
90.55
KB
-rw-r--r--
2024-03-12 14:31
rand.c
2.41
KB
-rw-rw-r--
2022-10-31 11:36
rand.lo
316
B
-rw-r--r--
2024-03-12 14:31
rand.o
79.04
KB
-rw-r--r--
2024-03-12 14:31
random.c
7.49
KB
-rw-rw-r--
2022-10-31 11:36
random.lo
322
B
-rw-r--r--
2024-03-12 14:32
random.o
88.59
KB
-rw-r--r--
2024-03-12 14:32
scanf.c
28.81
KB
-rw-rw-r--
2022-10-31 11:36
scanf.h
2.24
KB
-rw-rw-r--
2022-10-31 11:36
scanf.lo
319
B
-rw-r--r--
2024-03-12 14:31
scanf.o
122.94
KB
-rw-r--r--
2024-03-12 14:31
sha1.c
11.44
KB
-rw-rw-r--
2022-10-31 11:36
sha1.h
1.69
KB
-rw-rw-r--
2022-10-31 11:36
sha1.lo
316
B
-rw-r--r--
2024-03-12 14:31
sha1.o
118.13
KB
-rw-r--r--
2024-03-12 14:31
soundex.c
3.16
KB
-rw-rw-r--
2022-10-31 11:36
soundex.lo
325
B
-rw-r--r--
2024-03-12 14:31
soundex.o
77.52
KB
-rw-r--r--
2024-03-12 14:31
streamsfuncs.c
46.41
KB
-rw-rw-r--
2022-10-31 11:36
streamsfuncs.h
2.73
KB
-rw-rw-r--
2022-10-31 11:36
streamsfuncs.lo
340
B
-rw-r--r--
2024-03-12 14:32
streamsfuncs.o
341.69
KB
-rw-r--r--
2024-03-12 14:32
string.c
154.56
KB
-rw-rw-r--
2022-10-31 11:36
string.lo
322
B
-rw-r--r--
2024-03-12 14:31
string.o
871.95
KB
-rw-r--r--
2024-03-12 14:31
strnatcmp.c
4.34
KB
-rw-rw-r--
2022-10-31 11:36
strnatcmp.lo
331
B
-rw-r--r--
2024-03-12 14:31
strnatcmp.o
71.72
KB
-rw-r--r--
2024-03-12 14:31
syslog.c
6.37
KB
-rw-rw-r--
2022-10-31 11:36
syslog.lo
322
B
-rw-r--r--
2024-03-12 14:31
syslog.o
96.32
KB
-rw-r--r--
2024-03-12 14:31
type.c
10.17
KB
-rw-rw-r--
2022-10-31 11:36
type.lo
316
B
-rw-r--r--
2024-03-12 14:31
type.o
130.52
KB
-rw-r--r--
2024-03-12 14:31
uniqid.c
2.65
KB
-rw-rw-r--
2022-10-31 11:36
uniqid.h
1.23
KB
-rw-rw-r--
2022-10-31 11:36
uniqid.lo
322
B
-rw-r--r--
2024-03-12 14:31
uniqid.o
81.45
KB
-rw-r--r--
2024-03-12 14:31
url.c
17.75
KB
-rw-rw-r--
2022-10-31 11:36
url.h
2.39
KB
-rw-rw-r--
2022-10-31 11:36
url.lo
313
B
-rw-r--r--
2024-03-12 14:31
url.o
157.62
KB
-rw-r--r--
2024-03-12 14:31
url_scanner_ex.c
39.41
KB
-rw-r--r--
2022-10-31 11:36
url_scanner_ex.h
2.44
KB
-rw-rw-r--
2022-10-31 11:36
url_scanner_ex.lo
346
B
-rw-r--r--
2024-03-12 14:31
url_scanner_ex.o
322.59
KB
-rw-r--r--
2024-03-12 14:31
url_scanner_ex.re
27.65
KB
-rw-rw-r--
2022-10-31 11:36
user_filters.c
17.55
KB
-rw-rw-r--
2022-10-31 11:36
user_filters.lo
340
B
-rw-r--r--
2024-03-12 14:31
user_filters.o
142.52
KB
-rw-r--r--
2024-03-12 14:31
uuencode.c
6.62
KB
-rw-rw-r--
2022-10-31 11:36
uuencode.lo
328
B
-rw-r--r--
2024-03-12 14:31
uuencode.o
85.96
KB
-rw-r--r--
2024-03-12 14:31
var.c
37.8
KB
-rw-rw-r--
2022-10-31 11:36
var.lo
313
B
-rw-r--r--
2024-03-12 14:31
var.o
399.8
KB
-rw-r--r--
2024-03-12 14:31
var_unserializer.c
38.52
KB
-rw-r--r--
2022-10-31 11:36
var_unserializer.lo
352
B
-rw-r--r--
2024-03-12 14:31
var_unserializer.o
244.13
KB
-rw-r--r--
2024-03-12 14:31
var_unserializer.re
30.81
KB
-rw-rw-r--
2022-10-31 11:36
versioning.c
5.76
KB
-rw-rw-r--
2022-10-31 11:36
versioning.lo
334
B
-rw-r--r--
2024-03-12 14:31
versioning.o
95.11
KB
-rw-r--r--
2024-03-12 14:31
winver.h
6.23
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Brian Schaffner <brian@tool.net> | | Shane Caraveo <shane@caraveo.com> | | Zeev Suraski <zeev@php.net> | +----------------------------------------------------------------------+ */ #include "php.h" #include "dl.h" #include "php_globals.h" #include "php_ini.h" #include "ext/standard/info.h" #include "SAPI.h" #if defined(HAVE_LIBDL) #include <stdlib.h> #include <stdio.h> #include <string.h> #ifdef PHP_WIN32 #include "win32/param.h" #include "win32/winutil.h" #define GET_DL_ERROR() php_win_err() #else #include <sys/param.h> #define GET_DL_ERROR() DL_ERROR() #endif #endif /* defined(HAVE_LIBDL) */ /* {{{ proto int dl(string extension_filename) Load a PHP extension at runtime */ PHPAPI PHP_FUNCTION(dl) { char *filename; size_t filename_len; ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_STRING(filename, filename_len) ZEND_PARSE_PARAMETERS_END(); if (!PG(enable_dl)) { php_error_docref(NULL, E_WARNING, "Dynamically loaded extensions aren't enabled"); RETURN_FALSE; } if (filename_len >= MAXPATHLEN) { php_error_docref(NULL, E_WARNING, "File name exceeds the maximum allowed length of %d characters", MAXPATHLEN); RETURN_FALSE; } php_dl(filename, MODULE_TEMPORARY, return_value, 0); if (Z_TYPE_P(return_value) == IS_TRUE) { EG(full_tables_cleanup) = 1; } } /* }}} */ #if defined(HAVE_LIBDL) /* {{{ php_load_shlib */ PHPAPI void *php_load_shlib(char *path, char **errp) { void *handle; char *err; handle = DL_LOAD(path); if (!handle) { err = GET_DL_ERROR(); #ifdef PHP_WIN32 if (err && (*err)) { size_t i = strlen(err); (*errp)=estrdup(err); php_win32_error_msg_free(err); while (i > 0 && isspace((*errp)[i-1])) { (*errp)[i-1] = '\0'; i--; } } else { (*errp) = estrdup("<No message>"); } #else (*errp) = estrdup(err); GET_DL_ERROR(); /* free the buffer storing the error */ #endif } return handle; } /* }}} */ /* {{{ php_load_extension */ PHPAPI int php_load_extension(char *filename, int type, int start_now) { void *handle; char *libpath; zend_module_entry *module_entry; zend_module_entry *(*get_module)(void); int error_type, slash_suffix = 0; char *extension_dir; char *err1, *err2; if (type == MODULE_PERSISTENT) { extension_dir = INI_STR("extension_dir"); } else { extension_dir = PG(extension_dir); } if (type == MODULE_TEMPORARY) { error_type = E_WARNING; } else { error_type = E_CORE_WARNING; } /* Check if passed filename contains directory separators */ if (strchr(filename, '/') != NULL || strchr(filename, DEFAULT_SLASH) != NULL) { /* Passing modules with full path is not supported for dynamically loaded extensions */ if (type == MODULE_TEMPORARY) { php_error_docref(NULL, E_WARNING, "Temporary module name should contain only filename"); return FAILURE; } libpath = estrdup(filename); } else if (extension_dir && extension_dir[0]) { slash_suffix = IS_SLASH(extension_dir[strlen(extension_dir)-1]); /* Try as filename first */ if (slash_suffix) { spprintf(&libpath, 0, "%s%s", extension_dir, filename); /* SAFE */ } else { spprintf(&libpath, 0, "%s%c%s", extension_dir, DEFAULT_SLASH, filename); /* SAFE */ } } else { return FAILURE; /* Not full path given or extension_dir is not set */ } handle = php_load_shlib(libpath, &err1); if (!handle) { /* Now, consider 'filename' as extension name and build file name */ char *orig_libpath = libpath; if (slash_suffix) { spprintf(&libpath, 0, "%s" PHP_SHLIB_EXT_PREFIX "%s." PHP_SHLIB_SUFFIX, extension_dir, filename); /* SAFE */ } else { spprintf(&libpath, 0, "%s%c" PHP_SHLIB_EXT_PREFIX "%s." PHP_SHLIB_SUFFIX, extension_dir, DEFAULT_SLASH, filename); /* SAFE */ } handle = php_load_shlib(libpath, &err2); if (!handle) { php_error_docref(NULL, error_type, "Unable to load dynamic library '%s' (tried: %s (%s), %s (%s))", filename, orig_libpath, err1, libpath, err2); efree(orig_libpath); efree(err1); efree(libpath); efree(err2); return FAILURE; } efree(orig_libpath); efree(err1); } #ifdef PHP_WIN32 if (!php_win32_image_compatible(libpath, &err1)) { php_error_docref(NULL, error_type, err1); efree(err1); efree(libpath); DL_UNLOAD(handle); return FAILURE; } #endif efree(libpath); get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "get_module"); /* Some OS prepend _ to symbol names while their dynamic linker * does not do that automatically. Thus we check manually for * _get_module. */ if (!get_module) { get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "_get_module"); } if (!get_module) { if (DL_FETCH_SYMBOL(handle, "zend_extension_entry") || DL_FETCH_SYMBOL(handle, "_zend_extension_entry")) { DL_UNLOAD(handle); php_error_docref(NULL, error_type, "Invalid library (appears to be a Zend Extension, try loading using zend_extension=%s from php.ini)", filename); return FAILURE; } DL_UNLOAD(handle); php_error_docref(NULL, error_type, "Invalid library (maybe not a PHP library) '%s'", filename); return FAILURE; } module_entry = get_module(); if (module_entry->zend_api != ZEND_MODULE_API_NO) { php_error_docref(NULL, error_type, "%s: Unable to initialize module\n" "Module compiled with module API=%d\n" "PHP compiled with module API=%d\n" "These options need to match\n", module_entry->name, module_entry->zend_api, ZEND_MODULE_API_NO); DL_UNLOAD(handle); return FAILURE; } if(strcmp(module_entry->build_id, ZEND_MODULE_BUILD_ID)) { php_error_docref(NULL, error_type, "%s: Unable to initialize module\n" "Module compiled with build ID=%s\n" "PHP compiled with build ID=%s\n" "These options need to match\n", module_entry->name, module_entry->build_id, ZEND_MODULE_BUILD_ID); DL_UNLOAD(handle); return FAILURE; } module_entry->type = type; module_entry->module_number = zend_next_free_module(); module_entry->handle = handle; if ((module_entry = zend_register_module_ex(module_entry)) == NULL) { DL_UNLOAD(handle); return FAILURE; } if ((type == MODULE_TEMPORARY || start_now) && zend_startup_module_ex(module_entry) == FAILURE) { DL_UNLOAD(handle); return FAILURE; } if ((type == MODULE_TEMPORARY || start_now) && module_entry->request_startup_func) { if (module_entry->request_startup_func(type, module_entry->module_number) == FAILURE) { php_error_docref(NULL, error_type, "Unable to initialize module '%s'", module_entry->name); DL_UNLOAD(handle); return FAILURE; } } return SUCCESS; } /* }}} */ /* {{{ php_dl */ PHPAPI void php_dl(char *file, int type, zval *return_value, int start_now) { /* Load extension */ if (php_load_extension(file, type, start_now) == FAILURE) { RETVAL_FALSE; } else { RETVAL_TRUE; } } /* }}} */ PHP_MINFO_FUNCTION(dl) { php_info_print_table_row(2, "Dynamic Library Support", "enabled"); } #else PHPAPI void php_dl(char *file, int type, zval *return_value, int start_now) { php_error_docref(NULL, E_WARNING, "Cannot dynamically load %s - dynamic modules are not supported", file); RETVAL_FALSE; } PHP_MINFO_FUNCTION(dl) { PUTS("Dynamic Library support not available<br />.\n"); } #endif